home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.69k stars 30.82k forks source link

Harmony hub error with new firmware 4.15.250 #21191

Closed KentEkl closed 5 years ago

KentEkl commented 5 years ago

Harmony hub does not work after updating the firmware to 4.15.250 with the new support for XMPP.

Messages from the log. 2019-02-18 21:09:27 INFO (MainThread) [homeassistant.components.remote] Setting up remote.harmony 2019-02-18 21:09:27 INFO (MainThread) [homeassistant.components.harmony.remote] Loading Harmony Platform: Harmony Hub at 192.168.1.92:8088, startup activity: None 2019-02-18 21:09:27 ERROR (MainThread) [aioharmony.hubconnector] 192.168.1.92: Exception on post: 0, message='Attempt to decode JSON with unexpected mimetype: ' 2019-02-18 21:09:27 ERROR (MainThread) [aioharmony.hubconnector] 192.168.1.92: Unable to retrieve HUB id

Kugelfang666 commented 5 years ago

same problem with my setup, quite annoying to be honest.....

I hope this gets fixed soon

SeanPM5 commented 5 years ago

Having the same issue here, nothing Harmony related works.

This is the log error whenever I attempt to start a Harmony activity.

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/service.py", line 289, in _handle_service_platform_call
    await getattr(entity, func)(**data)
  File "/config/custom_components/remote/harmony.py", line 302, in async_turn_on
    await self._client.start_activity(activity_id)
  File "/config/deps/lib/python3.6/site-packages/aioharmony/harmonyapi.py", line 204, in start_activity
    activity_id=activity_id)
  File "/config/deps/lib/python3.6/site-packages/aioharmony/harmonyclient.py", line 494, in start_activity
    self.name,
  File "/config/deps/lib/python3.6/site-packages/aioharmony/harmonyclient.py", line 99, in name
    name = self._hub_config.info.get('friendlyName')
AttributeError: 'NoneType' object has no attribute 'get'
SenexCrenshaw commented 5 years ago

Same here. You have to enable XMPP as well. Has anyone been able to do this? https://community.logitech.com/s/question/0D55A00008OsX3CSAV/update-to-accessing-harmony-hubs-local-api-via-xmpp

My app keeps timing out. As far as the fix here. Last time a fix was made in no time. These devs are amazing!

SeanPM5 commented 5 years ago

Same here. You have to enable XMPP as well. Has anyone been able to do this? https://community.logitech.com/s/question/0D55A00008OsX3CSAV/update-to-accessing-harmony-hubs-local-api-via-xmpp

My app keeps timing out. As far as the fix here. Last time a fix was made in no time. These devs are amazing!

I followed the instructions on this page - the warnings were very extreme, basically saying my warranty would be voided etc. I was able to follow the instructions and enable XMPP, then rebooted Home Assistant, but now it's just not connecting to my hub at all. The entity doesn't show up in HA at all. I would recommend against doing this for now.

2019-02-18 18:53:03 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.1.4: Retrieving Harmony Hub information.
2019-02-18 18:53:03 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.1.4: Sending post request: {'id ': 1, 'cmd': 'connect.discoveryinfo?get', 'params': {}}
2019-02-18 18:53:05 ERROR (MainThread) [aioharmony.hubconnector] 192.168.1.4: Exception on post: 0, message='Attempt to decode JSON with unexpected mimetype: '
2019-02-18 18:53:05 ERROR (MainThread) [aioharmony.hubconnector] 192.168.1.4: Unable to retrieve HUB id
2019-02-18 18:53:05 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.1.4: Disconnecting
SenexCrenshaw commented 5 years ago

Doesnt seem the warranty thing is a real issue https://github.com/maddox/harmony-api/issues/106

whoamib2 commented 5 years ago

I have the same issue on all of my harmony hubs as of today. Please give me a path to resolve?!?!?!

chreestopher commented 5 years ago

Im seeing the same issue...

I have enabled xmpp via the harmony app on my phone , and restarted the harmony device several times to no avail.

This seems like the firmware is busted.

If you connect t he harmony back to your computer and have the MyHarmony software installed you can press Alt + f9 from the login screen and then select your remote/hub from the list and choose to restore the previous firmware..

I just did this and my harmony and home assistant are back to working together!

The downside is any time you make changes in the harmony app it forces a firmware update so you will have to redo the steps .. I havent found a way to disable automatic firmware updates,

I hope logitech will learn to be a little less troublesome with their updates / plans to box us into their software

e-krebs commented 5 years ago

Same problem here :

WhistleMaster commented 5 years ago

Same issue with my Harmony hub (4.15.250), I have the following error in HA (0.87.1) log:

ERROR (MainThread) [aioharmony.hubconnector] XXX.XXX.X.X: Exception on post: 0, message='Attempt to decode JSON with unexpected mimetype: ',
ERROR (MainThread) [aioharmony.hubconnector] XXX.XXX.X.X: Unable to retrieve HUB id
pergolafabio commented 5 years ago

Guys, enabling xmpp has no influence.... HA is using websockets since 86.3.. So if you want xmpp and a working hub, you need to load the harmony.py file from an older HA release as a custom component

That's what I am doing right now with 250 firmware

amelchio commented 5 years ago

Reported upstream. If @ehendrix23 does not show up, I will try fixing this tonight.

foosel commented 5 years ago

So if you want xmpp and a working hub, you need to load the harmony.py file from an older HA release as a custom component

So, just to put this into a step-by-step kinda deal, if you have Harmony Hub firmware version 4.15.250 and are running Home Assistant >0.84.3 (not 0.86.3 as said a couple of times now):

Should work again without flooding the log with errors.

pergolafabio commented 5 years ago

@amelchio isnt it possible anymore to go back to xmpp again? (officially) with updated HA documentation that you need to enable it in the harmony app? or maybe as an option in the yaml.file because with websockets, its working, but we see the state of the harmony to go to "unavailable" after while, this has been reported by many users on forum? or its because websockets vesion is still not 100% ? maybe with some issues, beceuase it was a quickfix a while ago? are you going to improbe websockets then?

reneboer commented 5 years ago

Hi, found a quick fix by a small change to request_hub_info. The request should be request_body = '{"id":1,"cmd":"setup.account?getProvisionInfo"}' Change Origin in the header to 'http://sl.dhg.myharmony.com' The remote_ID is now in data.activeRemoteId

They may also block this on a next release, but gets this going again quickly.

ehendrix23 commented 5 years ago

Hi, found a quick fix by a small change to request_hub_info. The request should be request_body = '{"id":1,"cmd":"setup.account?getProvisionInfo"}' Change Origin in the header to 'http://sl.dhg.myharmony.com' The remote_ID is now in data.activeRemoteId

They may also block this on a next release, but gets this going again quickly.

THANK YOU!!!! I was going to see if there was a quick fix for this. So thank you for informing what it is. Updated versions coming. :-)

ehendrix23 commented 5 years ago

PS, will be working on switching it to XMPP (supported from Logitech perspective) but at least this gives me some time.

pergolafabio commented 5 years ago

@ehendrix23 there are also some complaints on the forums, that frequently the state of the hub goes to unavailable is this issue known for you? are improvments coming in websockets version?

pergolafabio commented 5 years ago

ah ok, i see you replied just before me so that means you are going to drop websockets and go back to xmpp ?

ehendrix23 commented 5 years ago

ah ok, i see you replied just before me so that means you are going to drop websockets and go back to xmpp ?

Yes, as that is what Logitech then "supports". Otherwise we will keep on chasing them like this. It will be based on the new aioharmony as that one is based on asyncio whereas the previous library (pyharmony) is not.

Haven't seen/heard about state going to unavailable (haven't been much in forums either). But will 1st concentrate on XMPP and once that is released see if issues still exist or not.

pergolafabio commented 5 years ago

ah ok , thats good yes, lots of compaints about the websockets edition, i had them also , i even had an automation running to fix it :) , but i switched back to an older harmony.py file as custom component

pergolafabio commented 5 years ago

anyway, i am using the older harmony.py file now with firmware 250 , i load it as a custom component, no issues with that one, just enabled xmpp in the harmony android app

ehendrix23 commented 5 years ago

Wish an issue had been reported on this. :-)

Are you running on HASSIO? I have 2 Harmony HUBs here at home and never have the issue that they go to unavailable. Just wondering if it has something with platform it is running on.

pergolafabio commented 5 years ago

yes, i am running hassio (hassos) see here , other uses reported the same disconnect issues if it disconnects, it doesnt connect again,=> then unavaible untill you do a resync, then its working again for a while, a couple of hours ...

https://community.home-assistant.io/t/new-harmony-problem-in-0-85-hassio-looses-connection-after-a-while/90987/6

ehendrix23 commented 5 years ago

We'll see how XMPP does. Does make me wonder if it is an issue with OS it is running on (or implementation of something in Python or so on the OS). Connection timed out provided there means HUB did not respond. Similar, host not reachable is a OS error.

Have someone else with similar issues like this but for another component, also running on HASSIO where errors like host unreachable, disconnects, time outs occur.

pergolafabio commented 5 years ago

yes, xmpp is indeed stable , no idea what the cause was glad that xmpp is going to be back, or maybe you give an option to the end users? so then can choose tme self in the config.yaml file ? like xmpp = true/false? or websockets = true/false

brent20 commented 5 years ago

Howdy, i just upgraded to the latest release of Home Assistant this evening and found that I had this issue as well. incredible to see it's already been addressed and fixed! When could we see this merged PR issued in a point release? Thanks all!

qJake commented 5 years ago

Was having the same issue, thanks for the quick turnaround and getting this pushed out as an interim fix! Would like to see the long-term support moved to the official API, but I'm very glad my Harmony integration won't be broken for much longer.

kbuchaniec commented 5 years ago

Argh.. Nothing like the bleeding edge. I just installed Hass.io last week and I got everything added working in my home except my Harmony Hubs (and Plex). I was already at 4.15.250 and saw some other threads before seeing this one and had rolled back to 4.15.210 just last night using the Harmony desktop app which was supposed to enable XMPP (I guess the option to control XMPP in the app was in 4.15.250). My HA is now at Hass.io 0.88.0... so the older harmony.py from 0.84.3 will work? And if my Hubs updates to 4.15.250, I just enable XMPP?

pergolafabio commented 5 years ago

indeed, old harmony.py file, enable xmpp if on 88.0 and use original harmony.py file, it uses websockets then YOU NEED 250 firmware

amelchio commented 5 years ago

I am going to lock this issue now. Please file new issues if you find bugs and use the forum for support. Thanks.