Snapcast component configuration issues

I use HA to control my snapcast server - while I was on version 0.44 I was able to do so. However, since upgrading to 0.47 I cant access the snapcast component. I have gone ahead and reinstalled the latest build of snapcast which should be 0.11.1 - which should work but no luck.

Here is the error log I see on the webpage:
2017-06-27 23:17:37 ERROR (MainThread) [homeassistant.core] Error doing job: Exception in callback _SelectorSocketTransport._read_ready()
Traceback (most recent call last):
File “/usr/lib/python3.4/asyncio/events.py”, line 120, in _run
self._callback(*self._args)
File “/usr/lib/python3.4/asyncio/selector_events.py”, line 589,
in _read_ready self._protocol.data_received(data)
File “/home/homeassistant/.homeassistant/deps/snapcast/control/protocol.py”, line 40, in data_received
data = json.loads(cmd)
File “/usr/lib/python3.4/json/init.py”, line 318, in loads
return _default_decoder.decode(s)
File “/usr/lib/python3.4/json/decoder.py”, line 343, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python3.4/json/decoder.py”, line 359, in raw_decode
obj, end = self.scan_once(s, idx)
ValueError: Unterminated string starting at: line 1 column 1444 (char 1443)
2017-06-27 23:17:37 ERROR (MainThread) [homeassistant.core] Error doing job: Exception in callback _SelectorSocketTransport._read_ready()
Traceback (most recent call last):
File “/usr/lib/python3.4/asyncio/events.py”, line 120, in _run
self._callback(*self._args)
File “/usr/lib/python3.4/asyncio/selector_events.py”, line 589, in _read_ready self._protocol.data_received(data)
File “/home/homeassistant/.homeassistant/deps/snapcast/control/protocol.py”, line 40, in data_received
data = json.loads(cmd)
File “/usr/lib/python3.4/json/init.py”, line 318, in loads
return _default_decoder.decode(s)
File “/usr/lib/python3.4/json/decoder.py”, line 346, in decode
raise ValueError(errmsg(“Extra data”, s, end, len(s)))
ValueError: Extra data: line 1 column 4 - line 1 column 502 (char 3 - 501)
2017-06-27 23:17:46 WARNING (MainThread) [homeassistant.setup] Setup of media_player is taking over 10 seconds.
2017-06-27 23:17:46 WARNING (MainThread) [homeassistant.components.media_player] Setup of platform snapcast is taking over 10 seconds.
2017-06-27 23:18:36 ERROR (MainThread) [homeassistant.components.media_player] Setup of platform snapcast is taking longer than 60 seconds. Startup will proceed without waiting any longer.

Are you able to access your server with a 0.11 client? I’m using this component with a 0.11 server without any issue, so it should be possible to get it working on your setup too :slight_smile:

It looks like you’re hitting a bug in the python-snapcast module that some users experience. It was fixed in the latest python-snapcast code, but it hasn’t been included in Home Assistant yet.

Is there a way to pull the latest python-snapcast code in?

pip install --upgrade snapcast, and make sure snapcast isn’t in your deps directory.

I pushed 1.0.7 last night, which has the fix included.

So I may be doing something wrong (I am fairly certain I am doing something wrong actually) but here is what I did.

  • my snapcast server (on a different rpi in my network) and all clients are v0.11.1.
  • I did pip install snapcast on the rpi running HA
  • today i did pip install --upgrade snapcast on the HA rpi
  • I saw a snapcast folder in the deps directory under /home/homeassistant/ (not sure of the full path coz I am at work)

I still get the issue - I havent had time to compare old and new error logs. I am sure I am missing a step or something in between…

So I spent more time on this over the last few days - here are things I have tried.

  • delete /home/homeassistant and /srv/homeassistant, start a fresh AIO install
  • when full install done, go into the virtual environment, run the pip install command you mentioned and verify the 1.0.7 package is present in the python site-packages folder
  • delete the snapcast folder and 2.0.6 folder that shows in deps folder under /home/homeassistant/.homeassistant folder
  • add in the snapcast configuration information again

And I get the same error as before.

Updated to 0.48.1 - still see same issue.

Updated to 0.49 - still same issue. Any help with this would be really appreciated. I use homeassistant mostly for snapcast and with this issue, I am unable to do much with snapcast at all.