Move Rack 2 - start modularizing it.

This commit is contained in:
2022-06-27 07:30:18 -07:00
parent 0c13b0622d
commit 3a66962d34

View File

@@ -1,26 +1,30 @@
substitutions:
device_name: rack-2
dn: rack_2
sn: R2
friendly_name: Rack 2
duct_fan_pin: GPIO13
duct_fan_name: R2 Duct Fan Spd
duct_fan_tgt_spd_in_name: R2 DF Tgt Spd In
duct_fan_tgt_spd_out_name: R2 DF Tgt Spd Out
duct_fan_name: ${sn} Duct Fan Spd
duct_fan_tgt_spd_in_name: ${sn} DF Tgt Spd In
duct_fan_tgt_spd_out_name: ${sn} DF Tgt Spd Out
duct_fan_pwmfreq: 5000Hz
duct_fan_off_spd: "0.0"
duct_fan_lo_spd: "1.0"
duct_fan_vent_spd: "50.0"
duct_fan_hi_spd: "100.0"
wall_fan_pwr_pin: GPIO21
wall_fan_pwr_name: Rack 2 Wall Fan Power
wall_fan_pwr_name: ${friendly_name} Wall Fan Power
wall_fan_spd_pin: GPIO22
wall_fan_spd_pwmfreq: 25000Hz
wall_fan_spd_name: Rack 2 Wall Fan Speed
wall_fan_spd_name: ${friendly_name} Wall Fan Speed
wall_fan_tach_pin: GPIO23
wall_fan_tach_id: wall_fan_tach_id
wall_fan_tach_name: Rack 2 Wall Fan Tach
wall_fan_tach_name: ${friendly_name} Wall Fan Tach
dallas_pin: GPIO32
dallas_in_addr: "0x1D02131D6063AA28"
dallas_in_name: Rack 2 Temp In
dallas_in_name: ${friendly_name} Temp In
dallas_out_addr: "0x1D01143296570128"
dallas_out_name: Rack 2 Temp Out
dallas_out_name: ${friendly_name} Temp Out
dallas_update_interval: 30s
globals:
@@ -37,35 +41,9 @@ globals:
type: float
initial_value: ${duct_fan_hi_spd}
esphome:
name: rack_2
platform: ESP32
board: esp32doit-devkit-v1
wifi:
ssid: "kungle-ot"
password: "ThingsWelcomeToKungle"
manual_ip:
static_ip: 192.168.37.76
gateway: 192.168.37.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Server 2 Fallback Hotspot"
password: "kRzC55vFjigT"
captive_portal:
# Enable logging
logger:
level: DEBUG
# Enable Home Assistant API
api:
ota:
<<: !include .common.yaml
<<: !include .esp32.yaml
<<: !include .wifi-oss.yaml
switch:
- platform: gpio
@@ -197,7 +175,7 @@ number:
climate:
- platform: thermostat
id: thermostat_out_id
name: Rack2 Out
name: ${friendly_name} Out
sensor: dallas_out_id
visual:
min_temperature: 60 °F
@@ -212,13 +190,13 @@ climate:
min_heating_run_time: 60s
min_idle_time: 60s
heat_action:
- logger.log: "Turning off Rack2 Thermostat"
- logger.log: "Turning off ${friendly_name} Thermostat"
- switch.turn_off: thermostat_on_id
idle_action:
- logger.log: "Turning on Rack2 Thermostat"
- logger.log: "Turning on ${friendly_name} Thermostat"
- switch.turn_on: thermostat_on_id
cool_action:
- logger.log: "WARNING: Rack2 Thermostat has hit high temp!"
- logger.log: "WARNING: ${friendly_name} Thermostat has hit high temp!"
- switch.turn_on: thermostat_on_id
#TODO - provide some kind of warning / action here