Logitech Harmony Integration with @iandday's component

Hey guys.

I’m really interested in utilizing this component but I have no clue how to start the installation process. I’ve downloaded the zip file on my desktop but I have no clue how to upload/install this on my Hass.io.

Please advice. I am an absolutely clueless about python tbh.

Thanks!

It’s a standard component, no installing to do, try reading the docs :slight_smile:

Specifically referring to Step 1: Installation. What does this mean? Or should I just follow from “Add the Remote Component…” instead?

If you have the Discovery Component active, Home Assistant will automatically find your Harmony hubs. You can check out the Harmony Hub Remote component page to find some information to get you started.

Discovery Component is active. And there is a harmony_harmony_hub.conf file in my Config folder, however there is no way to select the activities or execute individual commands through Hass.io. I’d like to be able to select, for example, my tv (device) then power on/off toggle and input (actions) and my A/C (device) then Power On/Off Toggle and Timer (Action). Will this component enable me to do so with some modifications?

Yes, but you’ll need to supply all of the information manually. The config files mention the device ID’s you’ll need to control your devices, then you need to set up automations or scripts to send the individual commands to your hubs.

A popular method for control is using Input Select to select your activities. Variations of something like this.

- alias: 'TV Room Controls'
  initial_state: true
  hide_entity: true
  trigger:
    - platform: state
      entity_id: input_select.tv_room
  action:
    - service: remote.turn_on
      data_template:  
        entity_id: remote.tv_room
        activity: >-
          {% if is_state("input_select.tv_room", "PowerOff") %}-1
          {% elif is_state("input_select.tv_room", "Watch TV") %}18609512
          {% elif is_state("input_select.tv_room", "Watch Fire TV") %}18744923
          {% elif is_state("input_select.tv_room", "Watch a Movie") %}18609955
          {% elif is_state("input_select.tv_room", "Listen to Music") %}18609893
          {% elif is_state("input_select.tv_room", "Play Xbox") %}30907506
          {% endif %}
    - service: input_select.select_option
      entity_id: input_select.tv_room
      data_template:
        option: "Select Activity"

This gives you a drop down menu in your front end to select your activities. To send individual commands to your devices, you’ll also need to set up automations that will issue the commands to your hub. I’ve seen automations that use input sliders for volume adjustments, toggle switches, data input boxes, etc…

Edit: I forgot to add that you’ll need to add your Input Select info in your config file. Something like this.

input_select:
#Harmony
  tv_room:
    name: TV Room
    options:
     - Select Activity
     - Watch TV
     - Watch Fire TV
     - Watch a Movie
     - Listen to Music
     - Play Xbox
     - PowerOff
    initial: Select Activity
1 Like

Thanks for heading me in the right direction, after reading the instructions a few times over and analyzing the code you quoted, I’ll try to figure out some way to make it work. Thanks everyone for your help. I really appreciate it!

Thank you for posting your HA project. I was able to work out many of the problems I was having with my Harmony Hub after carefully reviewing your config/automation/script files.

You might want to investigate emulated_roku now too, allows you to easily control HA with Harmony rather than the other way around.

Thanks for the suggestion. I followed through on it, and I now have a new use for buttons on my Harmony hub that enable me to turn lights on/off. I stumbled through the same confusion as others on where to place the Python code & getting the HH configured to see the new device.

A very useful add-on to HA.

1 Like

Can Harmony Hub read the current on/off state of an old-and-not-really-smart-TV (which has only a power-toggle button)?

Harmony doesn’t actually ‘know’ the state of anything, it ‘assumes’ based on what activity you’ve triggered, ie if it sent a power on command to a device when you pressed ‘watch a movie’ it assumes it’s on until it sends an off command at the end of that activity.

Makes sense. Thanks for your reply.

Is it possible to install this on Hassio on a rpi3? Because in Hassio i can’t use the commandline to use wget for downloading this component. What sould I do?

Edit:
I didn’t see this post Logitech Harmony Integration with @iandday's component. So it is auto discovered but only need some extra configuration. Thanks anyway :slight_smile:

Hi all,

I added this integration months ago and since few months i noticed that at HA reboot all script are triggered from imput select. I’m the only one facing this issue?

You added this over the built in component which uses used this library?

no, the default component.

Ok, so what scripts are executing on startup. Do you have an example of the script that’s executing?

any script. I have different script for different harmony activities.

Are similar to this:

  plex:
    sequence:
    - service: remote.turn_on
      entity_id: remote.harmony_hub
      data:
        activity: "27269375"

12:55
tvoff started

12:55

|TV turned off from HASS has been triggered|
||

12:55

|Harmony Soggiorno changed to Spenta|
||

12:55

|Powered off from Harmony Hub has been triggered|
||

12:55

|TV Soggiorno turned off|
||

12:55

|Prime Video turned off|
||

12:55

|BluRay turned off|
||

12:55

|VHS turned off|
||

12:55

|Netflix turned off|
||

12:55

|Plex turned off|

this time tvoff was the last so nothing happened. But for example sometimes the last is tvon so the script is executed and is quite annoying if someone is watching tv.

You want to look at any automation that would run those. What automations are those scripts in?