Logitech Harmony Integration with @iandday's component

Did you create the sensor?

sensor:
  - platform: template
    sensors:
      current_activity:
        friendly_name: 'Current Activity'
        value_template: '{{ states.remote.logitech_harmony.attributes.current_activity }}'

Also, the only way to end an activity is to select a different activity or power off. My setup currently doesn’t allow or require more than one activity to run at the same time.

Ok so I’ve eded it to look like this

 input_select:
      harmony:
        name: Harmony Control
        options:
         - Select a Activity
         - Power Off
         - Watch Chromecast
         - Watch Blu-ray
         - Music
         - Record Player
         - Play SNES
         - Play Wii
         - Play PS4
        icon: mdi:monitor

    automation:

    - alias: Harmony
      hide_entity: True
      trigger:
        platform: state
        entity_id: input_select.harmony
        from: 'Select a Activity'
      action:
        - service: remote.turn_on
          entity_id: remote.logitech_harmony
          data_template:
            activity: >
              {% if is_state("input_select.harmony", "Power Off") %}
                 -1
              {% elif is_state("input_select.harmony", "Watch Chromecast") %}
                21348620
              {% elif is_state("input_select.harmony", "Watch Blu-ray") %}
                21328230
              {% elif is_state("input_select.harmony", "Music") %}
                23162952
              {% elif is_state("input_select.harmony", "Record Player") %}
                21716937
              {% elif is_state("input_select.harmony", "Play SNES") %}
                21349107
              {% elif is_state("input_select.harmony", "Play Wii") %}
                21349086
              {% elif is_state("input_select.harmony", "Play PS4") %}
                21513308
              {% else %}
              {% endif %}
        - service: input_select.select_option
          entity_id: input_select.harmony
          data_template:
            option: "Select a Activity"

    - alias: Harmony Off
      hide_entity: True
      trigger:
        platform: state
        entity_id: input_select.harmony
        to: 'Power Off'
      action:
        - service: remote.turn_off
          entity_id: remote.logitech_harmony
        - service: input_select.select_option
          entity_id: input_select.harmony
          data_template:
            option: "Select a Activity"

Also Ive added the sensor but still no go

Unfortunately, since you’ve made so many changes to my code, it’s very difficult to diagnose what is going wrong. If you’d like to start over from scratch using the script I posted originally, it may be a bit easier to figure out what the problem is.

my server was not rebooting its working now :slight_smile:

That would do it. Lol.

Have you had any Luck setting up a link to a SmartThings Hub? or know anyone who has done it I’ve found a few run troughs but I’ve been at it and have reinstalled my HA server several times after messing it up lol :confused:

I have the smartthings hub integration working, but it was through hours of trial and error. It wasn’t a fun experience.

Any chance of you helping a guy out? lol or any tips or tricks? Also are you running HA on a pi?

I’m running HA on an RPi3.

The only real tip I can provide you, since the walk through is pretty straight forward is that the mac address you need to enter into ST is the actual mac address of the Pi, not the docker container, or anything else.

I’ve found 3 separate walkthroughs they are all a little different, any chance you recall the one you used?

I used the install guide in the readme for the module itself.

I used NPM and PM2 instead of Docker. I could never get docker working right. I also used Mosca rather than Mosquito for reasons that I don’t exactly remember.

OK, I’ll admit I have no idea where the readme for that is located is it on my Pi that is running the HA or is it online?

Anyone has an Ultimate Remote? I want to turn on/off from the remote some z-wave switchs and cannot find the way to do it.
My setup is: (real) Hue + Harmony Hub & Ultimate Remote + rpi3 with HA + zwave relays

Is it just me or does anyone have a problem using input_select to change activities with harmony with 0.42? Seems like it broke the automations I had setup

Working fine here.

broke for me 2, dont know what to do now :slight_smile:

@gambit2552
Same here. I have had to do a complete install 3 times and each time it was hell getting the smatthings bridge to work. The NPM and PM2 apporach was better. Docker never worked for me as well.

Remember PM2 stops every time you restart the pi.
Always start the bridge from within the same folder all the time - the one with your config.yaml preferably your ~/ directory cus starting in a different folder will create new config.yaml with the default configurations.

Use your PM2 logs to observe whats going on.
Mac address in the smartthings hub graph website should be the PI mac and IPaddress.

I can try and help out with issues.

Hello all,
Please help. Been struggling for a few days now. HA seem to die while starting with harmony enabled in the config.

HA gets stuck on startup and never fully boots while trying to setup harmony remote. Below are the relevant lines from the log:

May 29 22:55:11 HomeControl hass[10466]: INFO:homeassistant.components.remote:Setting up remote.harmony
......
May 29 22:55:14 HomeControl hass[10466]: INFO:homeassistant.core:Bus:Handling <Event state_changed[L]: new_state=<state sensor.yr_symbol=4; attribution=Weather forecast from yr.no, delivered by the Norwegian Meteorological Institute and the NRK., entity_picture=//api.met.no/weatherapi/weathericon/1.1/?symbol=4;content_type=image/png, friendly_name=yr Symbol @ 2017-05-29T22:55:14.129985+08:00>, old_state=<state sensor.yr_symbol=unknown; attribution=Weather forecast from yr.no, delivered by the Norwegian Meteorological Institute and the NRK., entity_picture=//api.met.no/weatherapi/weathericon/1.1/?symbol=None;content_type=image/png, friendly_name=yr Symbol @ 2017-05-29T22:55:11.075866+08:00>, entity_id=sensor.yr_symbol>
May 29 22:55:14 HomeControl hass[10466]: INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=sensor>
May 29 22:55:19 HomeControl hass[10466]: WARNING:homeassistant.setup:Setup of remote is taking over 10 seconds.
May 29 22:55:21 HomeControl hass[10466]: WARNING:homeassistant.components.remote:Setup of platform harmony is taking over 10 seconds.

Above is the last line I ever see. I think HA actually dies never finishes starting. My “top” command does not show its running anymore…

what i have done:

I installed the latest version of : pyharmony and I can issue a : harmony -discover command and I get results back.
I can even successfully send a commands to my aircon, TV and fan to turn them ON and OFF from terminal:

harmony --harmony_ip MY_IP --harmony_port 5222 --loglevel DEBUG send_command --device_id 54927877 --command 'Power OFF'

So my pyharmony seem installed correctly.

pip list shows: pyharmony (1.0.16)

I did NOT install the the “remote” component because I think it is already coming pre-installed with the latest HA version (0.45) which I updated just a few days ago. Is this a mistake? Did I actually still need to do the below? I actually checked my python3.4 installed components and I can see “remote” there.

I have a component directory: /srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/remote

pi@HomeControl:/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/remote $ ls -l
total 36
-rw-r--r-- 1 homeassistant homeassistant 1546 May 29 00:09 demo.py
-rw-r--r-- 1 homeassistant homeassistant 6420 May 29 00:09 harmony.py
-rw-r--r-- 1 homeassistant homeassistant 5144 May 29 00:09 __init__.py
-rw-r--r-- 1 homeassistant homeassistant 3343 May 29 00:09 itach.py
-rw-r--r-- 1 homeassistant homeassistant 2129 May 29 00:09 kira.py
drwxr-xr-x 2 homeassistant homeassistant 4096 May 29 00:09 __pycache__
-rw-r--r-- 1 homeassistant homeassistant 1004 May 29 00:09 services.yaml

Also since the HA is looking to configure it, it must be installed…

So again I did NOT do below:

svn export https://github.com/iandday/home-assistant/trunk/homeassistant/components/remote
Copy this folder into your HASS components folder
cp -TRv ./remote /usr/local/lib/python3.4/dist-packages/homeassistant/components

my config file looks like this: (I do NOT use secrets and just inline my email and password)

remote:
  - platform: harmony
    name: Living Room
    username: [email protected]
    password: MyPassword
    host: 10.168.10.77
    port: 5222

I really don’t know what is wrong with my setup.

Thank you for your ideas and help.

My HA always pauses at the harmony remote too but after a minute or so it boots up just fine. When you say it doesn’t fully start up, did you give it a few minutes? Also, I find that if I delete my database it goes much faster when it just creates a new one.