commit 9978f00418d4e75db052e06350f0f5adbc67f553 Author: Neko Date: Thu Jul 31 10:21:59 2025 +0200 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1f31a27 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +# Gitignore settings for ESPHome +# This is an example and may include too much for your use-case. +# You can modify this file to suit your needs. +venv/ +/.esphome/ +/secrets.yaml diff --git a/HurmitNerdFont-Regular.otf b/HurmitNerdFont-Regular.otf new file mode 100644 index 0000000..b27728f Binary files /dev/null and b/HurmitNerdFont-Regular.otf differ diff --git a/flowerpot.png b/flowerpot.png new file mode 100644 index 0000000..b7e11ae Binary files /dev/null and b/flowerpot.png differ diff --git a/itlab25.png b/itlab25.png new file mode 100644 index 0000000..5cecdc4 Binary files /dev/null and b/itlab25.png differ diff --git a/livingroom.yaml b/livingroom.yaml new file mode 100644 index 0000000..1f3e6d4 --- /dev/null +++ b/livingroom.yaml @@ -0,0 +1,119 @@ +esphome: + name: itlabs1 + +esp32: + board: adafruit_feather_esp32s2_tft + framework: + type: esp-idf + +# Enable logging +logger: + +# Enable Home Assistant API +api: + password: "" + +ota: + - platform: esphome + password: "" + +switch: + - platform: gpio + name: "water alert" + pin: GPIO5 + +sensor: + - platform: adc + pin: A5 + id: plant_0_soil_moisture + name: "plant_0_soil_moisture" + attenuation: 11db + unit_of_measurement: '%' + filters: + - lambda: return x *75; + +spi: + clk_pin: GPIO36 + mosi_pin: GPIO35 + miso_pin: GPIO37 + +display: + - platform: ili9xxx + id: my_display + model: st7789v + cs_pin: GPIO7 + dc_pin: GPIO39 + reset_pin: GPIO40 + invert_colors: true + dimensions: + width: 135 + height: 240 + offset_width: 52 + offset_height: 40 + rotation: 90 + pages: + - id: page1 + lambda: |- + it.image(0, 0, id(flowerpot)); + it.image(160, 75, id(itlab25)); + it.printf(3, 3, id(hurmit_regular), "Water level:"); + it.printf(50, 35, id(hurmit_regular), "%.1f %%", id(plant_0_soil_moisture).state); + +interval: + - interval: 5s + then: + - display.page.show_next: my_display + - component.update: my_display + +image: + - file: "flowerpot.png" + type: rgb + transparency: alpha_channel + id: flowerpot + resize: 135x135 + - file: "itlab25.png" + type: rgb + transparency: alpha_channel + id: itlab25 + resize: 80x80 + + +font: + - file: "HurmitNerdFont-Regular.otf" + id: hurmit_regular + size: 28 + #glyphs: [ + # "\u2698", #flower pot + #] + +output: + - platform: ledc + pin: GPIO45 + id: screen_led + + - platform: gpio + pin: GPIO21 + inverted: true + id: tft_power + + +light: + - platform: monochromatic + output: screen_led + id: backlight + name: Backlight + restore_mode: ALWAYS_ON + + +wifi: + #ssid: "Zyxel" + #password: "12345678" + ssid: "ITL@bs" + password: "StStefan202!" + # Enable fallback hotspot (captive portal) in case wifi connection fails + ap: + ssid: "Itlabs1 Fallback Hotspot" + password: "qsri9vnu7Y9n" + +captive_portal: + \ No newline at end of file