The tiny dashboard

Hey friends,

I made a tiny Home Assistant dashboard with an OLED, ESP32, custom PCB and 3D printed enclosure. All running ESPHome. It displays:

  • Last motion
  • Number of lights on
  • Average house temperature
  • Any open window
  • Coffee Maker on/off
  • Mail having been delivered
  • Washing machine on/off
  • Vacuum state


esphome:
  name: esp_test
  platform: ESP32
  board: esp-wrover-kit

wifi:
  ssid: "SSID"
  password: "PWD"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esp Test Fallback Hotspot"
    password: "PWDHere"

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:

text_sensor:

  - platform: homeassistant
    name: "Mailbox Status"
    entity_id: sensor.mail_status
    id: mailbox_status
    internal: true

  - platform: template
    name: "Template Text Sensor"
    id: template_text
    internal: true
    
  - platform: template
    name: "Template Text Sensor 2"
    id: template_text2
    internal: true
    
  - platform: homeassistant
    name: "Vacuum Status"
    entity_id: vacuum.xiaomi_vacuum_cleaner
    id: vacuum_status
    on_value:
          - if:
              condition:
                text_sensor.state:
                  id: vacuum_status
                  state: 'docked'
              then:
                - text_sensor.template.publish:
                    id: template_text2
                    state: "Docked"
          - if:
              condition:
                text_sensor.state:
                  id: vacuum_status
                  state: 'cleaning'
              then:
                - text_sensor.template.publish:
                    id: template_text2
                    state: "Clean"
          - if:
              condition:
                text_sensor.state:
                  id: vacuum_status
                  state: 'idle'
              then:
                - text_sensor.template.publish:
                    id: template_text2
                    state: "Idle"
    internal: true

  - platform: homeassistant
    name: "Last Motion"
    entity_id: sensor.last_motion
    id: last_motion
    on_value:
          - if:
              condition:
                text_sensor.state:
                  id: last_motion
                  state: 'Office Motion Sensor'
              then:
                - text_sensor.template.publish:
                    id: template_text
                    state: "Office"
          - if:
              condition:
                text_sensor.state:
                  id: last_motion
                  state: 'Hallway Motion Sensor'
              then:
                - text_sensor.template.publish:
                    id: template_text
                    state: "Hallway"
          - if:
              condition:
                text_sensor.state:
                  id: last_motion
                  state: 'Kids Room Motion Sensor'
              then:
                - text_sensor.template.publish:
                    id: template_text
                    state: "Kids"
          - if:
              condition:
                text_sensor.state:
                  id: last_motion
                  state: 'Kitchen Motion Sensor'
              then:
                - text_sensor.template.publish:
                    id: template_text
                    state: "Kitchen"
          - if:
              condition:
                text_sensor.state:
                  id: last_motion
                  state: 'Living Room Motion Sensor'
              then:
                - text_sensor.template.publish:
                    id: template_text
                    state: "Living"
          - if:
              condition:
                text_sensor.state:
                  id: last_motion
                  state: 'Bathroom Motion Sensor'
              then:
                - text_sensor.template.publish:
                    id: template_text
                    state: "Bath"
    internal: true
    
sensor:
  - platform: homeassistant
    name: "Number of lights on"
    entity_id: sensor.total_lights_on
    id: total_lights_on
    internal: true
  - platform: homeassistant
    name: "House Temperature"
    entity_id: sensor.average_temperature
    id: average_temperature
    internal: true

    

binary_sensor:
  - platform: homeassistant
    name: "Any window open"
    entity_id: binary_sensor.any_open_window
    id: any_open_window
    internal: true
  - platform: homeassistant
    name: "Coffee Maker State"
    entity_id: input_boolean.coffee_maker_state
    id: coffee_maker_state
    internal: true
  - platform: homeassistant
    name: "Washing Machine State"
    entity_id: input_boolean.washing_machine_state
    id: washing_machine_state
    internal: true
    
font:
  - file: "dealer.ttf"
    id: bigFont
    size: 60
  - file: "arial.ttf"
    id: smallFont
    size: 12
  - file: 'materialdesignicons-webfont.ttf'
    id: icon
    size: 12
    glyphs:
      - "\U000F070E" # mdi-run
      - "\U000F0335" # mdi-lightbulb
      - "\U000F050F" # mdi-thermometer
      - "\U000F05AE" # mdi-window-close
      - "\U000F0176" # mdi-coffee
      - "\U000F01EE" # mdi-email
      - "\U000F072A" # mdi-washing-machine
      - "\U000F070D" # mdi-robot-vacuum

i2c:
  sda: 27
  scl: 25

display:
  - platform: ssd1306_i2c
    model: "SSD1306 128x64"
    address: 0x3C
    id: my_display
    lambda: |-
      it.print(0, 0, id(icon), TextAlign::LEFT, "\U000F070E"); 
      it.printf(15, 0, id(smallFont), "%s", id(template_text).state.c_str());
      it.print(0, 16, id(icon), TextAlign::LEFT, "\U000F0335");
      it.printf(15, 16, id(smallFont), "%.0f", id(total_lights_on).state);
      it.print(0, 32, id(icon), TextAlign::LEFT, "\U000F050F");
      it.printf(15, 32, id(smallFont), "%.1f", id(average_temperature).state);
      it.print(0, 48, id(icon), TextAlign::LEFT, "\U000F05AE");
      it.printf(15, 48, id(smallFont), "%s", id(any_open_window).state ? "Open" : "Closed");
      it.print(70, 0, id(icon), TextAlign::LEFT, "\U000F0176");
      it.printf(87, 0, id(smallFont), "%s", id(coffee_maker_state).state ? "On" : "Off");
      it.print(70, 16, id(icon), TextAlign::LEFT, "\U000F01EE"); 
      it.printf(87, 16, id(smallFont), "%s", id(mailbox_status).state.c_str());
      it.print(70, 32, id(icon), TextAlign::LEFT, "\U000F072A");
      it.printf(87, 32, id(smallFont), "%s", id(washing_machine_state).state ? "On" : "Off");
      it.print(70, 48, id(icon), TextAlign::LEFT, "\U000F070D"); 
      it.printf(87, 48, id(smallFont), "%s", id(template_text2).state.c_str());
20 Likes

Very nice project.

Just curious, what do you use to detect mail?

I have an Input Boolean that resets every night and a Xiaomi Door Sensor on the mailbox that flips it when the mailman opens the box. It doesn’t read the mailbox content as such, but it detects opening of the mailbox between certain hours. The most difficult part of making this work was getting the range for the zigbee sensor working. I ended up using an Ikea signal repeater for this.

1 Like

What kind of Board (Wemos / LOLIN) thingy is that?

Nice… love the idea… and the build

Can you share more about the components that you used or even the Arduino (guessing :wink: ) code that u used?

been thinking about something similar to add to my home office.

Hi, it’s an ESP32 Wemos mini board, link here:

https://www.aliexpress.com/item/1005001597926594.html

This is made using the ESPHome addon for Home Assistant. I use an ESP32 and a standard OLED, 0.96" board, using I2C. The code for using this is at the top post, as it is using ESPHome to do the easier Arduino coding. The PCB I made is totally not necessary here, just an 8266 or ESP32 with any OLED will do the trick.

Hello,
in response to this project I was trying to make my own version with my own sensor as could be seen in the code.
I’m still a complete newbie with code and tried to replace some sensors. as seen on the picture it doesn’t do what expected at all. is there anyone who could help me out? Thanks in advance!!!




  name: dashboard
  platform: ESP8266
  board: d1_mini

wifi:
  ssid: "SSID"
  password: "PASSWD"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esp Fallback Hotspot"
    password: "PASSWD"

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "KEY"

ota:
  password: "864637e67ec04407dea1dd128a0785a9"

text_sensor:

  - platform: homeassistant
    name: "Mailbox Status"
    entity_id: sensor.mail_status
    id: mailbox_status
    internal: true

  - platform: template
    name: "Template Text Sensor"
    id: template_text
    internal: true
    

    

sensor:
  - platform: homeassistant
    name: "Number of lights on"
    entity_id: sensor.lights_on
    id: total_lights_on
    internal: true
  - platform: homeassistant
    name: "House Temperature"
    entity_id: weather.forecast_home
    id: average_temperature
    internal: true
  - platform: homeassistant
    name: “printtemp”
    entity_id: sensor.ender_3_extruder_0
    id: printtemp
    internal: true
  - platform: homeassistant
    name: “print-job”
    id: printjob
    entity_id: sensor.ender_3_current_job
    internal: true
  - platform: homeassistant
    name: “Tv”
    id: tv
    entity_id: sensor.tv_state
    internal: true

    

binary_sensor:
  - platform: homeassistant
    name: "Coffee Maker State"
    entity_id: input_boolean.coffee_maker_state
    id: coffee_maker_state
    internal: true

    
font:
  - file: "arial.ttf"
    id: bigFont
    size: 60
  - file: "arial.ttf"
    id: smallFont
    size: 12
  - file: 'materialdesignicons-webfont.ttf'
    id: icon
    size: 12
    glyphs:
      - "\U000F070E" # mdi-run
      - "\U000F0335" # mdi-lightbulb
      - "\U000F050F" # mdi-thermometer
      - "\U000F05AE" # mdi-window-close
      - "\U000F0176" # mdi-coffee
      - "\U000F01EE" # mdi-email
      - "\U000F072A" # mdi-washing-machine
      - "\U000F070D" # mdi-robot-vacuum

i2c:
  sda: D3 
  scl: D4

display:
  - platform: ssd1306_i2c
    model: "SSD1306 128x64"
    address: 0x3C
    id: my_display
    lambda: |-
      it.print(0, 0, id(icon), TextAlign::LEFT, "\U000F070E"); 
      it.printf(15, 0, id(smallFont), "%s", id(printtemp).state);
      it.print(0, 16, id(icon), TextAlign::LEFT, "\U000F0335");
      it.printf(15, 16, id(smallFont), "%.0f", id(printjob).state);
      it.print(0, 32, id(icon), TextAlign::LEFT, "\U000F050F");
      it.printf(15, 32, id(smallFont), "%.1f", id(average_temperature).state);
      it.print(0, 48, id(icon), TextAlign::LEFT, "\U000F05AE");
      it.printf(87, 0, id(smallFont), "%.0f", id(total_lights_on).state);
      it.print(70, 16, id(icon), TextAlign::LEFT, "\U000F01EE"); 
      it.printf(87, 16, id(smallFont), "%s", id(tv).state ? "On" : "Off");
      it.print(70, 32, id(icon), TextAlign::LEFT, "\U000F072A");