[Harmony] (Version: 4.15.210) Update for remote.harmonyhub fails

Hello,

I use harmony version 4.15.210 (The version with XMPP Beta enabled) together with Hassbian version 0.84.6.

I have the following issue:
If I want to turn on a state of the Harmony it doesn’t always trigger. It triggers the first 2 to 3 times and after that i get a error message:

Update for remote.harmonyhub fails
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py”, line 221, in async_update_ha_state
await self.async_device_update()
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py”, line 347, in async_device_update
await self.async_update()
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/remote/harmony.py”, line 205, in async_update
activity_id = await self._client.get_current_activity()
File “/srv/homeassistant/lib/python3.5/site-packages/pyharmony/client.py”, line 234, in get_current_activity
‘vnd.logitech.harmony/vnd.logitech.harmony.engine’
File “/srv/homeassistant/lib/python3.5/site-packages/pyharmony/client.py”, line 158, in _send_request
await self._perform_connect()
File “/srv/homeassistant/lib/python3.5/site-packages/pyharmony/client.py”, line 113, in _perform_connect
if not self._websocket.closed:
AttributeError: ‘WebSocketClientProtocol’ object has no attribute ‘closed’

My Harmony won’t give out a status to HA. Are there any known mistakes that causes this to happen or is this a Harmony issue?

Thanks,
Jef

I am getting the same error. It’s been some days get_current_activity gave out.

Guys,

HASS 0.84.6 was pushed out to work with the new Websockets used by Harmony. If you installed the 4.15.210 Harmony Beta, this was pushed out by Logitech to enable the old way we used to communicate.

I think you now have a “websocket” enabled HASS but a XMPP enabled Harmony, hence the errors.

So, either roll you install back to 0.84.3 in HASS OR roll your Harmony back to 4.15.206, so they either both use websockets or both use XMPP.

What I did was to download the 0.84.3 zip file https://github.com/home-assistant/home-assistant/archive/0.84.3.zip and copy the “harmony.py” file from 0.84.3 to my /home/homeassistant/.homeassistant/custom_components/remote/ directory (and restart HASS) so I’m still on 0.84.6 but running the harmony component from 0.84.3.

Hope that helps.

Simon

1 Like

Hello Simon,

Thank you for the help! It works. The usage of the custom component did change the name of my harmony hub used by Home Assistant but after solving that it all works again.

Thanks :smiley:

That is what I am doing, but {{ state_attr(‘remote.harmony_hub’, ‘current_activity’) }} does not report correct value. It always shows the first activity I registered with Harmony app.

However HOMEASSISTANT debug log shows correct value though.

Log shows
[custom_components.remote.harmony] harmony_hub activity reported as: Kodi

and it changes as I change the activity on Harmony App. but the Attributes never changes. It seems something is broken.

What is the current name of the harmony component? Is it still remote.harmony_hub or did it changed. For me it changed when I enabled the custom component. Have a look in your state’s menu and be sure that the name is still remote.harmony_hub. if it isn’t change it in your scripts and automations as well.

I hope that’s it.

So to confirm - if I’m running 0.84.6 of HASS what version of Harmony do I need? I currently have 0.84.6 of HASS and 4.15.206 of Harmony and was working - then today I see my logs full of the update failed. The last lines of my log are a bit different than above - I get a connection refused:

File “uvloop/loop.pyx”, line 1879, in create_connection
File “uvloop/loop.pyx”, line 1858, in uvloop.loop.Loop.create_connection
ConnectionRefusedError: [Errno 111] Connection refused

Let me know as I thought everything was working - but maybe not…

Kevin

I use harmony I didn’t have to change any configuration since the update. It just worked. They were about to figure a work around since the update of harmony hub

For me, 0.84.6 with

  1. Harmony firmware 206+stock 0.84.6 harmony.py (Socket version aka workaround)
  2. Harmony firmware 210(aka dev or rollback version)+0.84.3 harmony.py as custom component (old XMPP version)

both fails to report correct current activity with {{ state_attr(‘remote.harmony_hub’, ‘current_activity’) }}, always reporting the first activity registered on Harmony APP. (setting and not setting initial activity in configuration.yaml results the same)

Probably some core bug, not the component. Somehow remote.harmony_hub.attributes.current_activity is not populated correctly which it should in regular interval.
(* the remote entity name, harmony_hub may be different among configurations, of course.)

Other than current activity reporting problem, Either configuration works. But the first configuration, which matches @david1 's case, it seems, gave me lots of errors about current activity function, so I changed to latter.

FYI @Boom, in any case my remote entity name did not change.

Exact same issue here with hub fw 4.15.210. Not fixed with 0.85 unfortunately :confused:
(error from HA log: “Exception trying to establish web socket connection for hub”)

If you are using Version 4.15.210 you are still using the old method. So not based on Web socket. If you want to get it working with version 4.15.210 of harmony you need to downgrade the Harmony component in home assistant. Like Twit said. (Post nr. 3)

is websockets in 85.x still not working like the old xmpp ? still issues with it? i though that developers created all the fixes in 85.x ? are they still working on the new component then?

Downgrade done, everything works now. Thank you!

Normally 210 supports websockets AND xmpp , so 85.1 should work (websockets)

I will add that I had to disable the Netgear attached device discovery which was spamming the harmony hub (led turned red / harmony hub appeared as unavailable in HA). Wasn’t experiencing this before.

Logitech updated the Harmony hup. If you have automatic updates enabled it updated to 4.15.250. This broke the XMPP actions again. Logitech added a new setting to the hub so you can enable it from the app or pc. Check out this article on how to enable XMPP again.

https://community.logitech.com/s/question/0D55A00008OsX3CSAV/update-to-accessing-harmony-hubs-local-api-via-xmpp

XMPP is off by default.

(I realised it broke again and found this article about it what helped me.)

Xmpp was also off on previous update , so nothing changed… Now we have the option to enable it…
But since HA is using websockets , it doesnt matter anyway…! The problem with 250 , it broke websockets, not xmpp

But seems xmpp is coming back to HA, not sure if it will be already in 88.0 , but a fix is coming for websockets or for rollback to the old xmpp

1 Like

Thanks for this! Woke this morning and freaked out! I had to find the remote, haven’t seen it in a long time . LOL
At least this time there is a work around quickly.

Hi sorry im confused
I noticed my HA wont connect to my hub
My hub is running 4.15.250
My HA is 87.1
Ive enabled xampp via the app yet HA still isnt able go connect. How do i resolve this?

Me too, anyone got any solutions or ideas?
I have logs if you want/need.
I have reloaded harmony app and restarted harmony hub several times and went to logitech support page and followed directions there to update app and hub yhen enabled xmpp.
Even disabled restarted hub then re enabled again with no joy.