If you have an Xbox One (or thinking about getting one), and you’re a fan of home automation (like me), then you probably love the infrared AV device control feature that is already built into the Xbox One. This feature lets you tell your Xbox One what brand and model of TV, AV receiver, and cable box you have in your entertainment center so that the Xbox One can turn them on and off and control them using infrared (IR). But, I wanted to take it quite a bit further.
I wanted to control more than just my entertainment center electronics with my Xbox One. Those Xbox voice commands are so convenient, I wanted them to also turn my lights on and off.
Here is my integrated entertainment center home automation demo…
What I’ve already covered
I have some remote-controlled color-changing LED light strips around the edges of my TV, and in my previous article, I explained how to integrate them with my Z-Wave home automation system. Now I have scenes setup on my Vera that tell the LED light strips to toggle on and off as well as scenes for different colors.
But how can I make the Xbox One send IR commands that trigger these Vera scenes? Here’s how I did it…
Xbox One, Talk to the HTPC
Since I use a home theater PC (HTPC) running XBMC/Kodi instead of cable or satellite, I did not have any cable box configured in the Xbox One, so I told the Xbox that my cable box is a Windows Media Center PC. This made the Xbox One send IR commands as if it were turning a Windows Media Center PC on and off.
HTPC, Listen to the Xbox One
The next step is to figure out how to get my HTPC to start listening to those IR commands. I already have a USB IR receiver which I use for the Logitech Harmony remote so it’s technically receiving the IR commands, but I need to figure out which commands and what to do with them.
So, I installed EventGhost. I highly recommend EventGhost to anyone that wants to implement any kind of automation on a Windows PC.
What I did was install the MceRemote plugin (which allows EventGhost to intercept incoming Media Center remote IR commands) and started making the Xbox One send commands by turning it on and off. When I did that, EventGhost would pick up incoming IR commands and I would drag them from the left side over to the right side to configure them with actions.
HTPC, Trigger a Z-Wave Scene on the Vera
Now, what action can I create in EventGhost that would trigger a Z-Wave scene? Well, a batch script, of course!
I did some research and found there is an HTTP interface to the Vera that allows you to do almost anything. This is what various Z-Wave Remote mobile apps use. So, I wrote a batch script.
The first line has “@echo off” to allow the script to run invisibly (avoids the black command prompt window from popping up in front of my shows).
The second line is a “wget” command that basically does an HTTP call to the URL provided. The URL is the IP address of my Vera with a bunch of variables that define many things including which scene number to run (ex. 46).
Note: Before saving the URL into the batch file, test it to make sure it will work by simply entering the URL in your browser. It will return some info on the page that can tell you if it was successful or if it failed.
Success!
I now have my lights toggling on and off along with the Xbox One!
If you like this, share it!
See also:
LOVE IT.. Well done sir
Thanks! Glad to help!
That’s pretty cool. I have a question. I was using my 360 as an extender, but now I have my Xbox One directed to my PC. With my 360 I could change channels with my voice or by the One Guide. But now, when I use my voice, the channels don’t change using either method. Oddly, after I use my voice, when I go into the One guide, the channel that I spoke is highlighted so the Xbox One responded. It just didn’t change my channels. Also, if I go into the One Guide and click on a channel it won’t change either. Basically, the only way I can change channels is through the WMC (remote and keyboard). But the main reason I got the kinect is to change channels while in snap mode. I recently read that someone was able to use the X1 & WMC through their PC without an IR receiver, which I highly doubt now. The USB IR receiver that I use is for a Vista MCE VRC-1100, which, like I said, changes channels so the receiver works. Any suggestions on why voice and the One Guide may not be working? Thanks.
Have you configured your “cable box” in the Xbox One to be Microsoft -> Windows Media Center? I imagine that should work. Since I’m not actually using WMC, but I’m using XBMC, it won’t work for me because there are not any keyboard controls yet in XBMC to go to live TV channels, but it sounds like those do exist in WMC. If you are having problems with the mapping of IR commands to keyboard commands, install EventGhost to set them.
Thanks for the reply. For the “cable box” I put in “Media Center PC”. What is odd is that the remote control works with the USB receiver so the keyboard commands are working when the Xbox One is connected to the computer. So I’m unsure if Event Ghost is needed if the remote is working. Unless I’m missing something. Also, the voice commands worked when the Xbox One was connected to the 360.
As I noted above, say if I’m on ESPN and I say “Watch HBO”. The channel remains on ESPN. But if I go to the One Guide HBO is highlighted. So the command is recognized, but something is blocking it from changing channels through WMC even though using the remote works.
So I think the difference is that before when you were using the Xbox 360 as a WMC extender, it actually communicated with the WMC over the network so it was able to control it directly, but now you are using the Xbox One which no longer supports the WMC extender feature, but it only communicates with AV devices using IR (instead of network). The main problem I’m seeing is that I don’t think there is any keyboard command that will change the channel in WMC to a specific channel. The only IR commands are the ones for navigation like channel up and channel down.
If you figure out what keyboard commands will set the channel of live TV on WMC, then you can use EventGhost to detect what IR signal the Xbox One is sending and map that to the appropriate keyboard command. But, I’m afraid those keyboard commands might not exist (just like with XBMC).
Oh, so even though I had Xbox One connected to the 360 the WMC was responding to a network? I probably won’t be able to figure the commands haha. I tried talking to my brother about it since he used to work for Microsoft, but he isn’t quick in responding. This has been driving me nuts for a week. Thanks for trying though. I appreciate it.
I also use zwave and xbmc/kodi. There is an add in in the vera that polls xbmc to watch for play/pause and resume to toggle lights on and off too. I have zwave lights in the media room and they turn off when playing a movie and on when paused/stopped!!!
This hack requires my media pc to be in line of sight to the xbox one right? Would be cool if there was a way to carry commands over network as my HTPC is in the garage in a rack.