Harmony hub problems after update

Ok, will do that later today :wink:

Thanks. :slight_smile:

Watch, now it’s not going to happen again. :slight_smile:

Interesting as well that it was quite a while there weren’t issue and then suddenly 4 occurrences within 30 minutes. Did any other components report issues or so?

No, no other components, but I have HTML5 notification configured, but this platform is not reliable… Cause if smartphone is in deep sleep, the notification doesn’t come through
… So what I am trying to say is that the issue can be more frequently, do going to change also to email notification , so I will see all errors instanly

ok, just got a disconnect, but this time i think my red light on the hub was on, not 100% sure, i am not at home now… bit sometimes you see indeed ared light, i think is disconnected from cloud or something or wifi, because i was unable to ping the hub, but your code looks good, this time my automation did not the reconnect, it was your code
see log

EDIT: i think maybe the hub sometimes reboot or something, not sure why is was a few minutes offline
EDIT2 : ok, i know whats wrong, i have 2 accesspoints with same SSID? seems the hub was connected to the other accesspoint, much further away, thats why it was offline for a few minutes
but then again, it was a good test, as soon it was connected again on network, your code made the connection again

2019-04-04 19:17:28 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Response payload: None
2019-04-04 19:17:28 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Web socket closed
2019-04-04 19:17:28 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Listener stopped.
2019-04-04 19:17:28 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Connection closed, reconnecting
2019-04-04 19:17:28 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Closing sessions
2019-04-04 19:17:29 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Starting connect.
2019-04-04 19:17:29 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Connecting for hub 10271701
2019-04-04 19:17:35 ERROR (MainThread) [aioharmony.hubconnector] 192.168.0.21: Connection timed out for hub 10271701
2019-04-04 19:17:36 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Starting connect.
2019-04-04 19:17:36 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Connecting for hub 10271701
2019-04-04 19:17:44 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Starting connect.
2019-04-04 19:17:44 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Connecting for hub 10271701
2019-04-04 19:17:54 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Starting connect.
2019-04-04 19:17:54 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Connecting for hub 10271701

and some more of this

then when it was connected on network again...

2019-04-04 19:26:11 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Connecting for hub 10271701
2019-04-04 19:26:14 DEBUG (MainThread) [aioharmony.responsehandler] Registering handler sync with UUID 3cd75f46-6768-4c7f-bf01-145f7c40b844 that will expire on 2019-04-04 19:27:14.427848+02:00
2019-04-04 19:26:14 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Starting connect.
2019-04-04 19:26:14 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Connecting for hub 10271701
2019-04-04 19:26:17 ERROR (MainThread) [aioharmony.hubconnector] 192.168.0.21: Exception trying to establish web socket connection for hub 10271701: Cannot connect to host 192.168.0.21:8088 ssl:None [Host is unreachable]
2019-04-04 19:26:44 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Starting connect.
2019-04-04 19:26:44 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Connecting for hub 10271701
2019-04-04 19:27:17 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Starting connect.
2019-04-04 19:27:17 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Connecting for hub 10271701
2019-04-04 19:27:50 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Starting connect.
2019-04-04 19:27:50 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Connecting for hub 10271701
2019-04-04 19:27:50 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Listener started

edit 07/04:

ok, hub was offline for a min, not pingable on wifi, but reconnect was fine

2019-04-07 19:43:47 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Response payload: None
2019-04-07 19:43:47 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Web socket closed
2019-04-07 19:43:47 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Listener stopped.
2019-04-07 19:43:47 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Connection closed, reconnecting
2019-04-07 19:43:47 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Closing sessions
2019-04-07 19:43:48 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Starting connect.
2019-04-07 19:43:48 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Connecting for hub 10271701
2019-04-07 19:43:54 ERROR (MainThread) [aioharmony.hubconnector] 192.168.0.21: Connection timed out for hub 10271701
2019-04-07 19:43:55 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Starting connect.
2019-04-07 19:43:55 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Connecting for hub 10271701
2019-04-07 19:44:03 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Starting connect.
2019-04-07 19:44:03 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Connecting for hub 10271701
2019-04-07 19:44:13 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Starting connect.
2019-04-07 19:44:13 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Connecting for hub 10271701
2019-04-07 19:44:24 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Starting connect.
2019-04-07 19:44:24 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Connecting for hub 10271701
2019-04-07 19:44:43 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Starting connect.
2019-04-07 19:44:43 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Connecting for hub 10271701
2019-04-07 19:44:43 DEBUG (MainThread) [aioharmony.hubconnector] 192.168.0.21: Listener started
1 Like

Excellent. Looks like you might have some other issues going on with your Hub itself causing these kinds of disconnects. Something you might wanna look into as I’m sure that even with XMPP this will cause problems.
Only thing I think is that before the reconnect with Web Sockets did not always work right and thus you could really see the problem.

But, from a reconnect perspective it is a good test. :slight_smile: PR was merged so figuring this will go in with 0.92.

ok, thnx for the updates

on every disconnect now, it was indeed a wifi issue, here, because i was not able to ping
afterwards, the reconnect was fine
waiting for 92.0 now :slight_smile :slight_smile:
btw, xmpp also coming in 92 ?

Nope, issue with XMPP is still in the supporting library in combination with Home Assistant (there are other XMPP components within HA with same issue). It also seems that the potential “fix” that was proposed for that supporting library breaks something else.

The other issue also is that this works outside of HA. It is just when it is used as part of HA that the problem occurs.

1 Like

I am on version 0.92 and was still getting the intermittent unable to connect to hub messages on startup. I may have found a workaround (so far so good anyway): I noticed ehendrix commented further up the thread “Seems to be something related to IPv6 and suggested solution is to ensure socket is only opened for IPv4”. HA only listens to IPv4 by default and I wasn’t setting “base_url” (allowing it to default to local address). On the theory that base_url may sometimes be picking up an IPv6 local address I added my IPv4 address to configuration.yaml (base_url: http://192.168.0.140:8123) - so far no more hub disconnect messages…

3 Likes

Hi, I’m on 0.91.4 and already have the issues as well. Intermediate connection fail which causes entries in my log.

Sat May 11 2019 22:12:11 GMT+0200 (Mitteleuropäische Sommerzeit)
Error during and-condition: unsupported operand type(s) for -: ‘float’ and ‘NoneType’

Sat May 11 2019 22:12:11 GMT+0200 (Mitteleuropäische Sommerzeit)
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/homeassistant/components/automation/init.py”, line 282, in async_trigger
if not skip_condition and not self._cond_func(variables):
File “/usr/local/lib/python3.7/site-packages/homeassistant/components/automation/init.py”, line 403, in if_action
return all(check(hass, variables) for check in checks)
File “/usr/local/lib/python3.7/site-packages/homeassistant/components/automation/init.py”, line 403, in
return all(check(hass, variables) for check in checks)
File “/usr/local/lib/python3.7/site-packages/homeassistant/helpers/condition.py”, line 352, in template_if
return async_template(hass, value_template, variables)
File “/usr/local/lib/python3.7/site-packages/homeassistant/helpers/condition.py”, line 331, in async_template
value = value_template.async_render(variables)
File “/usr/local/lib/python3.7/site-packages/homeassistant/helpers/template.py”, line 140, in async_render
return self._compiled.render(kwargs).strip()
File “/usr/local/lib/python3.7/site-packages/jinja2/asyncsupport.py”, line 76, in render
return original_render(self, *args, **kwargs)
File “/usr/local/lib/python3.7/site-packages/jinja2/environment.py”, line 1008, in render
return self.environment.handle_exception(exc_info, True)
File “/usr/local/lib/python3.7/site-packages/jinja2/environment.py”, line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File “/usr/local/lib/python3.7/site-packages/jinja2/_compat.py”, line 37, in reraise
raise value.with_traceback(tb)
File “”, line 1, in top-level template code
TypeError: unsupported operand type(s) for -: ‘float’ and ‘NoneType’

both errors appeared exactly when the remote returned “unavailable”
I do have configured base_url. So I believe, that this is at least not the only issue

I haven’t had th issue “connection timed out for hub” for months and now with 0.99.2 the first time again, 24 times in two days.

I obviously solved that issue as I had configured http with nabu casa link.
I changed to duckdns and the issue is away.
Harmony might not able to handle other adresses then IP or dns

1 Like

Can you state what exactly you saw and did?

Thx.

I never had any issued anymore since those last changes

1 Like

This was for @Pirol62. :slight_smile:

ow ok, btw, seems its already 7 months ago, damn time flies

Oh sorry, I definately can not remember. I’m getting older :thinking:
But I haven’t seen this error in 100.x
On the other Hand I still have configured http with duckdns

Hi All,

I have HA 0.103.4 and get the error also:

2019-12-28 12:44:45 ERROR (MainThread) [aioharmony.hubconnector] 192.168.100.5: Connection timed out for hub 9866324

Logitech Hub version: 4.15.250
Build: 44

So far every connection timed out issue has been related back to network. It seems that the Hub is not as good in keeping network connections, especially with mesh networking.

I have only 1 TP-Link Deco M5, disabled mesh because I don’t need it.
Also reported at TP-Link, more devices lost sometimes their connection, so its a stability issue of Deco M5.

Never had problems with my Apple Time Capsule as Router…