Other way integration Harmony Hub

Hi All,

Im running for couple of years Domoticz. The integration of Harmony Hub is great:

Add Harmony hub as device, system read out the config (activities, devices) and make new devices for them. So you can use them. Also sync is working great. When start a activity in system the device status will update. If you do this in System itself on the Harmony remote it will update as well.

Im now try to see if Home Assistant is a better solution for me because lots of devices is integrated already like: Nanoleaf, Homekit, etc. For now I have always create scripts to do this.

Would be so nice to see a other way for Harmony Hub users inside Home Assistant.

When remote is discovered then it adds also all the scenes(activities) and devices so you can add them in frontend. When you can add those activities in frontend then activate them without activate the other activities.

With this way of config you can add triggers.
When TV Activity is on then turn on bulb 1 and 2 and turn bulb 3 and 4 on with brightness to 50 or some thing.

In Domoticz I use the activities to trigger script actions. My whole light control is based in the activities to turn bulbs on or off, of dim them or give them a color (depends on moment of year)

Does Domoticz make changing channels (like for a cable box) easy?

I’m not sure what you are looking for that’s not already available. I have all my activities in home assistant, it knows which is on, regardless of whether I used ha, harmony or Google to activate it. Everything I can do with the harmony remote I can do from HA. It did take a bit of manual setup, are you just looking for more automation or am I missing something.

Maybe you can explain me how you did it?

In Domoticz I add harmony hub as hardware and then I get activities as devices. So every activity have his own device like a light bulb. I also use many script to automate my house in domoticz it’s Lua script

So what I want do is create a action that reads for example harmony activity IPTV. When this is toggle then do…

Hope I’m clear now :slight_smile:

Domoticz can do a lot. Sometimes you hit a php script to do things. But homekit, Matt broker, nanoleaf, Google voice are not supported. You need install software to let it work. Home assistant has include this all… Makes it easier to install… But for me difficult now to understand how the scripts are working :slight_smile: action, scene etc

The key is to create some template switches. Here’s some for three harmony activities I have set up.

  - platform: template
    switches:
        lounge_tv:
          friendly_name: Lounge TV
          value_template: "{{ is_state_attr('remote.lounge', 'current_activity', 'TV') }}"
          turn_on:
            service: remote.turn_on
            data:
              entity_id: remote.lounge
              activity: 'TV'
          turn_off:
            service: remote.turn_on
            data:
              entity_id: remote.lounge
              activity: 'PowerOff'
          icon_template: >-
            {% if is_state_attr('remote.lounge', 'current_activity', 'TV') %}
              mdi:television-classic
            {% else %}
              mdi:television-classic-off
            {% endif %}

        soundbar:
          friendly_name: Soundbar
          value_template: "{{ is_state_attr('remote.lounge', 'current_activity', 'Soundbar') }}"
          turn_on:
            service: remote.turn_on
            data:
              entity_id: remote.lounge
              activity: 'Soundbar'
          turn_off:
            service: remote.turn_on
            data:
              entity_id: remote.lounge
              activity: 'PowerOff'
          icon_template: >-
            {% if is_state_attr('remote.lounge', 'current_activity', 'Soundbar') %}
              mdi:music
            {% else %}
              mdi:music-off
            {% endif %}

        ps3:
          friendly_name: PS4
          value_template: "{{ is_state_attr('remote.lounge', 'current_activity', 'PS4') }}"
          turn_on:
            service: remote.turn_on
            data:
              entity_id: remote.lounge
              activity: 'PS4'
          turn_off:
            service: remote.turn_on
            data:
              entity_id: remote.lounge
              activity: 'PowerOff'
          icon_template: >-
            {% if is_state_attr('remote.lounge', 'current_activity', 'PS4') %}
              mdi:playstation
            {% else %}
              mdi:playstation
            {% endif %}

It looks like a lot of effort, but it’s mostly repetitive cut and paste.

There are a few posts explaining it - I think I might have knicked the idea from here -

Once you’ve got the switches it’s easy enough to display them in lovelace, and they follow the state of the harmony regardless of whether you control it via other means which is nice.

Here’s a post on what I did next, basically just setting up a remote that shows the buttons I use, depending on the selected activity.

I expect it would be good, if it were all simpler. But then it probably wouldn’t work exactly how I want it anyway :slight_smile: