The details

(video and tutorial down the page)

Ever since I worked at a video store (‘member the ‘90s?) above a high-end home theater shop, it was my dream (among a thousand other dreams) to build my own home theater.

Fast-forward to 17 years later and the home theater I always wanted is built and it’s really awesome!

Some specs:

For games: A Playstation 4

For movies: A Raspberry Pi 3 running OSMC (Kodi)

For storage: WD 3TB external hard drive connected to the wifi router (as NAS)

For TV: Chromecast

For sound: A Sony A/V Receiver (STRDH520) with HDMI, 7.1 surround, all speakers by Polk Audio

For seeing it all: A BenQ 1080p projector (HT2050) and a HOMEGEAR 100 screen.

As you can imagine from the list above, I had A LOT of remote controls in that room, and I had to press maybe a single button or 2 on each of the remotes every time I entered or left the room. So I started looking into universal remotes. The Harmony Elite looked like it should do everything I needed. It comes with a Harmony Hub which can control a wide array of devices. Once I saw Amazon sells it with a free Echo Dot, I thought why the hell not. With some ease, I can set up IFTTT to do some nifty things.

Once I got the Harmony, and the Echo Dot, I started playing around. Setting up devices in the Harmony Hub was a breeze, and from there, setting up an IFTTT rule to forward Alexa commands to trigger activities was pretty easy.

For example, I had set it up such that when I say “Alexa, trigger play a movie”, it fires a IFTTT rule that runs the “play a movie” activity in Harmony, which turns on the receiver on the correct input, turns on the projector, gives Bluetooth control to the harmony remote over the Raspberry Pi to control Kodi, etc.

Sounds good, right? wrong.

I still had to manually lower/raise the projector screen because it has an RF remote (not IR) and the Harmony Hub doesn’t do RF.

I also had to manually turn on the ps4 for the “trigger play ps4” activity because the Harmony Hub can’t do that either.

I did some more research and found out about Home Assistant. It’s an open source home automation platform that I can run on my Raspberry Pi. It means I could add devices to it, that it can control remotely, and as long as the Raspberry Pi can run the command, Home Assistant can run it and make it look like any home automation device.

For the ps4, for example, I found out about ps4-waker, it’s a little program I can run on my pi that can turn my ps4 on and off. I can then set up Home Assistant to “see” the ps4 as a switch.

At this point, I needed a way for the Harmony or Alexa to control home automation devices that are announced by Home Assistant. Turns out Home Assistant has a component that allows it to “pretend” to be a Philips Hue hub, and expose all devices it knows about as switches (i.e. light bulbs) or other devices. Both Alexa and the Harmony Hub can control Philips Hue devices directly, so I eliminated the need for IFTTT completely, making everything faster and the commands cleaner (“Alexa, turn on ps4”, “Alexa, turn off AV”)

For the pièce de résistance, I needed a way to lower/raise the projector screen. As I mentioned, it has an RF remote and nothing currently in my house can send RF signals. After some more digging, I found that I can buy a cheap 433Mhz RF Transmitter and Receiver module to connect to the Raspberry Pi, and control that using rpi-rf. Home Assistant already has a switch for it.

Using my existing remote, I sniffed for codes, and found what I needed to define as “code_on” (lower the screen) and “code_off” (raise the screen).

I added both Harmony skills to Alexa, and since the Harmony Hub can call Home Assistant, I managed to create activities that turn on all relevant devices for each command, and lower the screen, etc.

Putting it all together, for the ps4 example, the end result is me walking into my home theater and saying “Alexa, turn on ps4” and the following will happen:

The projector turns on

The AV Receiver turns on to the correct input for the ps4

The projector screen starts lowering

The ps4 turns on

The Harmony Remote can control Kodi via Bluetooth (not sure if it remains paired or that pairing happens when I fire the activity)

The “mute” command is sent to the projector (I have audio coming out of the speakers and I don’t need the projector’s internal speaker)

Harmony has a default activity to turn off all AV devices. When I’m done playing, I say “Alexa, turn off AV” or “Alexa, turn off ps4” and it invokes the Hub’s activity to turn everything off. The ps4, projector, and receiver shut down, the screen goes up and I go to sleep because it’s 4am and I’ve been playing too much.

Here’s a video of it all:

Read the tutorial and let me know if you have any questions in the comments.