projekte:2021:stealthwooddisplayforsmarthomeprototypev1

Frontansicht

Stealth Wood Display for Smarthome Prototype 1

Contact: nikolai

Projectstatus:

  • 1 NodeMCU V2 or any other ESP with enough GPIO
  • 1 MAX7219 Dot Matrix Module 4 in 1
  • 2 BH1750 on Breakoutboard like GY-302
  • 1 5V Powersupply

The Code is based on ESPHome to enable easy Home Assistant integration ans OTA Updates. The Font can be found here

esphome:
  name: ledmatrixdisplay
  platform: ESP8266
  board: nodemcuv2
 
wifi:
  networks:
    - ssid: "vspace.one"
      password: "12345678"
    - ssid: "BLANK"
      password: "BLANK"
 
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Ledmatrixdisplay"
    password: "BLANK"
 
captive_portal:
 
# Enable logging
logger:
 
# Enable Home Assistant API
api:
 
ota:
 
# Example configuration entry
spi:
  clk_pin: D0
  mosi_pin: D1
 
display:
  - platform: max7219digit
    cs_pin: D2
    num_chips: 4
    intensity: 7
    scroll_speed: 100ms
    scroll_delay: 0s
    lambda: |-
      if (id(light_behind_wood).state > 4.9) 
      {
        it.intensity(15);
      } 
      else if (id(light_behind_wood).state > 0.7) 
      {
        it.intensity(10);
      }
      else
      {
        it.intensity(5);
      }
      it.printf(0, -3, id(OpenMine_17_font), " O %.1f L %.1f B %.1f", id(temperature_outside).state,id(temperature_livingroom).state,id(temperature_bedroom).state);
 
font:
  - file: "OpenMine.ttf"
    id: OpenMine_17_font
    size: 17
 
sensor:
  # Outside temperature
  - platform: homeassistant
    id: temperature_outside
    entity_id: sensor.temperature_10
  # Livingroom temperature
  - platform: homeassistant
    id: temperature_livingroom
    entity_id: sensor.atmos_livingroom
  # Bedroom temperature
  - platform: homeassistant
    id: temperature_bedroom
    entity_id: sensor.atmos_bedroom
  # Lightsensor Behind Wood
  - platform: bh1750
    id: light_behind_wood
    name: "Light Behind Wood"
    address: 0x5C
    measurement_time: 69
    update_interval: 60s
    # Lightsensor Room
  - platform: bh1750
    id: light_room
    name: "Light Room"
    address: 0x23
    measurement_time: 69
    update_interval: 60s
 
i2c:
  sda: D3
  scl: D4
  scan: True
  id: bus_a

Electronics Electronics In Wood 1 Electronics In Wood 2 On Wall Off On Wall On

  • projekte/2021/stealthwooddisplayforsmarthomeprototypev1.txt
  • Zuletzt geändert: 2021/04/04 15:32
  • von nikolai