New Harmony Problem in 0.85: HASSIO looses connection after a while

Dear all,

I’ve been using the Harmony integration for a long time and without any issues up to 0.84. Currently I’m running my Harmony on the. beta FW to have the XMPP integration. My integration looks like this:

remote:
  - platform: harmony
    name: HarmonyHub
    host: XXX.XXX.XXX.XXX
    port: 5222  
    activity: Sonos

Since I updated to 0.85 I have the following problem: right after a fresh boot of HASIO everything works as intended. However, after a couple of hours HASSIO looses the connection to the harmony hub. To fix this I need to reboot the whole system. Has there been any change to the integration from 0.84 to 0.85?

0.85 uses the websocket version of harmony. If you plan on using the beta FW with XMPP you need to grab the 0.84.3 version of harmony and set it up as a custom component. Otherwise take yourself off the beta and the websocket version should work as intended in 0.85.

thanks for the reply!

I’ll give it a try, but what I do not understand is why does this problem occur after some hours? I would expect that such a problem should result in it not working at all

I haven’t updated to 0.85 yet as im waiting for a few fixes before migrating but there was also some improvements to the websocket in this version. You can always turn on a debug log of the component if u want to see whether it reports why it disconnects.

Interesting, I updated my hub to the non beta version (206) and removed the port from the config. ever since ists working stable now…

Hello,

Same problem, but not solved with rollback to 206.

I have a basic integration:

remote:
  - platform: harmony
    name: salon
    host: 192.168.0.18

Currently i’am on Hassio 0.85.1

Logger in debug

logger:
  default: critical
  logs:
    homeassistant.components.remote.harmony: debug
    pyharmony.client: debug
    websockets: debug

but no explicity error:

2019-01-19 12:34:07 INFO (MainThread) [homeassistant.components.remote.harmony] Loading Harmony Platform: salon at 192.168.0.18:8088, startup activity: None
2019-01-19 12:34:07 DEBUG (MainThread) [homeassistant.components.remote.harmony] salon: Device init started
2019-01-19 12:34:07 DEBUG (MainThread) [homeassistant.components.remote.harmony] salon: Harmony Hub added
2019-01-19 12:34:07 DEBUG (MainThread) [homeassistant.components.remote.harmony] salon: Connecting
2019-01-19 12:34:09 DEBUG (MainThread) [homeassistant.components.remote.harmony] salon: configuration has been updated
2019-01-19 12:34:09 DEBUG (MainThread) [homeassistant.components.remote.harmony] salon: activity reported as: Regarder la TV
2019-01-19 12:34:09 DEBUG (SyncWorker_9) [homeassistant.components.remote.harmony] salon: Writing hub config to file: /config/harmony_salon.conf
2019-01-19 12:34:09 DEBUG (MainThread) [homeassistant.components.remote.harmony] salon: activity reported as: Regarder la TV
2019-01-19 12:34:09 DEBUG (MainThread) [homeassistant.components.remote.harmony] salon: connected to the HUB.
...
2019-01-19 20:47:58 DEBUG (MainThread) [homeassistant.components.remote.harmony] salon: disconnected from the HUB.

I’m getting a similar problem to this, works fine for a while then disconnects and doesn’t reconnect.

2019-01-20 15:17:44 INFO (MainThread) [homeassistant.components.remote.harmony] Loading Harmony Platform: Lounge at 192.168.1.69:8088, startup activity: None
2019-01-20 15:17:44 DEBUG (MainThread) [homeassistant.components.remote.harmony] Lounge: Device init started
2019-01-20 15:17:44 DEBUG (MainThread) [homeassistant.components.remote.harmony] Lounge: Harmony Hub added
2019-01-20 15:17:44 DEBUG (MainThread) [homeassistant.components.remote.harmony] Lounge: Connecting
2019-01-20 15:17:45 DEBUG (MainThread) [homeassistant.components.remote.harmony] Lounge: activity reported as: None
2019-01-20 15:17:45 DEBUG (MainThread) [homeassistant.components.remote.harmony] Lounge: configuration has been updated
2019-01-20 15:17:46 DEBUG (MainThread) [homeassistant.components.remote.harmony] Lounge: activity reported as: TV
2019-01-20 15:17:46 DEBUG (SyncWorker_1) [homeassistant.components.remote.harmony] Lounge: Writing hub config to file: /config/harmony_lounge.conf
2019-01-20 15:17:46 DEBUG (MainThread) [homeassistant.components.remote.harmony] Lounge: activity reported as: TV
2019-01-20 15:17:46 DEBUG (MainThread) [homeassistant.components.remote.harmony] Lounge: connected to the HUB.
2019-01-20 15:44:30 DEBUG (MainThread) [homeassistant.components.remote.harmony] Lounge: Send Command
2019-01-20 15:44:30 DEBUG (MainThread) [homeassistant.components.remote.harmony] Lounge: Device 29590173 is numeric
2019-01-20 15:44:30 DEBUG (MainThread) [homeassistant.components.remote.harmony] Lounge: Sending commands
2019-01-20 15:44:32 DEBUG (MainThread) [homeassistant.components.remote.harmony] Lounge: Send Command
2019-01-20 15:44:32 DEBUG (MainThread) [homeassistant.components.remote.harmony] Lounge: Device 29590173 is numeric
2019-01-20 15:44:32 DEBUG (MainThread) [homeassistant.components.remote.harmony] Lounge: Sending commands
2019-01-20 16:08:24 DEBUG (MainThread) [homeassistant.components.remote.harmony] Lounge: disconnected from the HUB.

The problem also came back with my setup although I went back to 206. I also posted the issue on GitHub and it has already been fixe. Now we just have to wait on the next release so the PR gets included

cool, just found that resyncing reconnects so at least there’s a quick and easy workaround, I can put a button on screen for the wife and kids to resync if they have an issue.

Hi, what do you mean by resyncing? And what are you using for a button for this?
thanks

Hi,

Call the service remote.harmony_sync with the name of your hub.

You can add that to anywhere that lets you create a button with a tap_action or hold_action of “service”

1 Like

thanks for the tip, I am now trying this automation:

- alias: Harmony monitor
  trigger:
    platform: state
    entity_id: remote.harmony_hub
    to: 'unavailable'
  action:
    - service: notify.pushbullet
      data_template:
        message: >
          Harmony is {{ states('remote.harmony_hub') }}, trying to sync
    - service: remote.harmony_sync
- service: remote.harmony_sync
  data:
    entity_id: remote.harmony_hub
3 Likes

@narwun

you have 2 times a service call? isnt that wrong? or not necesarry?

i think it needs to be changed to :slight_smile:

- 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
1 Like

haha thats right, my actual automation is correct, I messed up when I edited the post :sweat_smile:

Automation need to be fine tune tho, it doesn’t work every time…

well, for the moment , not an isssue yet, installed 85.1 yesterday, all stable here
have fixed ip for my harmony in config file
but hassio not running 24 hours yet :slight_smile:

same for me, harmony disconnects at random after a while…
What could be the root cause here ?

So far the automation works, but still there is a root problem. I get the following:

192.168.1.160: Connection timed for hub 9538068

Never got this before 0.85.

I’m running 0.85.1 and I am also seeing my harmony stop working after some time. This is the 2nd time it has happened in the past few days.

I see this in the log file:
ERROR (MainThread) [aioharmony.hubconnector] 192.168.86.55: Connection timed for hub 12065580

I also see that the Harmony Hub is unavailable:

Yes, I’ve been having the same issues as you and banging my head trying to figure out the issue. I’m running the XMPP beta firmware on the Harmony and HA 0.85.1. I’ve also noticed sometimes the remote.harmony_hub is turned off for some reason, and I have to enable it again in the Home Assistant UI.

Also probably unrelated but for some reason, all my automations that are tied to using the Harmony hub become disabled. I’m still trying to figure out why that happens.