Home Automation — An End Of The Year Special

With 2022 heading to a close, I can have a bit of hindsight of how the past year looked like, from the point of view of my home automation solution, and a bit of a look into the future of how things might change. I think it’s useful because this is the first year since we moved into this apartment when we actually went out fairly regularly, so having a bit of a thought how things worked out (or didn’t) would be useful not just for whoever is reading this, but for myself as well.

First of all, this year I didn’t make any particular change to our solution. The big ticket item was last year, when I reverse engineered and built my own HVAC controller — most of the changes that actually landed this year have been incremental or minor improvements, with the exception of Home Assistant’s Bluetooth integration. But let me dig into a few of the components first.

Home Theatre

I posted about this in February: after replacing the old Bravia TV with a newer Bravia TV, and the old Yamaha receiver with the Sony HT-A7000, I finally managed not to need to set up my IR blaster again, as the TV fully supports remote control over IP, and the HT-A7000 has a documented protocol to control it.

Unfortunately, this is the extent of the good news. While my currently still custom integration of Songpal for Home Assistant does have everything I need, including reporting and initiating firmware updates, I failed to write proper tests for it, so the pull request languished and is unlikely to be merged any time soon. I do not have time to figure this out at the moment, as the little time I’m getting out of work and other commitments is being spent either with family and friends or trying to write enough for this blog to not feel like I have tons of stuff to say and nobody to say it to.

The HDMI switch is still running the clunky, MQTT-based application running on full Linux with CircuitPython, because my attempt at getting a host board for ESP32 to send the right commands failed, and like above I have not had time to sit down and try to re-design it again. But at the same time, most of the year has been spent playing with one computer exclusively, making the HDMI switch a very low priority.

Temperature and Humidity Sensors

The main reason why I even set up Home Assistant in the very first place a couple of years ago was to be able to monitor the temperature and humidity of our balcony (or, as they call it here with the architectural fanciness of the designers, the “winter garden”) to stop it from growing mouldy.

At that point I was suggested to start with CGG1 sensors because they didn’t require any Xiaomi account or any other special support and would have worked out of the box on the ESPHome platform. It turned out to not be quite as straightforward, among other reasons because I ended up receiving both the “old” model and the “new” model of the same sensors — the older one worked indeed more easily out of the box, but the newer ones would require activation, so they felt “worse.”

Well, this year two things happened. The first is that, thanks to Jonathan Dowland of Debian, I finally tried again, and realized that you can flash a different, more customizable firmware onto the “new” CGG1s. This already meant I could get rid of the bindkey and instead get all of those sensors to broadcast the custom BLE packet that worked much better on ESPHome.

The second is that Home Assistant received First-class Bluetooth Support. This meant not only that the ESPHome “cop out” wouldn’t be needed anymore, but that combined with the ability to customize the BLE advertisement of the sensors, I get a much better reading off the “new” CGG1s compared to the old ones!

On the other hand, Jonathan’s post came out after I already ordered a few Tuya ZigBee sensors. I skipped over these sensors the first time around for two main reasons: I had no ZigBee network, and they don’t have a display so you can’t actually look at them to eyeball the current temperature. But this time I had a few cabinets to monitor, where I would never look at the temperature with my own eyes, plus I couldn’t get a reliable reading of the sensor in the family bathroom (the pipes appear to be seriously shield it, I barely get WiFi in there, and I can’t even use my Bluetooth headphones to listen to my phone unless it’s in my pocket!) The other good thing of these sensors is that they use AAA batteries, so I could actually get put in some rechargeable batteries and stop worrying about stocking on the very specific CR2430 cells.

The end result of this is that we now have a lot more information about the temperature and humidity distribution in the flat, which helped fine tuning the thermostats. Unfortunately it also showed us that the gaskets of our windows needed replacing, and we only managed to get one of them replaced — turns out that the whole building has been using windows from at least two separate manufacturers, and I could only track down one of them.

Electric Windows

In 2021, London suffered from the first of what I can only imagine is going to be a series of heatwaves (2022 was just as bad if not worse), and we lived through it with little to no recourse, since both the “Juliette balcony” (which to me looks more like a suicide door) and the electric pantograph window were closed shut at the time. We called in a locksmith to get the door open, but it wasn’t until after the summer that I looked on how to hook up the window on Home Assistant.

While the automation to open the window when the humidity crossed 85% (to avoid condensation and mould) did trigger a couple of times over the winter, 2022 was when the hope of saving a bit of need of aircon materialized. I set it up so that the moment the temperature crosses 24°C it opens the window — and it triggered effectively every day from April all the way to October. While we did cross the 40°C a couple of times (yes, I’m not kidding you!), I can only have nightmares about what would have happened had we not been able to open that window.

I also tried migrating from the custom logic for the automation to Home Assistant Threshold helpers, but that turned out to be a bit of a toss-up on whether it was an improvement, because I still needed two separate thresholds to only open the windows when a higher temperature is reached if we’re traveling, rather than staying at home. On the other hand, I should consider using the derivative helper, or maybe find a way to define “The sensor is going to reach 24°C within an hour, open the window now to keep it cooler.”

As an aside, if you’re wondering why don’t we just open the window early in the morning (as long as it’s not raining), the answer is that we live close to a busy motorway, and the air quality is… lacking. This is extremely visible in the NO2 sensor history when either our (or the neighbours’!) window is open.

Also it turned out that basically every one of the flats in this building suffered from the same controller failure for the pantograph windows, so I ended up helping a few neighbours to get their windows open during this year’s heatwave — and found out that the corner flats are indeed bigger, and include two windows, that they can only control as a single unit… unless they use the same type of relay board as I set up, when opening them separately is possible!

Air Conditioner and Heat Pump (HVAC)

As I said earlier in this post, I have not made significant changes to the thermostat, but it was the first year we used the new thermostat exclusively. With the exception of two times when the Dyson fan (first), and the CGG1 (later) in my study dropped off Home Assistant. But even then it was just a matter of dropping them off and on again and everything was fine.

Also in the meantime we had two separate companies coming to service the HVAC system (change of contract at the building management), both of them got briefly confused by the lack of the touch panel controllers, but neither had a problem with us using our own choice of thermostat — the testing was done with the custom controller installed and just set at minimum temperature, the units have no problem with it.

One improvement I’m likely going to make is to tie this up with some magnetic door sensors I stuck to the inside window. Ideally, we would want to suspend the HVAC while those doors are open, as otherwise we’d end up cooling or heating the open space. This is trivial to do, but I have not stepped up to execute on it, which is silly, I know.

Another thing I have not done yet is figuring out the remaining features in the protocol, particularly the pre-heating mode. This is not something I’m in a hurry to fix, but also I did manage to get some of the tooling I needed to complete that built and assembled. Maybe next year.

Lights and Christmas Tree

Nothing really changed here, though I would like to change it, to be honest. I have Philips Hue original bulbs in the office and they are using the Flux integration, which is great, but I would love to have a desk lamp for slightly better focus. I tried a couple of options but turns out none of them is ever quite what I’m looking for, so for the time being I’m not bothering trying again (I kept the lights, but sitting unused, and at the third attempt it was clear it was not worth buying a fourth one.)

The entrance, which used to have a single six-spots configuration, is now split into two areas, with physical buttons to turn them on and off in the right configuration. This works out quite well, as most of the time we only need one group (the entrance side), and in the rare case we need the “hallway” side, we can turn it on. Something did change here though: previously we “armed” the scene that leaves the apartment empty for the day with a double-click, and disarmed it when back home with an “Alexa, we’re home” (or another double click), while now we have a magnetic door sensor doing it for us when we come back. This is quite nice, and allows not to bother with leaving a little bit of light for coming back late in the evening: the light comes on the moment the door opens. There’s special casing for when we’re traveling and someone else is checking on the apartment.

I also have been wanting to spend some time figuring out how to run multiple Christmas Tree light strings with a custom controller that does “light and sound” (moving the lights at the beat of a song — either from a mic or actually as a speaker.) I once again failed. Maybe next year?

Also I plan on going back to my acrylic lamp project, and take a maybe more expensive, but possibly more interesting road for it, that would allow me to use the acrylic shapes we have as notifications for various things happening, like I’ve been doing with my insulin reminder.

Washing Machine

Okay this one deserves a blog post by itself, particularly since we had to replace the washing machine and that changed some of the details behind it.

The short version is that I’m using one of the SP111 smart plugs to monitor the current usage on the washing machine, so that we can receive a notification that it finished and can be unloaded. This is a great way to avoid forgetting about it, but it is not quite perfect yet, which is why the blog post for it is not out yet. I promise I’ll get back to it.

Physical Control

This is probably what changed the most. Let me start with the worst part: I regret buying into the Flic ecosystem. The Flic buttons look the part, being much more nicely designed and tidier than the equivalent ZigBee by Aqara, but the only way to integrate them with Home Assistant is to use their bridge and configure them to send HTTP GET requests to webhooks. And since it does not support IPv6, it means I have to point the webhooks to the internal IPv4 of Home Assistant, and disable the certificate checks… all from the mobile phone, since their bridge does not have a Web endpoint (otherwise it would be easy!)

By far, this is not the only problem with Flic in my opinion. First of all it’s not clear when it’s time to replace their batteries — I’ve been replacing them the moment they start flashing red more often than not (and thus not sending the actual signal) and that appears to do the trick most of the time, but at least one of them appears to flash red more often than not even on a new sealed battery! It’s likely that it is a BT radio noise issue, but given the Flic buttons (unlike the ZigBee Aqara ones) provide no diagnostics, there’s literally nothing I can do for that.

The final nail in the coffin for Flic for me (although I have not removed all of them from home) is that they sometimes fail to distinguish from a single and a double tap. This is particularly annoying when the two have quite different actions: in the living room one of them is set to turn on the light on a single tap, but to send us to the bedroom on the double tap, which turns off the lights and a bunch of other device, and this is annoying already when a single tap is read as double. The absolute worse is the flic I put by my side of the bed, where the single click toggles the light I use to read before falling asleep, and the double click toggles the main light of the room — more than once, instead of turning off the light, the Flic decided to wake us up by turning the main light on.

I also bought a couple of four-button Tuya devices, that I meant to use for controlling the dimming of lights as well as the volume of the TV. These were actually the reason why I ended up abandoning ZHA (the default ZigBee integration for Home Assistant) in favour of zigbee2mqtt, since the latter supported them already (plus, at the time at least, ZHA didn’t support firmware update for Hue or IKEA devices.)

I did set up one of them in the living room to control the A/C (with up and down of both set temperatures) but they don’t get much use simply because the phone app is usually easier to change through (and you get a proper visual feedback of it working) so it’s there for “emergencies” but not really worth the choice.

I’m considering using the spare one to turn on different scenes, but to be honest it’s not quite comfortable — a longer and narrower “strip” that would fit on the side of the table would probably be more useful.

I have briefly considered getting a cheap tablet (such as Amazon Fire’s) and figure out a mounting bracket, but honestly speaking I can’t find it a lot useful yet. I have seen lots of people spending tons of time to get it to work for them on Facebook groups and the like, but the amount of custom integrations and fiddling that is required to do that make it a lot less inviting to me. Maybe now that Home Assistant started improving their card features (starting with the 2022.12 release) it might get more interesting.

Conclusion

You could say that compared to last year, this year was quite boring — and I like that. It means that most of the choices I made in terms of building up the home automation last year are still valid and solid.

I just wish I had the time to merge more of my custom integrations — the UniFi one, with full control of PoE ports as switches, is being re-implemented by the integration owner, which is great, but the Songpal one is still very custom right now. Plus the Dyson integration has not been merged in either.

Honestly, I wonder if it would be possible to hire someone to do that kind of work for me — and maybe a bit more of customization? It’s the kind of work that I don’t really have the time for anymore, but I wouldn’t mind paying a few hundreds pound once to sort out.

Exit mobile version