From 6af7f65591055eca1bfdeb3dd0d21928c75c8be9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Kl=C3=BCter?= Date: Sun, 4 Jan 2026 15:08:11 +0100 Subject: [PATCH] Add ESPhome --- .gitignore | 1 + ESPHome/config/.gitignore | 5 + ESPHome/config/common/minir4-local.yaml | 108 +++++++++++++++++++ ESPHome/config/common/minir4.yaml | 110 ++++++++++++++++++++ ESPHome/config/minir4-5.yaml | 15 +++ ESPHome/config/minir4-8.yaml | 10 ++ ESPHome/config/schalter-bar.yaml | 10 ++ ESPHome/config/schalter-deckenlampe-th.yaml | 10 ++ ESPHome/config/schalter-diele.yaml | 10 ++ ESPHome/config/schalter-kitchen.yaml | 10 ++ ESPHome/config/schalter-philipps-buero.yaml | 10 ++ ESPHome/config/schalter-treppenhaus-eg.yaml | 9 ++ ESPHome/config/spiegel.yaml | 43 ++++++++ 13 files changed, 351 insertions(+) create mode 100644 .gitignore create mode 100644 ESPHome/config/.gitignore create mode 100644 ESPHome/config/common/minir4-local.yaml create mode 100644 ESPHome/config/common/minir4.yaml create mode 100644 ESPHome/config/minir4-5.yaml create mode 100644 ESPHome/config/minir4-8.yaml create mode 100644 ESPHome/config/schalter-bar.yaml create mode 100644 ESPHome/config/schalter-deckenlampe-th.yaml create mode 100644 ESPHome/config/schalter-diele.yaml create mode 100644 ESPHome/config/schalter-kitchen.yaml create mode 100644 ESPHome/config/schalter-philipps-buero.yaml create mode 100644 ESPHome/config/schalter-treppenhaus-eg.yaml create mode 100644 ESPHome/config/spiegel.yaml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5ceb386 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +venv diff --git a/ESPHome/config/.gitignore b/ESPHome/config/.gitignore new file mode 100644 index 0000000..d8b4157 --- /dev/null +++ b/ESPHome/config/.gitignore @@ -0,0 +1,5 @@ +# 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. +/.esphome/ +/secrets.yaml diff --git a/ESPHome/config/common/minir4-local.yaml b/ESPHome/config/common/minir4-local.yaml new file mode 100644 index 0000000..a38a5f9 --- /dev/null +++ b/ESPHome/config/common/minir4-local.yaml @@ -0,0 +1,108 @@ +esphome: + name: ${device_name} + friendly_name: ${friendly_name} + comment: "Sonoff MiniR4 Extreme" + +esp32: + board: esp32dev + framework: + type: esp-idf +# Enable logging +logger: + +# Enable Home Assistant API +api: + encryption: + key: "SHWdMNPDac9CCz0UTRCwvPrc20nzCa/xjDanSw8LVWc=" + +# Over-the-air Update +ota: + - platform: esphome + id: myota + password: ${ota_password} + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password + + # Enable fallback hotspot (captive portal) in case wifi connection fails + ap: + ssid: "${device_name}" + password: ${fallback_wifi_pwd} + +captive_portal: + +web_server: + port: 80 + +sensor: + - platform: wifi_signal + name: ${friendly_name} Wifi Signal Strength + update_interval: 90s + entity_category: "diagnostic" + + - platform: uptime + name: ${friendly_name} Uptime + update_interval: 300s + entity_category: "diagnostic" + +text_sensor: + - platform: wifi_info + ssid: + name: Connected SSID + ip_address: + name: IP Address + dns_address: + name: DNS Address + +status_led: + pin: + number: GPIO19 + inverted: true + +####################################### +# Device specific Config Begins Below # +####################################### + +switch: + - platform: restart + name: ${friendly_name} Restart + +output: + # Physical relay on GPIO + - platform: gpio + pin: GPIO26 + id: relay_1 + +light: + - platform: binary + id: light_1 + name: ${friendly_name} + icon: mdi:ceiling-light-multiple-outline + restore_mode: restore_default_off + output: relay_1 + +binary_sensor: + - platform: gpio + pin: GPIO00 + id: button + filters: + - invert: + - delayed_off: 50ms + on_press: + - light.toggle: + id: light_1 + + - platform: gpio + name: s1 + pin: GPIO27 + id: s1 + filters: + - invert: + - delayed_off: 50ms + on_press: + - light.toggle: + id: light_1 + +bluetooth_proxy: + active: ${bt_proxy} diff --git a/ESPHome/config/common/minir4.yaml b/ESPHome/config/common/minir4.yaml new file mode 100644 index 0000000..50f001d --- /dev/null +++ b/ESPHome/config/common/minir4.yaml @@ -0,0 +1,110 @@ +esphome: + name: ${device_name} + friendly_name: ${friendly_name} + comment: "Sonoff MiniR4 Extreme" + +esp32: + board: esp32dev + framework: + type: esp-idf +# Enable logging +logger: + +# Enable Home Assistant API +api: + encryption: + key: "SHWdMNPDac9CCz0UTRCwvPrc20nzCa/xjDanSw8LVWc=" + +# Over-the-air Update +ota: + - platform: esphome + id: myota + password: ${ota_password} + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password + + # Enable fallback hotspot (captive portal) in case wifi connection fails + ap: + ssid: "${device_name}" + password: ${fallback_wifi_pwd} + +captive_portal: + +web_server: + port: 80 + +sensor: + - platform: wifi_signal + name: ${friendly_name} Wifi Signal Strength + update_interval: 90s + entity_category: "diagnostic" + + - platform: uptime + name: ${friendly_name} Uptime + update_interval: 300s + entity_category: "diagnostic" + +text_sensor: + - platform: wifi_info + ssid: + name: Connected SSID + ip_address: + name: IP Address + dns_address: + name: DNS Address + +status_led: + pin: + number: GPIO19 + inverted: true + +####################################### +# Device specific Config Begins Below # +####################################### + +switch: + - platform: restart + name: ${friendly_name} Restart + +output: + # Physical relay on GPIO + - platform: gpio + pin: GPIO26 + id: relay_1 + +light: + - platform: binary + id: light_1 + name: ${friendly_name} + icon: mdi:ceiling-light-multiple-outline + restore_mode: restore_default_off + output: relay_1 + +binary_sensor: + - platform: gpio + pin: GPIO00 + id: button + filters: + - invert: + - delayed_off: 50ms + on_press: + - light.toggle: + id: light_1 + + - platform: gpio + name: s1 + pin: GPIO27 + id: s1 + filters: + - invert: + - delayed_off: 50ms + on_press: + - homeassistant.service: + service: light.toggle + data: + entity_id: ${light_entity} + +bluetooth_proxy: + active: ${bt_proxy} diff --git a/ESPHome/config/minir4-5.yaml b/ESPHome/config/minir4-5.yaml new file mode 100644 index 0000000..d8f88c9 --- /dev/null +++ b/ESPHome/config/minir4-5.yaml @@ -0,0 +1,15 @@ +substitutions: + device_name: mini-r4-5 + friendly_name: mini-r4-5 + ota_password: "2785ba00e63ab387e8e9fde3f2005eea" + fallback_wifi_pwd: !secret fallback_wifi_pwd + light_entity: light.deckenlampe_treppenhaus + bt_proxy: "true" + +packages: + minir4: !include common/minir4.yaml + +esphome: + on_boot: + - lambda: |- + id(myota).set_auth_password("2785ba00e63ab387e8e9fde3f2005eea"); diff --git a/ESPHome/config/minir4-8.yaml b/ESPHome/config/minir4-8.yaml new file mode 100644 index 0000000..421393a --- /dev/null +++ b/ESPHome/config/minir4-8.yaml @@ -0,0 +1,10 @@ +substitutions: + device_name: mini-r4-8 + friendly_name: mini-r4-8 + ota_password: !secret ota_password + fallback_wifi_pwd: !secret fallback_wifi_pwd + light_entity: light.deckenlampe_treppenhaus + bt_proxy: "true" + +packages: + minir4: !include common/minir4.yaml diff --git a/ESPHome/config/schalter-bar.yaml b/ESPHome/config/schalter-bar.yaml new file mode 100644 index 0000000..3d0d212 --- /dev/null +++ b/ESPHome/config/schalter-bar.yaml @@ -0,0 +1,10 @@ +substitutions: + device_name: schalter-bar + friendly_name: Schalter Bar + ota_password: !secret ota_password + fallback_wifi_pwd: !secret fallback_wifi_pwd + light_entity: light.barlampe + bt_proxy: "false" + +packages: + minir4: !include common/minir4.yaml diff --git a/ESPHome/config/schalter-deckenlampe-th.yaml b/ESPHome/config/schalter-deckenlampe-th.yaml new file mode 100644 index 0000000..bbf4ccf --- /dev/null +++ b/ESPHome/config/schalter-deckenlampe-th.yaml @@ -0,0 +1,10 @@ +substitutions: + device_name: schalter-deckenlampe-th + friendly_name: Schalter Deckenlampe Treppenhaus + ota_password: !secret ota_password + fallback_wifi_pwd: !secret fallback_wifi_pwd + light_entity: light.deckenlampe_treppenhaus + bt_proxy: "false" + +packages: + minir4: !include common/minir4.yaml diff --git a/ESPHome/config/schalter-diele.yaml b/ESPHome/config/schalter-diele.yaml new file mode 100644 index 0000000..c4e13c3 --- /dev/null +++ b/ESPHome/config/schalter-diele.yaml @@ -0,0 +1,10 @@ +substitutions: + device_name: schalter-diele + friendly_name: Schalter Diele + ota_password: !secret ota_password + fallback_wifi_pwd: !secret fallback_wifi_pwd + light_entity: light.deckenlampe_light + bt_proxy: "false" + +packages: + minir4: !include common/minir4.yaml diff --git a/ESPHome/config/schalter-kitchen.yaml b/ESPHome/config/schalter-kitchen.yaml new file mode 100644 index 0000000..dfab913 --- /dev/null +++ b/ESPHome/config/schalter-kitchen.yaml @@ -0,0 +1,10 @@ +substitutions: + device_name: schalter-kitchen + friendly_name: Schalter Küche + ota_password: !secret ota_password + fallback_wifi_pwd: !secret fallback_wifi_pwd + light_entity: light.philips_915005996401_light + bt_proxy: "true" + +packages: + minir4: !include common/minir4.yaml diff --git a/ESPHome/config/schalter-philipps-buero.yaml b/ESPHome/config/schalter-philipps-buero.yaml new file mode 100644 index 0000000..bb7cb38 --- /dev/null +++ b/ESPHome/config/schalter-philipps-buero.yaml @@ -0,0 +1,10 @@ +substitutions: + device_name: schalter-philipps-buero + friendly_name: Schalter Philipps Büro + ota_password: !secret ota_password + fallback_wifi_pwd: !secret fallback_wifi_pwd + light_entity: light.deckenlampe_philipp_s_buro_light_2 + bt_proxy: "false" + +packages: + minir4: !include common/minir4.yaml diff --git a/ESPHome/config/schalter-treppenhaus-eg.yaml b/ESPHome/config/schalter-treppenhaus-eg.yaml new file mode 100644 index 0000000..0e94e13 --- /dev/null +++ b/ESPHome/config/schalter-treppenhaus-eg.yaml @@ -0,0 +1,9 @@ +substitutions: + device_name: schalter-treppenhaus-eg + friendly_name: Treppenhaus EG + ota_password: !secret ota_password + fallback_wifi_pwd: !secret fallback_wifi_pwd + bt_proxy: "false" + +packages: + minir4: !include common/minir4-local.yaml diff --git a/ESPHome/config/spiegel.yaml b/ESPHome/config/spiegel.yaml new file mode 100644 index 0000000..8410ae5 --- /dev/null +++ b/ESPHome/config/spiegel.yaml @@ -0,0 +1,43 @@ +# Basic Config +esphome: + name: spiegel + friendly_name: Spiegel + +esp8266: + board: esp01_1m + +logger: +# Enable Home Assistant API +api: + encryption: + key: "8vthed/+UZgbq4lqrM7D8rVWBK47gYx6pkHVQgDCWSs=" + +ota: + - platform: esphome + password: "1164b87ea7dde095f5240fea51f868c0" + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password + + # Enable fallback hotspot (captive portal) in case wifi connection fails + ap: + ssid: "Spiegel Fallback Hotspot" + password: "bUgByIWOhRHX" + +captive_portal: + +web_server: + port: 80 + +# Device Specific Config +output: + - platform: gpio + pin: GPIO4 + id: shelly_1_relay + +light: + - platform: binary + name: "Spiegel" + output: shelly_1_relay + id: spiegel