Following on from my previous post, I had a working central heating set up using home assistant as my thermostat but it was early days and I still wasn't fully confident in my hastily jury-rigged solution so I wanted to see how I can make the old Hive system still useful, at least as a back-up.
I was aware that Hive hardware used Zigbee as their protocol, but I didn't really know much about it besides it's favoured by Philips Hue and Ikea hardware, neither of which I had in my home having long ago defaulted onto wifi as the protocol of choice.
Learning more about Zigbee I came to understand that it's based on a mesh radio standard and isn't built on the TCP/IP stack so doesn't have native IP connectivity. This was music to my ears, as I have worked hard to restrict the network access of my wifi devices, so it was curious to read that the successor to Zigbee called "Thread" was specifically designed to make IP interoperability easier, which seems to be going in the wrong direction from where I'm standard but I'm probably not your average smart home consumer.
I am perhaps late to the party but I figured zigbee still has a future ahead of it so I decided to get onboard and set myself up a zigbee network. Online randos recommended the SMLight SLZB-06 Zigbee controller, which I picked up from AliExpress for £28. I also ordered a Sonoff S60ZBTPF socket, so I had something to test it out with and hopefully begin swapping out some of the older, more cloudy wifi sockets I have.
The controller supports two integration options, zigbee2mqtt and ZHA, I went with MQTT since I am familiar with it, already have a broker set up and all indications suggested it was the more mature system of the two and reliability is critical for Zigbee networks.
Setting up the chain from the controller to home assistant wasn't entirely pain free (where would be the fun if it was?) but eventually I plugged in my Sonoff socket, clicked the allow join button and waited, it quickly appeared on the z2m dashboard and we were in business! Like magic it also appears in Home Assistant without any futher intervention and with a click of the house the relay clicks next to me like the sign of a job well done!
Hive via Zigbee
Now I was ready with my new Zigbee-powered Home Assistant system, I looked again at the Hive thermostat. I read online I should factory reset the thermostat and reset the main unit to pairing mode which I did and again permitting devices to join my Zigbee network they popped up on the dashboard along with a large array of exposed variables. The fact that connecting both the receiver and the thermostat to my own network was quick and painless supported my suspcions the problem was either with the Hive bridge or the cloud, but since the bridge clearly mostly works I'm still leaning on the latter.
I quickly learned that the Hive app hides a huge amount of complexity as the hardware itself exposes lots of vaguely named options but fortunately I found the Zigbee2MQTT project provides detailed documentation about a large range of supported hardware including my Hive system.
I later performed a reset on a Hive TRV I also have, and this joined the network too without complaint. I was surprised that for something that is basically just a valve, the TRV firmware is incredibly complex with pages of options to configure. This led me onto making one of my first new automations:-
alias: Send temperature to radiator
description: ""
triggers:
- trigger: state
entity_id:
- sensor.0xa4c138614eaabb81_temperature
conditions: []
actions:
- action: number.set_value
metadata: {}
target:
entity_id: number.0xb0c7defffeab35fc_external_measured_room_sensor
data:
value: >
{{ (states('sensor.0xa4c138614eaabb81_temperature') |
float(default=19.0) * 100) | int }}
mode: single
The TRV sits on the radiator inlet which is behind a radiator cover so the built-in thermostat says nothing of the room temperature. I was able to tell the TRV to ignore its own reading and this automation in home assistant now updates the TRV with a temperature reading received from elsewhere in the room, further away from the source of heat.
Climate sensors
This posed another quandry, which termostat should I use to provide a reasonably accurate reading? I did already have 4 cheap Xiaomi LYWSD03MMC which I picked up for a song a few years ago and since then just used them for offline readings.
I had recently got them talking to home assistant using their bluetooth LE signals, picked up by a network of ESP32's I deployed acting as bluetooth proxies due to the short range. During this project I found an alternative firmware called ATC and this improved the Home Assistant compatibility by changing the broadcast format to the open BT Home standard rather than the Xiaomi proprietary one. I later found that the same author released a beta firmware that converted them from bluetooth to Zigbee! This meant I could ditch the bluetooth proxies and rely on my Zigbee mesh network to pick up the signals.
I realised that because I have good thermometer coverage I could combine them using a home assistant helper to provide a mean average and use this as the reading for my thermostat rather than relying on one sensor that might be in an unusually warm/cold spot. Since setting this up now there has been a noticable improvement in the quality of life around the house, I haven't had much need to complain it's too hot or too cold like we always used to.
Back to the boiler relay
Finally, I was seeing regular wifi drop-outs from the Shelly relay running the boiler in the logs. This wasn't surprising because it's in a very RF noisy environment, well shielded from the main access point. I figured it would make sense to migrate this to Zigbee also as it is only a couple of feet from from one of many zigbee repeaters I now have set up.
After a review of my options I decided I was best upgrading from the Shelly One gen1 to a Shelly One Mini gen4, the latest generation now supports Zigbee through an alternative firmware provided by Shelly. I ordered the device and swapped them out. Since bringing it online with Zigbee I've seen none of the dreaded availability issues with the boiler relay, its been rock solid.
This is still only scratching the surface of my recent Zigbee adventures but since this post is getting a bit long I'll save the rest for another follow up soon.