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?
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.
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.
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.
I recently took over development of the Russound RIO integration & library.
I added an automatic keep-alive msg (by calling the RIO “VERSION” cmd) every 15 minutes. This prevents the connection from falling asleep and is baked into the integration so no additional automations are necessary.
This will be available in HA 2024.8 when it is released in August.
Thanks so much man. This has been super annoying to monkey with. I’d use RNET since my HAOS is running on a little box with a bunch of serial ports, but the RNET integration only works over IP (not sure why I can’t just specify the hardware port ID) and I really don’t want to setup an entire 3rd device as an intermediary… I can wait until August.
I was confused as to why all of my zones disappeared after a recent update. After checking the release notes I was pleasantly surprised to see that there was a new Russound integration included in the latest update.
Thanks so much for making that happen! Glad to finally have everything working properly without any weird hacks needed.