added HS oben/unten
This commit is contained in:
@@ -7,7 +7,7 @@ esphome:
|
||||
logger:
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
#api:
|
||||
|
||||
ota:
|
||||
password: "dd9d2a5e573d1d0ed1435d5c176b580c"
|
||||
|
||||
177
hs_oben.yaml
Normal file
177
hs_oben.yaml
Normal file
@@ -0,0 +1,177 @@
|
||||
esphome:
|
||||
name: hs_oben
|
||||
platform: ESP32
|
||||
board: esp32dev
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
|
||||
# Enable Home Assistant API
|
||||
#api:
|
||||
|
||||
ota:
|
||||
password: "dd9d2a5e573d1d0ed1435d5c176b580c"
|
||||
|
||||
wifi:
|
||||
ssid: "EasyBox-368239"
|
||||
password: "inginf95"
|
||||
|
||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||
ap:
|
||||
ssid: "HS-Obergeschoss Fallback Hotspot"
|
||||
password: "inginf95"
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
name: "Ventil 1"
|
||||
id: vent1
|
||||
pin: GPIO32
|
||||
inverted: true
|
||||
- platform: gpio
|
||||
name: "Ventil 2"
|
||||
id: vent2
|
||||
pin: GPIO33
|
||||
inverted: true
|
||||
- platform: gpio
|
||||
name: "Ventil 3"
|
||||
id: vent3
|
||||
pin: GPIO25
|
||||
inverted: true
|
||||
- platform: gpio
|
||||
name: "Ventil 4"
|
||||
id: vent4
|
||||
pin: GPIO26
|
||||
inverted: true
|
||||
|
||||
|
||||
mqtt:
|
||||
broker: 192.168.178.76
|
||||
port: 1884
|
||||
username: nils
|
||||
password: inginf95
|
||||
# Reaction to target temperature
|
||||
on_message:
|
||||
- topic: stat/HSObergeschoss/HK1/temperature
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
lambda: 'return (esphome::parse_float(x)) < (id(TargetHK1).state);'
|
||||
then:
|
||||
- logger.log: "Turn on vent 1!"
|
||||
- switch.turn_on: vent1
|
||||
- mqtt.publish:
|
||||
topic: stat/HSObergeschoss/HK1/status
|
||||
payload: "ON"
|
||||
else:
|
||||
- logger.log: "Turn off vent 1!"
|
||||
- switch.turn_off: vent1
|
||||
- mqtt.publish:
|
||||
topic: stat/HSObergeschoss/HK1/status
|
||||
payload: "OFF"
|
||||
- topic: stat/HSObergeschoss/HK2/temperature
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
lambda: 'return (esphome::parse_float(x)) < (id(TargetHK2).state);'
|
||||
then:
|
||||
- logger.log: "Turn on vent 2!"
|
||||
- switch.turn_on: vent2
|
||||
- mqtt.publish:
|
||||
topic: stat/HSObergeschoss/HK2/status
|
||||
payload: "ON"
|
||||
else:
|
||||
- logger.log: "Turn off vent 2!"
|
||||
- switch.turn_off: vent2
|
||||
- mqtt.publish:
|
||||
topic: stat/HSObergeschoss/HK2/status
|
||||
payload: "OFF"
|
||||
- topic: stat/HSObergeschoss/HK3/temperature
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
lambda: 'return (esphome::parse_float(x)) < (id(TargetHK3).state);'
|
||||
then:
|
||||
- logger.log: "Turn on vent 3!"
|
||||
- switch.turn_on: vent3
|
||||
- mqtt.publish:
|
||||
topic: stat/HSObergeschoss/HK3/status
|
||||
payload: "ON"
|
||||
else:
|
||||
- logger.log: "Turn off vent 3!"
|
||||
- switch.turn_off: vent3
|
||||
- mqtt.publish:
|
||||
topic: stat/HSObergeschoss/HK3/status
|
||||
payload: "OFF"
|
||||
- topic: stat/HSObergeschoss/HK4/temperature
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
lambda: 'return (esphome::parse_float(x)) < (id(TargetHK4).state);'
|
||||
then:
|
||||
- logger.log: "Turn on vent 4!"
|
||||
- switch.turn_on: vent4
|
||||
- mqtt.publish:
|
||||
topic: stat/HSObergeschoss/HK4/status
|
||||
payload: "ON"
|
||||
else:
|
||||
- logger.log: "Turn off vent 4!"
|
||||
- switch.turn_off: vent4
|
||||
- mqtt.publish:
|
||||
topic: stat/HSObergeschoss/HK4/status
|
||||
payload: "OFF"
|
||||
|
||||
|
||||
sensor:
|
||||
# Current Temperatures
|
||||
- platform: mqtt_subscribe
|
||||
name: "Current HK1"
|
||||
id: CurrentHK1
|
||||
topic: stat/HSObergeschoss/HK1/temperature
|
||||
- platform: mqtt_subscribe
|
||||
name: "Current HK2"
|
||||
id: CurrentHK2
|
||||
topic: stat/HSObergeschoss/HK2/temperature
|
||||
- platform: mqtt_subscribe
|
||||
name: "Current HK3"
|
||||
id: CurrentHK3
|
||||
topic: stat/HSObergeschoss/HK3/temperature
|
||||
- platform: mqtt_subscribe
|
||||
name: "Current HK4"
|
||||
id: CurrentHK4
|
||||
topic: stat/HSObergeschoss/HK4/temperature
|
||||
|
||||
# Target Temperatures
|
||||
- platform: mqtt_subscribe
|
||||
name: "Target HK1"
|
||||
id: TargetHK1
|
||||
topic: stat/HSObergeschoss/HK1/target_temperature
|
||||
- platform: mqtt_subscribe
|
||||
name: "Target HK2"
|
||||
id: TargetHK2
|
||||
topic: stat/HSObergeschoss/HK2/target_temperature
|
||||
- platform: mqtt_subscribe
|
||||
name: "Target HK3"
|
||||
id: TargetHK3
|
||||
topic: stat/HSObergeschoss/HK3/target_temperature
|
||||
- platform: mqtt_subscribe
|
||||
name: "Target HK4"
|
||||
id: TargetHK4
|
||||
topic: stat/HSObergeschoss/HK4/target_temperature
|
||||
|
||||
|
||||
|
||||
- platform: wifi_signal
|
||||
name: "WiFi Signal Sensor"
|
||||
update_interval: 60s
|
||||
- platform: uptime
|
||||
name: Uptime Sensor
|
||||
|
||||
|
||||
web_server:
|
||||
port: 80
|
||||
auth:
|
||||
username: nils
|
||||
password: inginf95
|
||||
|
||||
|
||||
captive_portal:
|
||||
178
hs_unten.yaml
Normal file
178
hs_unten.yaml
Normal file
@@ -0,0 +1,178 @@
|
||||
esphome:
|
||||
name: hs_unten
|
||||
platform: ESP32
|
||||
board: esp32dev
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
|
||||
# Enable Home Assistant API
|
||||
#api:
|
||||
|
||||
ota:
|
||||
password: "dd9d2a5e573d1d0ed1435d5c176b580c"
|
||||
|
||||
wifi:
|
||||
ssid: "EasyBox-368239_WZ"
|
||||
password: "inginf95"
|
||||
|
||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||
ap:
|
||||
ssid: "HS-Erdgeschoss Fallback Hotspot"
|
||||
password: "inginf95"
|
||||
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
name: "Ventil 1"
|
||||
id: vent1
|
||||
pin: GPIO32
|
||||
inverted: true
|
||||
- platform: gpio
|
||||
name: "Ventil 2"
|
||||
id: vent2
|
||||
pin: GPIO33
|
||||
inverted: true
|
||||
- platform: gpio
|
||||
name: "Ventil 3"
|
||||
id: vent3
|
||||
pin: GPIO25
|
||||
inverted: true
|
||||
- platform: gpio
|
||||
name: "Ventil 4"
|
||||
id: vent4
|
||||
pin: GPIO26
|
||||
inverted: true
|
||||
|
||||
|
||||
mqtt:
|
||||
broker: 192.168.178.76
|
||||
port: 1884
|
||||
username: nils
|
||||
password: inginf95
|
||||
# Reaction to target temperature
|
||||
on_message:
|
||||
- topic: stat/HSErdgeschoss/HK1/temperature
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
lambda: 'return (esphome::parse_float(x)) < (id(TargetHK1).state);'
|
||||
then:
|
||||
- logger.log: "Turn on vent 1!"
|
||||
- switch.turn_on: vent1
|
||||
- mqtt.publish:
|
||||
topic: stat/HSErdgeschoss/HK1/status
|
||||
payload: "ON"
|
||||
else:
|
||||
- logger.log: "Turn off vent 1!"
|
||||
- switch.turn_off: vent1
|
||||
- mqtt.publish:
|
||||
topic: stat/HSErdgeschoss/HK1/status
|
||||
payload: "OFF"
|
||||
- topic: stat/HSErdgeschoss/HK2/temperature
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
lambda: 'return (esphome::parse_float(x)) < (id(TargetHK2).state);'
|
||||
then:
|
||||
- logger.log: "Turn on vent 2!"
|
||||
- switch.turn_on: vent2
|
||||
- mqtt.publish:
|
||||
topic: stat/HSErdgeschoss/HK2/status
|
||||
payload: "ON"
|
||||
else:
|
||||
- logger.log: "Turn off vent 2!"
|
||||
- switch.turn_off: vent2
|
||||
- mqtt.publish:
|
||||
topic: stat/HSErdgeschoss/HK2/status
|
||||
payload: "OFF"
|
||||
- topic: stat/HSErdgeschoss/HK3/temperature
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
lambda: 'return (esphome::parse_float(x)) < (id(TargetHK3).state);'
|
||||
then:
|
||||
- logger.log: "Turn on vent 3!"
|
||||
- switch.turn_on: vent3
|
||||
- mqtt.publish:
|
||||
topic: stat/HSErdgeschoss/HK3/status
|
||||
payload: "ON"
|
||||
else:
|
||||
- logger.log: "Turn off vent 3!"
|
||||
- switch.turn_off: vent3
|
||||
- mqtt.publish:
|
||||
topic: stat/HSErdgeschoss/HK3/status
|
||||
payload: "OFF"
|
||||
- topic: stat/HSErdgeschoss/HK4/temperature
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
lambda: 'return (esphome::parse_float(x)) < (id(TargetHK4).state);'
|
||||
then:
|
||||
- logger.log: "Turn on vent 4!"
|
||||
- switch.turn_on: vent4
|
||||
- mqtt.publish:
|
||||
topic: stat/HSErdgeschoss/HK4/status
|
||||
payload: "ON"
|
||||
else:
|
||||
- logger.log: "Turn off vent 4!"
|
||||
- switch.turn_off: vent4
|
||||
- mqtt.publish:
|
||||
topic: stat/HSErdgeschoss/HK4/status
|
||||
payload: "OFF"
|
||||
|
||||
|
||||
sensor:
|
||||
# Current Temperatures
|
||||
- platform: mqtt_subscribe
|
||||
name: "Current HK1"
|
||||
id: CurrentHK1
|
||||
topic: stat/HSErdgeschoss/HK1/temperature
|
||||
- platform: mqtt_subscribe
|
||||
name: "Current HK2"
|
||||
id: CurrentHK2
|
||||
topic: stat/HSErdgeschoss/HK2/temperature
|
||||
- platform: mqtt_subscribe
|
||||
name: "Current HK3"
|
||||
id: CurrentHK3
|
||||
topic: stat/HSErdgeschoss/HK3/temperature
|
||||
- platform: mqtt_subscribe
|
||||
name: "Current HK4"
|
||||
id: CurrentHK4
|
||||
topic: stat/HSErdgeschoss/HK4/temperature
|
||||
|
||||
# Target Temperatures
|
||||
- platform: mqtt_subscribe
|
||||
name: "Target HK1"
|
||||
id: TargetHK1
|
||||
topic: stat/HSErdgeschoss/HK1/target_temperature
|
||||
- platform: mqtt_subscribe
|
||||
name: "Target HK2"
|
||||
id: TargetHK2
|
||||
topic: stat/HSErdgeschoss/HK2/target_temperature
|
||||
- platform: mqtt_subscribe
|
||||
name: "Target HK3"
|
||||
id: TargetHK3
|
||||
topic: stat/HSErdgeschoss/HK3/target_temperature
|
||||
- platform: mqtt_subscribe
|
||||
name: "Target HK4"
|
||||
id: TargetHK4
|
||||
topic: stat/HSErdgeschoss/HK4/target_temperature
|
||||
|
||||
|
||||
|
||||
- platform: wifi_signal
|
||||
name: "WiFi Signal Sensor"
|
||||
update_interval: 60s
|
||||
- platform: uptime
|
||||
name: Uptime Sensor
|
||||
|
||||
|
||||
web_server:
|
||||
port: 80
|
||||
auth:
|
||||
username: nils
|
||||
password: inginf95
|
||||
|
||||
|
||||
captive_portal:
|
||||
Reference in New Issue
Block a user