Smart Thermostat
#hw_project #done
Motivated by rising energy prices I wanted to switch from a standard thermostat to a smart (but cheap) solution using Home Assistant, zigbee temperature sensors and wifi relay for controlling the gas boiler. In the following text I describe the system components and the setup process.
Additionally, I checked the connections after step 3 using the CC2531 pinout chart:
Sources:
yaourt -Sy home-assistant rust
systemctl enable --now home-assistant.service
sudo vim /boot/config.txt # disable wifi and bluetooth to mitigate wifi/zigbee interference
sudo gpasswd -a hass uucp # hass user must have access to /dev/ttyACM0
This is possible through the ZHA integration, which is available out-of-the-box in HASS. This way I was able to add my smart lights and crucially the thermometers.
To allow remote access to my home assistant, I wanted to use reverse proxy. This way allows me to access HASS through https easily (using Lets encrypt certificate)
connect USB-to-TTL to ESP01 using this chart: (note that RX->TX and TX->RX, one can easily mix it up with this chart)l
I had a malfunctioning ESP01 and it didn't see my home wifi. I tried flashing the latest Espressif firmware
I ordered another one and it works perfectly.
Flashing ESPHome to ESP01-S:
Install ESPHome manually: https://esphome.io/guides/installing_esphome.html
$ pip install esphome
boiler.yaml
. In the wizard select the esp01_1m
board$ esphome wizard boiler.yaml
GPIO0
to boiler.yaml
:switch:
- platform: gpio
name: "Relay"
pin: GPIO0
$ esphome run boiler.yaml