roadsnail / Pi-ve

Raspberry Pi Zero W Controls Hive SLR/SLT using Zigbee and Wifi networks- A Standalone Heating/Hot water Control solution without the British Gas Cloud
GNU General Public License v3.0
33 stars 1 forks source link

Problem with hysteresis, or the lack thereof. #8

Open oldblokeh opened 8 months ago

oldblokeh commented 8 months ago

Pi-ve contains some great functionality, thank you for all the time and effort. One issue that has raised its head is the lack of any control over hysteresis. It seems that, when left with a temperature setpoint to maintain, the SLR2C and SLT keep turning demand on and off far too often. It seems that if the SLT sensor momentarily reports temperature below the setpoint it will call for heat. A minute or two later it will turn it off again, without any radiator becoming warm. This is inefficient use of the boiler and pump. It would be good to have a configurable hysteresis parameter to eliminate this useless cycling. I'm not sure how this would be achieved, since it looks like setpoint temperature is only adjustable in increments of 0.5 degrees. Any ideas?

roadsnail commented 8 months ago

@oldblokeh . Hi and thanks for your comment.

This will probably ramble on a bit, but you ask for my ideas :) which will involve a bit of background to my Pi-ve project and where I am today with my own take on this issue.

I originally put the Pi-ve node-red flow together to allow me to use my Hive system without any reliance on the Hive (BG) cloud infrastructure. Previously I had controlled my CH/HW from my Domoticz based home automation efforts using Hive's undocumented APIs discovered and published by a fellow Domoticz user. After BG changed these without notice on two occasions, (which they were quite entitled to do so to be fair), I decided to look for another solution which moved away from their infrastructure.

I had already started to use node-red with MQTT with my existing Domoticz platform and noticed that the Hive SLR/SLT had just been added to the Zigbee2mqtt (Z2M) controller support list. Although support appeared to exist in Z2M (for Hive) I found little evidence that anyone had got anything working via MQTT (without issues). Lot of tinkering enabled me to switch CH/HW on and off, set up a heating setpoint, detect CH/HW running state thus giving me the foundation of the Pi-ve project. I added the scheduling flows for CH/HW and decided to publish what I had in case anyone else wanted to go the same route (ie. break away from the BG cloud dependency while keeping their Hive infrastructure).

Meanwhile I used it (the Pi-ve project running on a standalone Pi Zero) myself as a subsystem of my Domoticz setup thus breaking my dependence on the BG cloud but losing remote connectivity via the Hive App. (That issue I would address at a later date but that's a different story).

I'd had also decided to 'zone' my home heating such that every room would become a thermostatically (in Domoticz) controlled temperature zone. This involved installing lots of thermometers around my home in each room as Hive in itself would only give me the temperature wherever the SLC was located. (Incidentally and rather interestingly I discovered that my SLC thermostat was a little inaccurate and would take forever to react to heat changes which in itself should provide hysteresis).

Initially I played with little ESP8266 controllers/thermocouples connecting back to Domoticz via WiFi, but eventually adopted the Xiaomi LYWSD03MMC bluetooth thermometer with modified firmware https://github.com/atc1441/ATC_MiThermometer (connecting via BT to MQTT).

Once I started coding the zoning solution I then only used Pi-ve as a switch for my boiler CH and HW as the CH/HW scheduling functionality was all carried out in Domoticz. I switched CH by setting the CH Setpoint to my 'frost' setting of 7 degrees (thus off) and CH Demand (on) by setting the CH Setpoint to the current SLC thermostat setting plus 2 degrees... why 2 degrees? I cannot remember now, but it does the trick.

I'd already noticed the short bursts of heating demand you refer to and the way I dealt with those (in my Domoticz LUA code) was to keep track of the CH demand 'on' time and if the time was very short (i.e. the boiler would not have time to get water up to temperature), then I would force the boiler/pump to remain on a little longer (I called this the overrun time) to ensure that the boiler would have time to heat water and circulate it (via the pump) to radiators where the TRV were demanding heat. This of course would result in setpoints being overshot a little but at least energy wasn't wasted as you describe in your question.

So my rather long answer to your question is I live with the 0.5 deg increments built into Hive (well my hardware/firmware version dating back a few years now). And I just use it as a CH/HW switch under my own (node-red) software control.

To finish this tome. Earlier this year I decided to drop Domoticz as my main HA platform and re-write everything around node-red. (No, I'm not a fan of Home Assistant). I have also standardised on Hive Zigbee TRV hardware having wasted time and money on Chinese Zigbee TRV's and that's also a long story!

I also re-wrote the Pi-ve node-red flows (as published here) to also support the Hive Thermostat Boost buttons but I never found time to publish it.

Remote control of my home automation (heating/lighting/alarm etc) from a phone/tablet now uses the telegram messaging platform (a 'telegram bot') which is also implemented in node-red and I also moved my whole home automation hardware platform from Raspberry Pi to a Beelink mini PC running Ubuntu.

Maybe I will publish my whole HA solution sometime if I find the time. Like most HA projects it's also a work in progress and sometimes suffers from glitches/bad logic/bad coding that infuriate my fellow inhabitants. .