Nerivec / SmartHomeEnhanced

Tips, tricks, scripts to enhance your smart home.
GNU General Public License v3.0
18 stars 0 forks source link

Smart Home Enhanced

Below, you will find a detailed playback of my trials and errors in the Smart Home world. Hopefully, this can give you some pointers, and you can avoid making the same mistakes I did. Just my 2 cents, unfiltered.

WARNING: This includes past facts that are no longer relevant/correct (hence the changes over time), be sure to read the entire thing to get the full picture.

You will find examples for Home Assistant-related configuration in the subfolders. Most of it is meant to work together, and might need some tweaking if you want to use only part of it. Each folder has a list of the requirements for each part.

Buy Me A Coffee

An Expected Journey

The "Initial" Quest [Fall 2021]

Implementation

Results

On average, I decreased the whole-house electrical consumption by 20% (data limited to the months prior to renovations making a difference also - insulation is your friend!). Most of it, of course, came from taking control of the "dumb" electric heaters, even if just on/off (presence linked). You can pay back the entire system in a single winter, and then some, with those savings.

Automating lights, on the other hand, made a difference on practically; this is for you that always come home with your hands full... you don't need the other hand!

The Desolation of Consumer Systems

Smart Home consumer systems (the big three) have come a long way since their inception, automation, machine learning, voice.... And yet, they remain essentially clueless about many of their users' needs; or so I found out.

Automation

Perhaps THE single most baffling issue, automation itself. There are many ways to automate a home, many ways to improve upon it over time (and errors). But the most basic of needs, that is, being able to act upon a certain set of conditions, is far too limited in many cases, not to say nigh impossible.

When you begin your journey, you start with the basics, time <> light, motion <> light. As time passes on, you add to the smart home, and quickly realize, there are better ways to do some things. And then, you quickly realize how limited your system is in terms of automation; if then, but... where is else then, else if then, where is if and then, if or then? You start creating automations for the sole purpose of activating/deactivating other automations, because that's the only way to do what you want. And eventually, you find yourself in front of a fantastic automation idea that simply cannot be done (in any reasonable fashion). But, you know, it's a damn great idea, so what do you do? Link another automation platform to your setup? Find another consumer system that can handle it? Either way, it's going to get a lot more expensive than what the automation would ever bring. And you get no guarantee said new system will cover future similar needs.

The core problem: the software of your "base" system is crap.

Don't cut the line!

  • User: {XYZ}, what's the time?
  • {XYZ}: Sorry, I'm having trouble connecting to the Internet.

When I got the Echo 4, it had offline control of basic functionalities, that is controlling Zigbee lights and such. It was the first thing I tried after configuring the thing. I unplugged the Internet, and then the router, in turn, to confirm the limits on that front, with the intent of returning it right away should it not perform as expected; but it did. And then a few months later, Amazon decided it was fine to just remove it all; without so much as a warning.

It might not happen a lot (anymore), but sometimes, the Internet goes down, and sometimes your router gets fried; same goes for power, assuming some of your devices are on UPS backups and should remain functioning. Guess how I figured out Amazon had removed the support for the feature on the Echo 4? Which, by the way, was never confirmed as "removed" by Amazon's support, only "not supported" with a nice link to the device's page that mentioned absolutely nothing on this....

When an outage happens, and your entire house becomes essentially "broken", you quickly realize how much help it really is. Of course, you can revert to using buttons, and switches. But hey, it's not like it's hard to support offline control... since it was.

New Features / Updates

This one was perhaps the proverbial nail. Monthly update notes on Amazon's side were completely abandoned (and have been since the end of 2022). These days, it seems UI updates are pretty much the only thing happening.

Entering a new segment, I always keep track of bugs, and improvements that could be made to a system/platform. I did that for many months with Alexa and the couple of Echo devices I have. Eventually, I saw my most basic (understand 'no brainer') suggestions go entirely ignored by the support, and just gave up. As for bugs, some got corrected (eventually), and others kept reappearing once every few updates. Quality control... what's that?

The "Soon-After" Quest [Fall 2022]

Implementation

Results

The difference can hardly be quantified. You can automate however you want, with ease. You can customize however you want, with ease. Statistics help you "better" your smart home, and your home in general...

I even brought a few devices "back to life" (that never worked with the Echo 4 hub).

The Sonoff dongle is pretty stable, works well with Home Assistant & Zigbee2MQTT.

The whole thing lacks a proper voice (google translate...), but you can easily enough link Alexa to the system and use a Home Assistant script for tailored notifications (TTS). For now, that's fine.

The Battle of "Everything Local"

With quality control in free-fall (or so it seems), the "local" aspect is more than ever appealing; be it for the hacking potential of buggy updates, or the "what the heck is my data doing on a server in {insert_country_across_the_globe}" where "access control" is a sticker on a door. You add "greed is good" on top, and you have most companies giving up on proper support; and maintaining products for a decent amount of time has become somewhat of a fairytale... better to release a new device for sale every year, and call that "an update".

At this point, most of my system is now local. I can control the house (and greenhouse) through automations/scripts without even pinging the WiFi router. Stuff like weather can still be queried online, but you can cherry-pick providers; about phone notification via app, see docs. Remains voice; it's never been a really high priority since most of the system runs itself without interaction. It took some time to get there and have satisfying results, but satisfying it truly is. Alexa has become nothing more than a voice-enabled timer/clock on the control side (Speech-to-Text), and a way to get voice notification from automations (Text-to-Speech).

And then, Home Assistant goes full bore on the voice development! The idea of removing Alexa entirely takes a firm place in the back of my mind. I let some time pass, and eventually, I just have to try.

The "Eventually" Quest [2023]

Implementation

Results

Another 15-20% reduction in grid import! Most of that would be the solar panels covering "the base" of the house during the day. But I also tailored many automations to spread power usage throughout the "best hours" of solar production, water heater, ventilation, etc.

On a side note, and before I dive into the voice aspect, I tried the "Silicon Labs Multiprotocol" addon. I wanted to upgrade the firmware of my Sonoff ZBDongle-E adapter after noticing a few connectivity issues (ZBMinis going unavailable for a while in turn) that I suspected were hardware limits (a few too many ZBMinis on the network; they might be really nice, but they sure have crappy antennas, probably not helping!). After some searching, I found darkxst's tool, which led me to try the silabs addon, thinking it might solve the "hardware limits" in question, by removing them from the equation altogether (Zigbee on Home Assistant's side). I had no success there. It worked (ran, paired, reported, everything...), but had far too many issues (mainly commands not reaching devices; maybe it works better with ZHA thant Z2M...). I reverted to a Zigbee-only firmware without issue. The first upgrade (after flashing RCP 4.3.1 firmware) forced me to re-pair all my devices with Zigbee2MQTT (a bit of a shore with over 30 devices currently), but the second (after flashing to NCP 7.3.1), kept all my devices (yay!). The new NCP firmware did not solve the original problem either. After some investigation (on-again-off-again problems are always troublesome), I would have to say it has nothing to do with hardware, and instead is caused by something going "wrong" after Home Assistant updates, likely in relation to Zigbee2MQTT. But here is the catch, some updates cause the problem, and some fix it; it comes and goes as it pleases, nasty little bugger. I actually noticed it earlier in the year, but then it disappeared for months, so I gave up; when it reappeared in the fall, is when I decided to upgrade the firmware. PS: It's gone again as of 2023-12. Long story short, if you have that specific "ZBMinis randomly going unavailable for a while" issue, just know that a firmware upgrade, or offloading the Zigbee process will not help.

Onto the voice!

First, TTS, because that's easy. It worked right away (albeit with a few kinks at the moment, see VoiceAssist folder for workarounds), I just plugged a speaker in the Intel NUC (with the VLC addon), and Piper did the rest. I changed my notification script to use the Piper service, and took the time to refresh it a little (always a good practice after a few observations start floating in your head on how to improve this or that... before they float too far).

Second, STT. Now that's another beast altogether. Between wake word detection, and proper speech recognition, you have two massive issues looming. As I said, I didn't use it much anymore, timers, reminders, the occasional "manual" switching, so I didn't see much of an issue to try the new Whisper addon for Home Assistant, even if I expected it not to be perfect just yet. First step: mute Alexa!

I have to say, I was surprised by the quality of the STT, for something local, and recent, it's already pretty damn good (much better than the early days of dictation software, that's for sure!). I'm currently BETA testing on ESP32 S3, armed with a couple of INMP441 microphones, and a PCM5201a with 3.5mm jack output. There are a couple of quirks, mostly hardware limitations/software optimizations (see VoiceAssist folder). Noise affects the quality of the STT quite a bit; larger models help, but at the cost of performance (from <1sec to 2-4sec). Be sure to tailor the settings based on what your hardware can handle and what you determine as "acceptable". No doubt updates will smooth out these issues one by one (or all at once! one can dream...).

Quick note about wake word, it's pretty good; a few false positives from playing media at times. As mentioned somewhere else, wake word seems much less affected by surrounding noise, which is definitely a plus, hopefully STT will follow on that path.

The Sequel

And now, my 2 cents!

The big 3 are left behind, by a large margin, in terms of "smart home" capabilities. Their devices might be nice (the Echo 4 is definitely a good speaker), they might have superior voice technology (at the moment), but that's where the benefits end. And I don't believe the big push towards "AI" they are all enamored with is going to change much on that front. Better voice? Sure. Better home control? Doubt it. If you want a proper automated home, look elsewhere.

Tips

Home Assistant

The Pros

The Wants (AKA Cons with hopes of update)

Voice specific

Devices

As for devices, I tried a few brands (Zigbee-only):