Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Harmony hub error with new firmware 4.15.250 #21191

Closed
KentEkl opened this issue Feb 18, 2019 · 30 comments · Fixed by #21213
Closed

Harmony hub error with new firmware 4.15.250 #21191

KentEkl opened this issue Feb 18, 2019 · 30 comments · Fixed by #21213

Comments

@KentEkl
Copy link

KentEkl commented Feb 18, 2019

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
Copy link

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

I hope this gets fixed soon

@SeanPM5
Copy link
Contributor

SeanPM5 commented Feb 18, 2019

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
Copy link

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
Copy link
Contributor

SeanPM5 commented Feb 19, 2019

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
Copy link

Doesnt seem the warranty thing is a real issue
maddox/harmony-api#106

@whoamib2
Copy link

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

@chreestopher
Copy link

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
Copy link

e-krebs commented Feb 19, 2019

Same problem here :

  • harmony hub 4.15.250 + xmpp activated
  • hass.io (rpi3) 0.87.1

@WhistleMaster
Copy link

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
Copy link

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
Copy link
Contributor

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

@foosel
Copy link

foosel commented Feb 19, 2019

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):

  • In your Harmony App, go into the Hub/Remote/Device configuration, enable XMPP (it will throw a couple of scary warnings at you)
  • Download harmony.py from 0.84.3 (last version with XMPP support).
  • Put it into custom_components/remote
  • Restart Home Assistant

Should work again without flooding the log with errors.

@pergolafabio
Copy link

@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
Copy link

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
Copy link
Contributor

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
Copy link
Contributor

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

@pergolafabio
Copy link

@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
Copy link

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

@ehendrix23
Copy link
Contributor

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
Copy link

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

  • alias: Harmony monitor
    trigger:
    platform: state
    entity_id: remote.harmony
    to: 'unavailable'
    action:
    • service: notify.html5
      data_template:
      message: >
      Harmony is {{ states('remote.harmony') }}, trying to sync
    • service: remote.harmony_sync
      entity_id: remote.harmony

@pergolafabio
Copy link

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
Copy link
Contributor

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
Copy link

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
Copy link
Contributor

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
Copy link

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

@ghost ghost removed the in progress label Feb 19, 2019
@brent20
Copy link

brent20 commented Feb 20, 2019

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
Copy link

qJake commented Feb 21, 2019

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
Copy link

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
Copy link

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
Copy link
Contributor

amelchio commented Feb 21, 2019

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

@home-assistant home-assistant locked as resolved and limited conversation to collaborators Feb 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.