Hacker News new | ask | show | jobs
by iforgotpassword 859 days ago
> Nothing quite disturbs your peace as sitting in a dark room, or having a light turn on in the middle of the night, because an automation has gone wrong. Hardware, in general, is also crap and I've spent too many hours trying to fix that faulty light strip, dodgy motion sensor or misbehaving sensor.

This is my concern too, having started just a few months ago. A few days after switching from ZHA to z2m, suddenly one of my zigbee TRVs stayed at 22°C. I thought it was better thermostat acting up, every time I tried to lower it directly via Home assistant it would snap right back to 22. So I opened the z2m webif and was greeted with "no network route (205)" every time I tried to set a new target temp on the trv. You see, with ZHA any zigbee errors would show a popup in HA directly, but since now HA just talks to z2m via mqtt, HA never knows anything went wrong. And to add insult to injury, the trv was still sending updates of the measured ambient temperature just fine, so I didn't immediately think of a network issue.

1 comments

This is the thing, and the main reason I only played around with HA but never fully implemented it. Ideally for things which are controlled in 'absolute mode' you need a watchdog. Like something implemented in hardware to keep it from misbehaving. On the other hand many crucial devices have this built in. But obviously plain lights don't. What I mean is e.g.:

- having HA control your heating's on/off hours, where the watchdog is the heating's thermostat making it stop heating when it's warm enough or forces heating if it gets too cold. So HA crashing and leaving the heating in heat mode might be just a waste but not a serious issue.

- having HA control the wanted temperature on the other hand is more problematic, because for all I know it could misbehave and make the heating want to go to 30 degrees Celcius or to a value so low that there's no frost protection anymore, then crash and never get it out of that state anymore. And there's no watchdog anymore correcting for it. Potentially this can cause issues. Chances are small, but I don't like the idea that AFAIK these chances are much larger than standalone heating acting up like this.

Likewise we can now opt for a dynamic electricy tarrif, basic idea being that for instance when you now the prices are going to drop below a certain threshold during the night you're going to tell your home battery to charge at that time. Of course the thing acts like a watchdog for itself in that it stops charging when full, but there is no watchdog keeping it from charging continuously. In other words: if it's put into charging mode and HA crashes and leaves it in charging mode then it will happily continue charging during peak hours. Not 'serious' per se but pretty stupid.

I started out with just toggling the TRV between two target temps which is pretty much your suggestion, 17° when I'm away, 20° when I'm home. I added better thermostat to the mix because I liked the idea of using an external thermometer for deciding wether to heat the room or not, instead of the one built into the TRV sitting right next to the radiator. So better thermostat usually overshoots the target temp a bit at first to get the TRV to open the valve fully. I don't even know of I like this tbh, but even in the old setup it would've been annoying to enter the kitchen in the morning to find out it's still 17° because something is broken with the whole setup. I mean before, I just went to the kitchen and turned on the heat manually before using the bathroom and putting on my clothes back in the sleeping room, and I'm still not sure the current automation is that much of an improvement even if it works reliably. Once you start you realize it's really hard to create automations that are subtle yet useful, and still easy to override, because there's always some special cases.
I mean, why not just have HA just control a hardware thermostat that has different mode settings (home, away, etc.)? Plenty of them exist and its, honestly, easier than trying to make HA into a thermostat.

I've done it in "pure" HA due to specific requirements and do not recommend it. Reliability has not been a problem but everything else was. You'd probably need a custom thermostat software component (as the HA built in one is limited), a wi-fi connected switch (like a Shelly), a high amp relay (if heating or controlling an AC due to startup load) and a low latency temp sensor (most have a 10+ minute delay or 2 degree F delay, I found Govee Bluetooth sensors to work well). Then you'd still probably want a remote control or a physical control panel/dashboard. The IR remotes for ACs are absurdly difficult to decipher (I never succeeded) and there's no good Zigbee remotes I found (the best I found is the Yolink remote but that's not local). Dashboards either involve running a browser on some LCD on a wall or an e-paper display wired to esp-home. Making a dashboard in esp-home is like going back 40 years as everything is individual graphic components drawn one by one. It might annoy you (like it did me) enough to build an svg bashed dashboard creator, a renderer on your HA box and then use a dead PR's remote image loading support in esp-home.

edit: The only positive about my approach is that I was able to build a custom "feel like" temperature curve that combines temp and humidity. So I no longer wonder all the time why I'm feeling cold or hot despite the thermostat being set to the same thing as last week.

I mean, why not just have HA just control a hardware thermostat that has different mode settings (home, away, etc.)? Plenty of them exist and its, honestly, easier than trying to make HA into a thermostat.

Wel yes, that's exactly my point: when done like that there's a watchdog in place. My issue (or rather reluctantce to use it) is that HA and the likes provide as far as I'm aware no watchdog features for systems which don't yet have it. Think some hardware AND-style gate which is only going to apply HA's last state if, say, HA can prove it is up and running properly.

There isn't one because the by far most common failure case isn't "HA isn't running" but "the communication protocol isn't working." A watchdog must be on the device itself because otherwise it's basically useless for all intents and purposes. That said it also doesn't in my experience matter in like 99% of situations (a light stays on... who cares and you'll directly notice the issue with your eyes anyways) and for most of the rest you can just have HA send you a notification that it lost contact with some device for too long. You want notifications anyways because you cannot assume that a thermostat being on means the heater is on. If you need a heater to avoid a water pipe bursting then you should have a low temperature alert as well. The breaker may have blown, the relay may have broken or the heater's overheat fuse may have blown at some point.