Harmony and Xbox Enhancers

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:

    1. From Blueprints menu (c → Navigate to Blueprints), or use the link below
      Open your Home Assistant instance and show your blueprints.
    2. Click Import Blueprint, and use the following URLs and click preview Blueprint
    1. Click Import Blueprint
    2. Click on Create Automation next to the new blueprint automation, fill out the required fields, rename the automation if you like and click Save.
    3. Repeat steps 2-4 for the other automation.

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 :grinning:

Let me know what you think!

:star2: Update: 2022-05-24T23:00:00Z :star2:

  • 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

:star2: Update: 2022-12-07T00:00:00Z :star2:

  • 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.
6 Likes

I’ve updated the blueprint to reduce the amount of errors being logged when Home assistant can’t find matching Harmony Activities or Xbox App.

Since the original release the current Home Assistant have improved the robustness of the Xbox integration - especially for me detecting Amazon Prime Video (UK) works. This exposed another issue with the Xbox to Harmony activity enhancer with the search/replace list which should now work.

Enjoy!

1 Like

theres a problem with your links. you have both .yaml files on one page in your github, which makes HA try to download the first one for harmony to xbox integration each time you try to download eaither automation. So when i try to download the second blueprint for xbox to harmony it just clones the first yaml instead of the second one. please break the two files up into different folders and try linking to them again. no amount of trying to install the second blueprint works at all for me.

I’ve updated the links in the original post - do you want to try now?

glad to get it fixed. i manually created the files needed on my a couple days ago and im successfully running your scripts without fail. your blueprints accomplish stuff ive wanted out of my harmony remotes for over a decade now.

that’s great! Good to know someone also finds it useful other than myself :smiley:

Shit! This should be a built in integration. This is the kind of thing g home assistant was built for. I wish Logitech didn’t scrap the harmony line. There was real potential towards the end. Then they dropped all the work on the windows programming interface for the stupid my harmony app that barely has the feature set of the old app. Its a shame

Not sure if you get a notification on an edit, but I’ve updated the blueprints. Check the first post for the list of changes.

Hopefully it’ll make it even better for you all!

Enjoy!