For the longest time I’ve used OH -> MQTT -> Eventghost on HTPC -> IR Blaster to control Xbox One from OH. This has always been a workaround as the Xbox didn’t have any network control.
Recently this has been more flakey, and I did some googling and found there is finally an Alexa skill for Xbox.
That page also lists a bunch of commands that can be used to control the Xbox via Alexa voice commands. This post is going to be about controlling it via sitemaps and Habpanel…
I am not aware of any other app or assistant technology that has access to the Xbox, other than Amazon Alexa, and to the best of my knowledge this has only been available since October 2018…
Now it’s possible to integrate my Xbox in OH using the Amazon Echo Control binding. @michi provides extensive examples of .things, .items and .sitemap files in his post. Here’s how to do it via PaperUI…
First, install the Alexa app on your phone (or open it up). Install the Xbox skill and authenticate with Microsoft account. It will appear in the Smart Home section in the app as well as ‘Your Skills’ under ‘Skills & Games’ once installed.
Second, create a routine to turn on and turn off the xbox using Alexa. I called mine ‘turn on the xbox’ and ‘turn off the xbox’, for obvious reasons
When creating the routine, choose Voice for the trigger and Smart Home then Xbox for the action.
You should see them as below:
Click the play icon and confirm that your Xbox acts as expected.
Once you have authenticated you should see an Amazon Account thing in your PaperUI things. Make sure it shows as ONLINE…
Next, create an Echo thing by going to PaperUI Inbox, click the + icon to add, select Amazon Echo Control binding, select ADD MANUALLY and then choose Amazon Echo.
You will need to select your Amazon Account in the dropdown Bridge Selection and then fill in the Serial Number from the http://openhab:port/amazonechocontrol/ page. I chose the simulated device created by this binding - this means you don’t even need a physical Echo to do this, just an Alexa account.
In PaperUI click on Configuration and Things. Find your new Echo device and click into it. Click on SHOW MORE at right.
Scroll down to ‘Start a Routine’ and make sure it’s checked.
You should now be able to find your device in the Control section and type your routine’s voice trigger. Click the checkmark icon and make sure it works…
Assuming all of these steps are followed you should now be able to power on and off your xbox. Obviously, you can also do so in rules, Habpanel etc… Will finish this post tonight to demonstrate.
Hope this helps someone else!
Switch xbone "Xbox One"
rule "Xbox Power On" when Item xbone received command ON then sendCommand(amazonechocontrol_echo_ddae4541_90F0071863150G7E_startRoutine, "turn on the xbox") end rule "Xbox Power Off" when Item xbone received command OFF then sendCommand(amazonechocontrol_echo_ddae4541_90F0071863150G7E_startRoutine, "turn off the xbox") end