Logitech Harmony Integration with @iandday's component

Can you paste the remote config again using the preformatted text (</>) option?

Did you make sure to install at the /remote folder from github to your components folder?

Here is my remote config, which currently works…

remote:
  platform: harmony
  name: Living Room
  username: !secret harmony_user
  password: !secret harmony_pass
  host: 10.0.0.209
  port: 5222
  activity: Watch DirecTV

Since i am using the all in one installer i manually copied the 3 files in my components folder. i could not get the copy command working (thats why i did it manually).

/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/remote.

I still dont see the .conf file in my home assistant folder.

Hrm… I’m running the same setup and don’t have any issues. You did add an entry into your secrets.yaml folder with your harmony email and password, right?

I know the first run can take an extra couple minutes since it has to build your .conf file.

would it be possible for you to restart the hass service with everything in place, wait a couple minutes until is has for sure frozen and then run:

systemctl status home-assistant@hass -l (or whatever your service name is called)

I can get this working if I select the script but not when I use input_select. I’m not sure I have understood the last step where you say to set up two sets of automations, I can only see one set in your example. Is this why? I assume you need another triggger when input_select is changed or am I being dumb??? Cheers

1 Like

You’re absolutely right! I forgot the last set of automations. I’ll add them now. My apologies!

Edit - I’ve updated my original post with the last set of automations you’ll need.

No worries and thanks for sorting! I’ve been trying to get this to work for last few days and finally cracked it with your guide, cheers

1 Like

That’s excellent to hear. I’m happy I was able to help.

@ianddayhas the PR ready in the official repo https://github.com/home-assistant/home-assistant/pull/4254. Hopefully, it will be approved soon.

I’m running Hass in docker.

If I followed the directions I got:
root@localhost:/config/temp# cp -TRv ./remote /usr/src/app/homeassistant/components
‘./remote/init.py’ -> ‘/usr/src/app/homeassistant/components/init.py’
‘./remote/harmony.py’ -> ‘/usr/src/app/homeassistant/components/harmony.py’
‘./remote/services.yaml’ -> ‘/usr/src/app/homeassistant/components/services.yaml’

By replacing my current services.yaml it breaks Hass from starting up.

To make it work I had to:
root@localhost:/config/temp# wget https://github.com/iandday/pyharmony/archive/master.zip
root@localhost:/config/temp# sudo pip install master.zip
mkdir /usr/src/app/homeassistant/components/remote
cd /config/temp/remote
cp * /usr/src/app/homeassistant/components/remote/

I think next I’m going to try running my container with a -v /config/temp/remote:/usr/src/app/homeassistant/components/remote

Pyharmony doesn’t seem to work. Android app and HarmonyHubControl works.
Tried entering username and password with and without quotation marks, in secrets.yaml and directly in config.yaml.
Pyharmony is version 1.0.10.
Error message:
pyharmony.auth: Malformed JSON (GetUserAuthTokenResult): {‘GetUserAuthTokenResult’: None}

I wrote a simple script to test the login and I always get " b'' " as a result. (using resp.raw.data)
I don’t know if that’s the corrent method to get the response. What should I try next?

It looks like something on Logitech’s end broke pyharmony earlier today. Hopefully @iandday can take a look at things when he has time.

Ha bridge is also broken I think, can’t get either to work just failed logins. Android app and My harmony are fine

@iandday Not sure how else to communicate to you since issues are disabled on your git but currently getting this error on your latest code.

16-11-20 17:39:00 homeassistant.components.remote: Error while setting up platform harmony
Traceback (most recent call last):
File “/usr/local/lib/python3.5/dist-packages/homeassistant/helpers/entity_component.py”, line 150, in _async_setup_platform
entity_platform.add_entities, discovery_info
File “/usr/lib/python3.5/asyncio/futures.py”, line 361, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.5/asyncio/tasks.py”, line 296, in _wakeup
future.result()
File “/usr/lib/python3.5/asyncio/futures.py”, line 274, in result
raise self._exception
File “/usr/lib/python3.5/concurrent/futures/thread.py”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.5/dist-packages/homeassistant/components/remote/harmony.py”, line 51, in setup_platform
token = urllib.parse.quote_plus(pyharmony.ha_get_token(user, passw))
File “/usr/local/lib/python3.5/dist-packages/pyharmony/main.py”, line 72, in ha_get_token
token = harmony_auth.login(username, password)
File “/usr/local/lib/python3.5/dist-packages/pyharmony/auth.py”, line 46, in login
id_token = resp_dict[‘id_token’]
TypeError: ‘int’ object is not subscriptable

strange, it’s working for others. Can you enable debug logging for the remote component and copy the output? your credentials will be logged in the output to make sure they’re getting pullled correctly from the config.yaml

Oh huh, I remember an offhand comment I saw somewhere and tried without using !secret for my username and password and it seems to have not thrown that error anymore. Any idea about that?

not really sure, I’m using secrets in my config

remote:
  - platform: harmony
    name: Bedroom
    username: !secret username
    password: !secret password
    host: 10.168.1.13
    port: 5222
    activity: BedroomTV
  - platform: harmony
    name: Family Room
    username: !secret username
    password: !secret password
    host: 10.168.1.16
    port: 5222
    activity: Kodi

Strange its only failing when i use secret. I’ll look into it more. Im running hass version 0.33.1.

does your password have any special characters in it?

my username is [email protected] Do i have to use an escape character?

Also thank you for your help.

you’re welcome.

nope, my account is registered with a gmail address too. I dont have to escape anything