I’ve created two blueprint automations in order to enhance what the existing Xbox and Logitech Harmony remote integrations can do together outside of the Home Assistant front-end.
Note: These blueprint automations rely on the integration triggers, so if the state becomes unavailable it may not detect the change in app or activity.
Harmony Activity to Xbox Enhancer
When you change the activity on the Harmony Remote, this automation attempts to activate/run the app on the Xbox if it is on the given list. e.g. run/activate Netflix Automatically.
This means you don’t need to spend time trying to configure up special start-up sequences on the harmony sending controller commands attempting to select an app - which is awkward to setup and is not fast!
You also gain more ways of activating app by the existing Harmony integrations even outside of Home Assistant - e.g. by asking Amazon echo to start BBC iPlayer
Xbox App to Harmony Activity
This works the other way around to the first automation - if you manually go into an Xbox app that has an associated Harmony Activity it will attempt to activate that Harmony activity.
This is especially useful for when the controls such as play/pause are different on the activity or you change lighting scenes from Harmony.
Note The app names are obtained by the sensor.xboxprofile_status
sensor and may not match the actual app name - An example of this is Amazon Prime Video still has the internal app name Amazon Instant Video - this automation can also deal with these.
How to setup
-
Pre setup the Harmony and Xbox integrations
-
Setup Xbox to sign in as certain profile
-
Create separate Harmony activity for each app/game (likely to have the same tv/amp inputs to the Xbox)
-
Install Blue print automations into Home Assistant:
- From Blueprints menu (c → Navigate to Blueprints), or use the link below
- Click Import Blueprint, and use the following URLs and click preview Blueprint
-
Harmony Activity to Xbox Enhancer Blueprint import link
-
Xbox App to Harmony Activity Enhancer import link
- Click Import Blueprint
- Click on Create Automation next to the new blueprint automation, fill out the required fields, rename the automation if you like and click Save.
- Repeat steps 2-4 for the other automation.
- From Blueprints menu (c → Navigate to Blueprints), or use the link below
The automations may have some prefilled entries for some likely names for the Xbox and harmony remote, if they are not correct select the entry to select your available entries.
The Activity to Xbox Product ID list is prefilled with certain applications you may be interested in - mainly from UK and US store (if there are other entries you think will benefit others let me know and I’ll update the predefined list). Add, remove or change the items to match your Harmony Activity names. If the app does not work you may wish to double check the Product ID if that needs changing if you have issues.
Important: If you have the activity names already defined for non-Xbox apps (e.g. you’re using your TV’s own app) remove/rename the Activity to Product ID list otherwise it will activate your TV app. It is likely you won’t have the following activity names and will need to be renamed if you use them:
- Amazon Prime Video UK
- Amazon Prime Video US
- Apple TV app
Activity Naming
It’s easier for the automation setup if your Harmony activity names exactly match the names of the Xbox apps - but you can define each activity if you want to.
Determining Xbox App/Game product ID
To determine Xbox Product ID from the Xbox, select app/game and press menu button, select Manage app, Select app/game then press X for File info. Note the OneStoreProductID.
Troubleshooting
If you attempt to run an app that isn’t installed in the Xbox Store page should open and if applicable for your region allow you to install the app.
If the Xbox activates the Xbox Store with a blank screen it’s likely that the Product ID mapping needs updating. See instructions above to determine the Xbox Store Product ID.
If the Xbox profile sensor (e.g. sensor.xboxprofilename_status)
becomes unavailable if you use your harmony to switch to another activity this may not work to activate the chosen app. You can set up a separate Xbox harmony activity (such as Xbox) that you don’t map that you can switch to then attempt again to switch to your chosen activity.
Enjoy
Let me know what you think!
Update: 2022-05-24T23:00:00Z
- Updated to fix errors when devices are unavailable
- Now works based on the Harmony activity_starting attribute to better cope if the Harmony goes offline and online, in addition in the Home assistant logs the logged entries should not show duplicate triggers
- Attempt to support Xbox sleep mode in Energy saver mode to save 20 times less energy than standby (on Xbox → Settings → Sleep mode & startup → Sleep mode)
- The automation gives the Xbox chance to start up before sending app activation
- Queued mode for Harmony to Xbox to attempt to
Update: 2022-12-07T00:00:00Z
- Minor fix for 2022.12 release breaking change for marking if Harmony Activity is Powered Off. If you use this update make sure you have 2022.12 or later.