How to run hassio scripts when pressing harmony remote buttons

Hi,

I actually happen to have an amplifier that is not compatible with Harmony Remote. But I am able to run scripts within hassio that allow me to control it.

But I now would like to figure out a way to map the volume and mute buttons on my harmony remote to execute specific hassio scripts.

How would a solution look like?

You could try HA Bridge. This will talk to HA and the Harmony Remote, so you should be able to link them up. There is also a docker container for it, which I use every day.

I do similar using a NodeMCU and IR receiver under the TV in a small project box. Using ESPHome it is easy to activate a switch in HA (and a script) when it receives a particular IR code. You can even run small automations on the NodeMCU itself.
I also have an IR transmitter connected to the NodeMCU on a cable stuck to the receiver on my TV so I can control my TV from HA too.

so, i would need to involve a 3rd party software or device in order to realize this?

i was hoping that i could setup an automation that would listen to a service of my choice (harmony in this case) and execute certain commands (scripts).

This is how IFTTT is setup within hassio e.g…

You could use the emulated roku component.

Also an example of how the Automation would look.

- id: Wallfan on
  alias: roku Fanon
  trigger:
  - event_data:
      key: BackSpace
      type: keypress
    event_type: roku_command
    platform: event
  action:
  - entity_id: input_boolean.wall_fan
    service: input_boolean.turn_on
1 Like

you, sir, deserve a medal.

worked flawlessly. thanks for the hint.

only wished that it would emulate Roku TV instead of Roku, because RokuTV allows mapping the Volume Buttons etc. With Roku, however, I needed to assign volume control to the up and down keypresses. which is ok for the stuff i am doing :grin:

Hi there,
I have kind of a related question (I think)

I have some scripts that open specific apps on my Nvidia Shield. My automations do seem to triggger on the state change of the currentActivity changes… For instance the activity disney (to open disney+)

‘{{ trigger.to_state.attributes.current_activity == “Disney” }}’

This seems to run fine when the device is already on. But when it is the trigger to startup the shield too it will not open the app. I think it has something to do with the currentActivity not changing (or changing beforethe check is done). I already tried delaying the open app script but that does nothing.

Any one have a solution for this?