Thursday, July 11, 2019

Home automation on the cheap, part one

The challenge: automate things around the home, as cheaply as possible.


Back when I started work in IT, home automation was The Next Big Thing that never actually became big. At the time, X10 was the standard of choice, and though there was no way I was spending that kind of money and effort to have my home re-fitted with X10 controllers, I kinda liked the idea. It speaks to my inner nerd.

Roll forward 20+ years, and home automation is suddenly achievable for not too much money or effort. And with voice control!

My initial goal was to have a voice-controlled replacement for my Logitech Harmony universal remote.

Image result for logitech harmony

Being kind-of an audio nerd, I like having the TV sound played through the stereo in the lounge - far better sound than the TV's tinny little speakers. Thing is, it can be hard for every member of the household to remember to turn on the amp and the TV, or which buttons to press to hear TV sound, or the CD player, or the turntable... so the Harmony universal remote's "scenes" function was a great way to turn on the stereo, turn on the TV, switch the stereo's input to the TV, adjust the volume to something sane. Thing is, the Harmony's interface was kind of a pain to use, especially since it relied on having a Windows computer handy to program it. Not great for a Linux household.

I started with a Google home mini, waiting till they were on sale at Officedorks for AUD$45. I added a Broadlink Mini 3 for infrared control of the TV and stereo - that cost about $30.
BroadLink RM Mini3 Smart Wi-Fi IR Remote Controller Smart Home Automation Black

Obviously, your appliances you wish to control must have infrared controls.

At this point I had a capable replacement for the Logitech Harmony. The IHC iPhone app to control the Broadlink was pretty straightforward. You add appliances that the Broadlink can control, then build up scenes... pretty close to how the Harmony worked.


See the pauses between commands? It took a bit of experimentation to get these right... the amp does not respond to having IR commands fired at it too quickly! And if it's just been turned on, it goes through a period where it's not responding... hence the wait times are required. 


Once these scenes are set up, you link your Broadlink account to your Google assistant's account, and all the scenes are visible to Google. So you can say "OK Google, activate watch TV" and it All Just Works. Mainly.

Why "mainly"? Because infrared controls don't have "turn the amp on" or "turn the amp off" signals. It's a power toggle - if it's off, it turns on; if it's on, it turns off. So if your TV and amp get out of step - one is on and one is off - then your scene "Watch TV" will turn one off and one on. So you end up needing scenes called "TV On" and "Amp On" to bring them back into step. Or you resort to using the amp's remote control, or... (horror of horrors!) actually walk over and use the buttons! To make matters worse, the amp's power button is a "hard off" so you couldn't turn the amp back on by infrared if someone had pressed it to turn the amp off. Yeesh!

I ended up replacing the amp with a Denon that still uses infrared, but has separate IR commands for on and off. Also, the Denon sounds beautiful - a really massive improvement over the previous amp. Gotta love Facebook marketplace for cheap second-hand stereo gear! Anyway... this means that for home automation, we can tell the amp to "turn on" which solves one issue. Actually two: I no longer need a graphic EQ to correct the sound of a crappy amp. One less appliance in the lounge room!

Logitech Bluetooth Audio Adapter

I then added a Logitech Bluetooth receiver (about $45) - I stream audio to this from my phone, so I can play Spotify (and podcasts) to it. Works a treat! One little issue... the receiver is always on, so as soon as my phone is in range, it starts streaming the sound to the bluetooth receiver. However, the amp might be off, or receiving sound from the TV input, but my phone doesn't know that... it's just merrily sending audio and I never get to hear it. So what I needed was a way to turn the Bluetooth receiver on only when I'm listening to the Bluetooth input on the amp. Sounds like a candidate for a scene where I turn on the amp, turn on the bluetooth receiver, and select the bluetooth input on the amp... like this!


So, how do we turn on the power to the bluetooth receiver? At the time I set this up, wifi powerpoint controllers were expensive, so I ended up getting some wireless remote controllers like this:
They're cheap, readily available, and pretty good (more later on why they're not "great"). They use the 433 MHz band for their communication, and it works pretty well through walls, along the length of my house. But since the goal here is to automate them, we need a way to control them. Turns out the Broadlink RM Pro incorporates infrared and 433 MHz, so it can control those. I picked one up online for about $35, and it replaced the Mini:

Original-Broadlink-RM-PRO-Home-Remote-Control-WIFI-IR-RF-Switch-Via-IOS-Android
Plug the power adaptor for the Bluetooth reciver in to one of the wireless power controllers, train the Broadlink as to which controller is which:



... and hey presto, we can turn on the bluetooth reciver as part of a scene (and also turn it off as part of a scene called "Bluetooth off"). Yay!

Since the wireless powerpoint controllers come in multiple packs, I used the additional controllers to plug in a few lamps, and now we also have "OK Google, turn on the loungeroom lamps". Further happiness!

So why are the wireless controllers not great? There are two issues: 
  1. the controller for one batch of these interferes with the others... so turning off the loungeroom lights also turns off the bedroom lamp. That's annoying!
  2. they don't have a manual button to control them. You have to use either the Google automation, or the remote control they come with. I'd really prefer a button on them to switch power on or off if needed
Roll forward to the present day, and suddenly there are really cheap wifi-enabled power controllers with power buttons on them. Perfect! I recently acquired this for the princely sum of $15:


It works absolutely fine, setup was easy, and the USB charger port is a nice touch. Its iPhone app makes setup of the controller easy, then link to it from Google and hey presto! Voice control, or optionally, use the Google Assistant app.

Now it seems like Arlec are making their own equivalent. At $32 for a twin-pack at Bunnings, these also look promising, though I haven't yet set these up:


No doubt I'll need another iPhone app to set them up... but once it's set up and linked to Google, I'll never use the app again, so I don't mind. 


The final thing I'd really like to automate is the heating controls... that's a whole 'nother issue. Look out for that in Part 2, if I ever get that working!

Oh, and now I have so many wifi devices hanging off it, the Modem Of Incredible Cheapness is having a hissy fit every 3 days or so. The struggle is real.

No comments:

Post a Comment