Russound error

Hi All,

I am trying to add in my audio zones via Russound, via russound_rnet, I am getting no response from russound it looks like but I am not sure. Here is the error.

Anyone seen this before? (I am running on a synology nas using docker. version 0.75.3

Thanks
Dave

Update for media_player.kitchen fails

Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/russound/russound.py”, line 165, in get_zone_info
self.send_data(send_msg)
File “/usr/local/lib/python3.6/site-packages/russound/russound.py”, line 245, in send_data
self.sock.send(data)
BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/src/app/homeassistant/helpers/entity.py”, line 199, in async_update_ha_state
yield from self.async_device_update()
File “/usr/src/app/homeassistant/helpers/entity.py”, line 322, in async_device_update
yield from self.hass.async_add_job(self.update)
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/app/homeassistant/components/media_player/russound_rnet.py”, line 91, in update
ret = self._russ.get_zone_info(‘1’, self._zone_id, 4)
File “/usr/local/lib/python3.6/site-packages/russound/russound.py”, line 184, in get_zone_info
return return_value
UnboundLocalError: local variable ‘return_value’ referenced before assignment

A few years later, but I’m seeing similar errors, see below. Any luck with this?

2020-12-12 01:20:42 DEBUG (SyncWorker_3) [russound.russound] Begin - controller= 1, zone= 1, get status
2020-12-12 01:20:42 DEBUG (SyncWorker_3) [russound.russound] Acquired lock for zone 1
2020-12-12 01:20:42 DEBUG (SyncWorker_3) [russound.russound] Released lock for zone 1
2020-12-12 01:20:42 DEBUG (SyncWorker_3) [russound.russound] End - controller= 1, zone= 1, get status 

2020-12-12 01:20:42 INFO (MainThread) [homeassistant.setup] Setup of domain zone took 0.3 seconds
2020-12-12 01:20:42 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.updater
2020-12-12 01:20:42 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event component_loaded[L]: component=zone>
2020-12-12 01:20:42 ERROR (MainThread) [homeassistant.components.media_player] russound_rnet: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/russound/russound.py", line 165, in get_zone_info
    self.send_data(send_msg)
  File "/usr/local/lib/python3.8/site-packages/russound/russound.py", line 245, in send_data
    self.sock.send(data)
BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 359, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 466, in async_device_update
    await task
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/russound_rnet/media_player.py", line 90, in update
    ret = self._russ.get_zone_info("1", self._zone_id, 4)
  File "/usr/local/lib/python3.8/site-packages/russound/russound.py", line 184, in get_zone_info
    return return_value
UnboundLocalError: local variable 'return_value' referenced before assignment

I was running ser2net in a linux container on proxmox, to make the serial port available to Russound Rnet integration. The issue was with permissions for the USB passthrough to the Linux container. Once that was sorted, the errors went away. I see though that if the connection is lost, the errors will re-appear and the integration won’t re-establish the connection once it’s up and running again.

Since I’m exploring Home Assistant while I have a running Indigo installation, this was great because both can be connected simultaneously. Also, the Russound configuration software could connect at the same time.

Another few years and I’ve seen this in my new setup using the Russound integration. I’ll try and do some testing but it does seem that it’s because it loses connection and then does not reconnect, which is kinda bad.

I’m using a moxa n5110 to connect to my russound. A restart of home assistant fixes it, but I don’t like that solution.

I use an HA “keep alive” automation to keep the connection from timing out. I do a small volume change to an unused zone on one of my dual Russound MCA-88 system every 59 minutes. This solved the issue for me and it has never lost the connection since I implemented it a couple years ago.

Here is the simple YAML for the automation.

alias: Russound Keep Alive Poll
trigger:
  - platform: time_pattern
    minutes: "59"
condition: []
action:
  - service: media_player.volume_set
    target:
      entity_id: media_player.zone_6
    data:
      volume_level: 0
mode: single

I think my issue is if the Russound loses power, HA won’t reconnect at all. It fails until HA restarts. Since the integration is hidden, there is not even a way to try and disable it and re-enable it in the ui.

Do you also have issues when the russound loses power, but HA remains up?

Sorry I haven’t been back here in awhile to see your reply.

I don’t ever lose power to my Russound system, so I don’t know what happens to HA in that case. I’m not sure why that would require an HA restart to resolve, but I’ve never tested it to confirm that theory. We are at our second home for the summer, and the Russound system is at our other home, so I have no way to test this now.