Note on Thermostats: I’ve used 2 types of thermostats in my heating system. The Tuya Thermosats make physical on wall controls to display and adjust temperature. But also Home Assitant has a Generic Thermostat component to combine any smart switch with any temperature sensor, these virtual thermostats are only accessable through the GUI on web browser or mobile app.
Note on Tuya Devices: Initially when I was buying these devices, I seen that they used the MQTT protocol and I thought it would be a simple process to integrate with Home Assistant using this protocol for local control, but I was wrong. Home Asssitant does natively support Tuya devices but uses Tuya’s API which still depends on the cloud. Luckly there was a solution thanks to Google, I found 2 projects Tuya Convert and Tuya Local. Tuya Convert which aims to replace the devices firmware would not work with some of my devices, due to not having the nessacery firmwares, so I went with Tuya Local which works with the stock firmware, by spoofing the Tuya devices into connecting to my local Home Assitant server instead of the cloud.
Tuya Local requires getting some details from the devices and the process is not excatly straight forward as it involves setting up a Tuya Developer account, I’ll not go into too much detail, so here is a link: Linking a Tuya device with Smart Link. I also needed a file climate.py from this repo to make the thermostat work.
Note on smart switches in general: The great thing about Home Assistant is it is hardware agnostic, which means it can work with almost any hardware. In theory that sounds great, but its not always that simple, its worth researching what others have working before purchasing. I’ve used 3 types of off the shelf devices in the house and around the yard.
Tuya: Are nice cheap devices made by a variety of manufactures but all using the same IOT platform, the variety of device types is massive. These work out of the box with their cloud API which is fine for lots of automations but not recommended for critical scheduled operations such as central heating. The Tuya Local project solved this issue for me but was fidley especcially for the thermostats.
Sonoff: Again these are nice cheap devices, there is less veriety of device types compared to Tuya, mostly smart relays and wall switches. These do not work out off the box with Home Assistant but there are a number of third party addons called custom components available. However they have a local mode by default meaning once you install the custom component they work without needing cloud access.
Shelly: These devices have the least variety but are designed from the ground up to be adapted and integrated by DIYers. They have a built in web interface and can be integrated in a number of ways including MQTT and HTTP commands. They also have their own optional cloud service with API. The manufacturer has provided all of the documentation required to work with them including reflashing them with custom firmwares.
Sonoff, Shelly and most Tuya devices use the same ESP chips and can be flashed with custome firmware such as Tasmota to allow easy integration into any system which supports MQTT. Sonoff’s are really well unoffically documented online on procedures to flash, Tuya devices are a bit harded with some devices using different unknown chips and Shelly actively encourage customization.
Facebook Comments