Add ESPhome
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
venv
|
||||||
5
ESPHome/config/.gitignore
vendored
Normal file
5
ESPHome/config/.gitignore
vendored
Normal file
@@ -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
|
||||||
108
ESPHome/config/common/minir4-local.yaml
Normal file
108
ESPHome/config/common/minir4-local.yaml
Normal file
@@ -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}
|
||||||
110
ESPHome/config/common/minir4.yaml
Normal file
110
ESPHome/config/common/minir4.yaml
Normal file
@@ -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}
|
||||||
15
ESPHome/config/minir4-5.yaml
Normal file
15
ESPHome/config/minir4-5.yaml
Normal file
@@ -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");
|
||||||
10
ESPHome/config/minir4-8.yaml
Normal file
10
ESPHome/config/minir4-8.yaml
Normal file
@@ -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
|
||||||
10
ESPHome/config/schalter-bar.yaml
Normal file
10
ESPHome/config/schalter-bar.yaml
Normal file
@@ -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
|
||||||
10
ESPHome/config/schalter-deckenlampe-th.yaml
Normal file
10
ESPHome/config/schalter-deckenlampe-th.yaml
Normal file
@@ -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
|
||||||
10
ESPHome/config/schalter-diele.yaml
Normal file
10
ESPHome/config/schalter-diele.yaml
Normal file
@@ -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
|
||||||
10
ESPHome/config/schalter-kitchen.yaml
Normal file
10
ESPHome/config/schalter-kitchen.yaml
Normal file
@@ -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
|
||||||
10
ESPHome/config/schalter-philipps-buero.yaml
Normal file
10
ESPHome/config/schalter-philipps-buero.yaml
Normal file
@@ -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
|
||||||
9
ESPHome/config/schalter-treppenhaus-eg.yaml
Normal file
9
ESPHome/config/schalter-treppenhaus-eg.yaml
Normal file
@@ -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
|
||||||
43
ESPHome/config/spiegel.yaml
Normal file
43
ESPHome/config/spiegel.yaml
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user