Issue with Russound / RIO

I’m having some success using Russound and RIO, with the following exception - every few hours or so, I get the following error in hass:

2019-01-23 01:17:19 ERROR (MainThread) [russound] Unhandled exception in IO loop
    Traceback (most recent call last):
      File "/srv/homeassistant/lib/python3.6/site-packages/russound_rio/rio.py", line 171, in _ioloop
        response = net_future.result()
      File "/usr/lib/python3.6/asyncio/streams.py", line 488, in readline
        line = yield from self.readuntil(sep)
      File "/usr/lib/python3.6/asyncio/streams.py", line 581, in readuntil
        yield from self._wait_for_data('readuntil')
      File "/usr/lib/python3.6/asyncio/streams.py", line 464, in _wait_for_data
        yield from self._waiter
      File "/usr/lib/python3.6/asyncio/selector_events.py", line 725, in _read_ready
        data = self._sock.recv(self.max_size)
    ConnectionResetError: [Errno 104] Connection reset by peer

This error kills the connectivity between hass and my Russound player, and the only way so far to fix the problem is to restart hass. Can anybody offer any help?

Thx

Stan

1 Like

same issue here… have you found any solution?

Sort of. I have a script that runs once an hour via an automation that just gets the current volume level from the Russound. Pinging the Russound once an hour seems to keep the connection open.

Hope this helps

Stan

would you mind to share?

Sure. The automation gets the current volume level of the zone ‘master_bed’ and sets the Russound to the same level. It’s possible that doing just one or the other would also keep the connection alive but I didn’t want to take a chance. :slight_smile:

- alias: Russound connection hack
  initial_state: True
  trigger:
    platform: time_pattern
    minutes: 59
  action:
   - service: media_player.volume_set
     data_template:
       entity_id: media_player.master_bed
       volume_level: '{{ states.media_player.master_bed.attributes.volume_level }}'

As a Total newb where would I put this script? and can I change ‘master_bed’ to any one of my sources e.g Living_room.

Thanks

This is really late, but for any googlers seeing this, you need to add that code to your “automations.yml” file. Find it in the File Editor tab.

Unfortunately, it doesn’t seem to completely fix the issue. I’ve found it keeps my MCA-C5 connected for longer, but overnight it will still disconnect, prompting the need to restart Homeassistant.

I’m somewhat savvy with this kind of stuff, so if somebody has any hints as to what might be causing the issue I can try to revise the integration code.

EDIT: So the automation fails if your target zone is ever off due to the volume attribute disappearing on the entity when turned off. As a workaround, I changed the action to toggle a random zone to essentially cycle it. This seems to have done the trick. A bandaid fix for now, but I plan on changing the automation to simply read a zone’s current power state and execute a command to keep it in that state. If that works, I’ll post the automation code here.