using 2 esp32s for thermostat system
This commit is contained in:
parent
db0b5bf77d
commit
c063bac416
3 changed files with 134 additions and 107 deletions
63
hvac.yml
Normal file
63
hvac.yml
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
esphome:
|
||||||
|
name: hvac
|
||||||
|
|
||||||
|
esp32:
|
||||||
|
board: nodemcu-32s
|
||||||
|
framework:
|
||||||
|
type: arduino
|
||||||
|
|
||||||
|
# Enable logging
|
||||||
|
logger:
|
||||||
|
|
||||||
|
# Enable Home Assistant API
|
||||||
|
api:
|
||||||
|
password: ""
|
||||||
|
|
||||||
|
ota:
|
||||||
|
- platform: esphome
|
||||||
|
password: ""
|
||||||
|
|
||||||
|
wifi:
|
||||||
|
ssid: "Cochrun"
|
||||||
|
password: "GreasyChicken784"
|
||||||
|
|
||||||
|
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||||
|
ap:
|
||||||
|
ssid: "Kitchen Fallback Hotspot"
|
||||||
|
password: "RUfAhbEfZmOU"
|
||||||
|
|
||||||
|
captive_portal:
|
||||||
|
|
||||||
|
switch:
|
||||||
|
- platform: gpio
|
||||||
|
name: heat
|
||||||
|
pin:
|
||||||
|
number: 0
|
||||||
|
mode:
|
||||||
|
output: true
|
||||||
|
input: false
|
||||||
|
inverted: false
|
||||||
|
id: heater
|
||||||
|
restore_mode: RESTORE_DEFAULT_OFF
|
||||||
|
- platform: gpio
|
||||||
|
name: ac
|
||||||
|
pin:
|
||||||
|
number: 4
|
||||||
|
mode:
|
||||||
|
output: true
|
||||||
|
input: false
|
||||||
|
open_drain: false
|
||||||
|
inverted: false
|
||||||
|
id: ac
|
||||||
|
restore_mode: RESTORE_DEFAULT_OFF
|
||||||
|
- platform: gpio
|
||||||
|
name: fan
|
||||||
|
pin:
|
||||||
|
number: 16
|
||||||
|
mode:
|
||||||
|
output: true
|
||||||
|
input: false
|
||||||
|
open_drain: false
|
||||||
|
inverted: false
|
||||||
|
id: fan
|
||||||
|
restore_mode: RESTORE_DEFAULT_OFF
|
59
relay.yml
Normal file
59
relay.yml
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
esphome:
|
||||||
|
name: relay-test
|
||||||
|
|
||||||
|
esp32:
|
||||||
|
board: nodemcu-32s
|
||||||
|
framework:
|
||||||
|
type: arduino
|
||||||
|
|
||||||
|
# Enable logging
|
||||||
|
logger:
|
||||||
|
|
||||||
|
ota:
|
||||||
|
- platform: esphome
|
||||||
|
password: ""
|
||||||
|
|
||||||
|
wifi:
|
||||||
|
ssid: "Cochrun"
|
||||||
|
password: "GreasyChicken784"
|
||||||
|
|
||||||
|
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||||
|
ap:
|
||||||
|
ssid: "Kitchen Fallback Hotspot"
|
||||||
|
password: "RUfAhbEfZmOU"
|
||||||
|
|
||||||
|
api:
|
||||||
|
password: ""
|
||||||
|
|
||||||
|
captive_portal:
|
||||||
|
|
||||||
|
switch:
|
||||||
|
- platform: gpio
|
||||||
|
name: heat
|
||||||
|
pin:
|
||||||
|
number: 0
|
||||||
|
mode:
|
||||||
|
output: true
|
||||||
|
input: false
|
||||||
|
inverted: false
|
||||||
|
id: heater
|
||||||
|
- platform: gpio
|
||||||
|
name: cool
|
||||||
|
pin:
|
||||||
|
number: 4
|
||||||
|
mode:
|
||||||
|
output: true
|
||||||
|
input: false
|
||||||
|
open_drain: false
|
||||||
|
inverted: false
|
||||||
|
id: ac
|
||||||
|
- platform: gpio
|
||||||
|
name: fan
|
||||||
|
pin:
|
||||||
|
number: 16
|
||||||
|
mode:
|
||||||
|
output: true
|
||||||
|
input: false
|
||||||
|
open_drain: false
|
||||||
|
inverted: false
|
||||||
|
id: fan
|
119
thermostat.yml
119
thermostat.yml
|
@ -61,9 +61,6 @@ wifi:
|
||||||
password: "GreasyChicken784"
|
password: "GreasyChicken784"
|
||||||
power_save_mode: none
|
power_save_mode: none
|
||||||
reboot_timeout: 10s
|
reboot_timeout: 10s
|
||||||
# output_power: 20.5dB
|
|
||||||
# enable_btm: true
|
|
||||||
# enable_rrm: true
|
|
||||||
manual_ip:
|
manual_ip:
|
||||||
static_ip: 192.168.1.123
|
static_ip: 192.168.1.123
|
||||||
gateway: 192.168.1.1
|
gateway: 192.168.1.1
|
||||||
|
@ -72,19 +69,12 @@ wifi:
|
||||||
# ssid: "TFC"
|
# ssid: "TFC"
|
||||||
# password: "Disciple77"
|
# password: "Disciple77"
|
||||||
|
|
||||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
|
||||||
ap:
|
ap:
|
||||||
ssid: "Thermostat Fallback Hotspot"
|
ssid: "Thermostat Fallback Hotspot"
|
||||||
password: "RUfAhbEfZmOU"
|
password: "RUfAhbEfZmOU"
|
||||||
|
|
||||||
captive_portal:
|
captive_portal:
|
||||||
|
|
||||||
# external_components:
|
|
||||||
# # replace 1234 with the number of the Pull Request
|
|
||||||
# - source: github://pr#5198
|
|
||||||
# components:
|
|
||||||
# # list all components modified by this Pull Request here
|
|
||||||
# - aht10
|
|
||||||
i2c:
|
i2c:
|
||||||
- id: bus_a
|
- id: bus_a
|
||||||
sda: GPIO08
|
sda: GPIO08
|
||||||
|
@ -92,11 +82,6 @@ i2c:
|
||||||
scan: True
|
scan: True
|
||||||
frequency: 400kHz
|
frequency: 400kHz
|
||||||
|
|
||||||
# uart:
|
|
||||||
# tx_pin: GPIO27
|
|
||||||
# rx_pin: GPIO26
|
|
||||||
# baud_rate: 115200
|
|
||||||
|
|
||||||
time:
|
time:
|
||||||
- platform: homeassistant
|
- platform: homeassistant
|
||||||
id: hass_time
|
id: hass_time
|
||||||
|
@ -110,15 +95,6 @@ time:
|
||||||
return time.strftime("%a %m/%d/%y %I:%M");
|
return time.strftime("%a %m/%d/%y %I:%M");
|
||||||
# - script.execute: update_date_time_label
|
# - script.execute: update_date_time_label
|
||||||
sensor:
|
sensor:
|
||||||
# - platform: aht10
|
|
||||||
# variant: AHT20
|
|
||||||
# temperature:
|
|
||||||
# name: "Temperature"
|
|
||||||
# id: temperature
|
|
||||||
# humidity:
|
|
||||||
# name: "Humidity"
|
|
||||||
# id: humidity
|
|
||||||
# address: 0x66
|
|
||||||
- platform: bme280_i2c
|
- platform: bme280_i2c
|
||||||
temperature:
|
temperature:
|
||||||
name: "Temperature"
|
name: "Temperature"
|
||||||
|
@ -139,94 +115,17 @@ sensor:
|
||||||
name: "Pressure"
|
name: "Pressure"
|
||||||
id: pressure
|
id: pressure
|
||||||
address: 0x76
|
address: 0x76
|
||||||
# dfrobot_sen0395:
|
|
||||||
|
|
||||||
# binary_sensor:
|
|
||||||
# # Information coming from uart bus
|
|
||||||
# - platform: dfrobot_sen0395
|
|
||||||
# id: mmwave_uart
|
|
||||||
# name: Mmwave UART
|
|
||||||
|
|
||||||
# # on_...:
|
|
||||||
# # - dfrobot_sen0395.settings:
|
|
||||||
# # factory_reset: true
|
|
||||||
# # detection_segments:
|
|
||||||
# # # Define between one and four segments
|
|
||||||
# # - [0cm, 3m]
|
|
||||||
# # - [5.1m, 6.6m]
|
|
||||||
# # output_latency:
|
|
||||||
# # delay_after_detect: 0s
|
|
||||||
# # delay_after_disappear: 0s
|
|
||||||
# # sensitivity: 7
|
|
||||||
|
|
||||||
# # Information coming from dedicated gpio (IO2)
|
|
||||||
# - platform: gpio
|
|
||||||
# name: Mmwave GPIO
|
|
||||||
# device_class: motion
|
|
||||||
# pin:
|
|
||||||
# number: GPIO25
|
|
||||||
# mode: INPUT_PULLDOWN
|
|
||||||
|
|
||||||
switch:
|
switch:
|
||||||
- platform: gpio
|
- platform: homeassistant
|
||||||
pin:
|
|
||||||
ch422g:
|
|
||||||
number: 5
|
|
||||||
mode:
|
|
||||||
output: true
|
|
||||||
input: false
|
|
||||||
inverted: true
|
|
||||||
id: heater
|
id: heater
|
||||||
restore_mode: ALWAYS_OFF
|
entity_id: switch.hvac_heat
|
||||||
- platform: gpio
|
- platform: homeassistant
|
||||||
pin:
|
|
||||||
ch422g:
|
|
||||||
number: 8
|
|
||||||
mode:
|
|
||||||
output: true
|
|
||||||
input: false
|
|
||||||
open_drain: false
|
|
||||||
inverted: true
|
|
||||||
id: ac
|
id: ac
|
||||||
restore_mode: ALWAYS_OFF
|
entity_id: switch.hvac_ac
|
||||||
- platform: gpio
|
- platform: homeassistant
|
||||||
pin:
|
|
||||||
ch422g:
|
|
||||||
number: 9
|
|
||||||
mode:
|
|
||||||
output: true
|
|
||||||
input: false
|
|
||||||
open_drain: false
|
|
||||||
inverted: true
|
|
||||||
id: fan
|
id: fan
|
||||||
restore_mode: ALWAYS_OFF
|
entity_id: switch.hvac_fan
|
||||||
|
|
||||||
# button:
|
|
||||||
# - platform: template
|
|
||||||
# id: inner_button
|
|
||||||
# on_press:
|
|
||||||
# - dfrobot_sen0395.settings:
|
|
||||||
# sensitivity: !lambda |-
|
|
||||||
# return id(sensitivity).state - 1;
|
|
||||||
|
|
||||||
# - platform: template
|
|
||||||
# id: inner_distance
|
|
||||||
# on_press:
|
|
||||||
# - dfrobot_sen0395.settings:
|
|
||||||
# detection_segments:
|
|
||||||
# - [0cm, 3.3m]
|
|
||||||
|
|
||||||
# - platform: template
|
|
||||||
# id: distance
|
|
||||||
# name: Mmwave distance
|
|
||||||
# optimistic: true
|
|
||||||
# min_value: 0.0
|
|
||||||
# max_value: 9.0
|
|
||||||
# step: 0.1
|
|
||||||
# mode: slider
|
|
||||||
# set_action:
|
|
||||||
# - button.press:
|
|
||||||
# id: inner_distance
|
|
||||||
|
|
||||||
climate:
|
climate:
|
||||||
- platform: thermostat
|
- platform: thermostat
|
||||||
|
@ -254,12 +153,18 @@ climate:
|
||||||
- switch.turn_off: heater
|
- switch.turn_off: heater
|
||||||
- switch.turn_off: fan
|
- switch.turn_off: fan
|
||||||
fan_only_action:
|
fan_only_action:
|
||||||
|
- switch.turn_off: ac
|
||||||
|
- switch.turn_off: heater
|
||||||
|
- switch.turn_on: fan
|
||||||
- lambda: !lambda ESP_LOGD("fan", "DA FAN");
|
- lambda: !lambda ESP_LOGD("fan", "DA FAN");
|
||||||
default_preset: Home
|
default_preset: Home
|
||||||
preset:
|
preset:
|
||||||
- name: Home
|
- name: Home
|
||||||
default_target_temperature_low: 67 °F
|
default_target_temperature_low: 67 °F
|
||||||
default_target_temperature_high: 78 °F
|
default_target_temperature_high: 78 °F
|
||||||
|
- name: Away
|
||||||
|
default_target_temperature_low: 60 °F
|
||||||
|
default_target_temperature_high: 85 °F
|
||||||
on_state:
|
on_state:
|
||||||
then:
|
then:
|
||||||
- if:
|
- if:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue