Note Getting Sonos State

Posted on
Sat Mar 05, 2016 7:14 pm
bkmar1192 offline
Posts: 274
Joined: Sep 12, 2015

Note Getting Sonos State

I am not getting any state information from any of my Sonos devices. Any help would be appreciated...

I am getting this error in the error log;

Sonos Error Error in plugin execution stopConcurrentThread:

Traceback (most recent call last):
File "plugin.py", line 64, in stopConcurrentThread
File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/Sonos.indigoPlugin/Contents/Server Plugin/Sonos.py", line 412, in stopConcurrentThread
File "plugin.py", line 70, in deviceStopComm
File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/Sonos.indigoPlugin/Contents/Server Plugin/Sonos.py", line 228, in deviceStopComm
File "./lib/soco/events.py", line 566, in unsubscribe
File "./lib/requests/models.py", line 840, in raise_for_status
<class 'requests.exceptions.HTTPError'>: 412 Client Error: Precondition Failed for url: http://10.0.1.33:1400/MediaRenderer/AVTransport/Event

Anything else I can provide to help debug?

Posted on
Sun Mar 06, 2016 8:27 am
nlagaros offline
Posts: 1646
Joined: Dec 20, 2010

Re: Note Getting Sonos State

You get this when restarting the plugin? What version of the plugin are you using? If you are on v0.9.3, can you tell me what sources & music services you have in "Sonos Favorites". There may be one that I have not accounted for in the code. Thanks.

bkmar1192 wrote:
I am not getting any state information from any of my Sonos devices. Any help would be appreciated...

I am getting this error in the error log;

Sonos Error Error in plugin execution stopConcurrentThread:

Traceback (most recent call last):
File "plugin.py", line 64, in stopConcurrentThread
File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/Sonos.indigoPlugin/Contents/Server Plugin/Sonos.py", line 412, in stopConcurrentThread
File "plugin.py", line 70, in deviceStopComm
File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/Sonos.indigoPlugin/Contents/Server Plugin/Sonos.py", line 228, in deviceStopComm
File "./lib/soco/events.py", line 566, in unsubscribe
File "./lib/requests/models.py", line 840, in raise_for_status
<class 'requests.exceptions.HTTPError'>: 412 Client Error: Precondition Failed for url: http://10.0.1.33:1400/MediaRenderer/AVTransport/Event

Anything else I can provide to help debug?

Posted on
Wed Mar 09, 2016 12:53 am
bkmar1192 offline
Posts: 274
Joined: Sep 12, 2015

Re: Note Getting Sonos State

I think it is working now - not sure what changed but it looks like it is getting the info now. I will let you know if I have problems again. Thanks for the help and for the plugin.

Posted on
Wed Mar 09, 2016 2:35 pm
CMaruf offline
Posts: 1
Joined: Mar 09, 2016

Re: Note Getting Sonos State

I seem to be having the same problem. I am using indigo version 6.1.6 and the sonos plugin version 9.4. When I add a sonos device, there is no state information for them and no triggers on state work. But if I run an action group telling it to play for example, it works. It doesn't seem to be generating errors in the log file. I am not sure what I am doing wrong but any help anyone can provided would be much appreciated!


Here is my log file in case:

Reloading plugin "Sonos 0.9.4"
Stopping plugin "Sonos 0.9.4" (pid 66031)
Stopped plugin "Sonos 0.9.4"
Starting plugin "Sonos 0.9.4" (pid 66053)
Started plugin "Sonos 0.9.4"
Sonos Your plugin version, v0.9.4, is current.
Sonos Adding ZonePlayer: 10.0.1.151, RINCON_000E58CF48E801400, Sonos Dining Room
Sonos Adding ZonePlayer: 10.0.1.156, RINCON_000E58ABB1D801400, Sonos Receiver
Sonos Loaded Sonos Favorites... [0]
Sonos Loaded Playlists... [23]
Sonos Loaded RadioTime Favorite Stations... [1]
Sonos Loaded SiriusXM Stations.. [370]
Sonos Adding ZonePlayer: 10.0.1.151, RINCON_000E58CF48E801400, Sonos Dining Room
Sonos Adding ZonePlayer: 10.0.1.156, RINCON_000E58ABB1D801400, Sonos Receiver
Sonos Serving HTTP Streamer on 10.0.1.143 [0.0.0.0], port 8888

Mar 9, 2016, Mar 9, 2016 3:33:22 PM
Sonos ZonePlayer: Sonos Dining Room, Save Queue: Indigo_RINCON_000E58CF48E801400
Sonos Loaded Playlists... [23]
Sonos LineIn: RINCON_000E58ABB1D801400, Mac Computer:BACKYARD (RCVR)

Mar 9, 2016, Mar 9, 2016 3:34:01 PM
Sonos ZonePlayer: Sonos Dining Room, Save Queue: Indigo_RINCON_000E58CF48E801400
Sonos Loaded Playlists... [23]
Sonos LineIn: Removed: RINCON_000E58ABB1D801400, Mac Computer:BACKYARD (RCVR)
Sonos LineIn: RINCON_000E58ABB1D801400, Mac Computer:BACKYARD (RCVR)

Mar 9, 2016, Mar 9, 2016 3:34:40 PM
Sonos ZonePlayer: Sonos Dining Room, Save Queue: Indigo_RINCON_000E58CF48E801400
Sonos Loaded Playlists... [23]
Sonos ZonePlayer: Sonos Dining Room, Save Queue: Indigo_RINCON_000E58CF48E801400

Mar 9, 2016, Mar 9, 2016 3:35:31 PM
Sonos Loaded Playlists... [23]
Sonos ZonePlayer: Sonos Receiver, Nothing in Queue to Save

Posted on
Wed Mar 09, 2016 2:44 pm
rapamatic offline
Posts: 276
Joined: Aug 03, 2015
Location: Glencoe, IL

Re: Note Getting Sonos State

I've been having similar issues.... I'll often see no errors in the log but then get errors when I stop the plugin... I'm at work now, can post log messages when I get home if it helps...

Posted on
Thu Mar 10, 2016 8:51 am
nlagaros offline
Posts: 1646
Joined: Dec 20, 2010

Re: Note Getting Sonos State

I am pretty sure that the new event library I am using is missing code for one of the sources of music. Can you tell me all of the music sources and services that you use?

Posted on
Thu Mar 10, 2016 8:59 am
rapamatic offline
Posts: 276
Joined: Aug 03, 2015
Location: Glencoe, IL

Re: Note Getting Sonos State

Apple Music and Spotify are used 95% of the time.

Beyond that I do have the following turned on in my system:
TuneIn Radio
Amazon Music
iHeartRadio
Pandora
Soundcloud

If it matters, I have a soundbar, that is using line-in a lot....

Posted on
Wed Mar 16, 2016 8:41 am
nlagaros offline
Posts: 1646
Joined: Dec 20, 2010

Re: Note Getting Sonos State

I updated the plugin (v0.9.5). Please let me know if it is now working with all your sources. Thanks.

Posted on
Wed Mar 16, 2016 8:50 am
rapamatic offline
Posts: 276
Joined: Aug 03, 2015
Location: Glencoe, IL

Re: Note Getting Sonos State

So far looks good. No errors on plugin restart and shows correct status of all devices.


Sent from my iPhone using Tapatalk

Posted on
Sun Mar 20, 2016 11:09 pm
bkmar1192 offline
Posts: 274
Joined: Sep 12, 2015

Re: Not Getting Sonos State

Finally have had time to dig into this some more. I am still not getting state of my Sonos devices (I thought i was but I was wrong). No information is showing up. I have upgraded to the most recent version. When I turn on debugging I get this:

Traceback (most recent call last):
File "plugin.py", line 59, in runConcurrentThread
File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/Sonos.indigoPlugin/Contents/Server Plugin/Sonos.py", line 300, in runConcurrentThread
File "plugin.py", line 64, in stopConcurrentThread
File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/Sonos.indigoPlugin/Contents/Server Plugin/Sonos.py", line 410, in stopConcurrentThread
File "plugin.py", line 70, in deviceStopComm
File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/Sonos.indigoPlugin/Contents/Server Plugin/Sonos.py", line 226, in deviceStopComm
File "./lib/soco/events.py", line 566, in unsubscribe
File "./lib/requests/models.py", line 840, in raise_for_status
<class 'requests.exceptions.HTTPError'>: 412 Client Error: Precondition Failed for url: http://10.0.1.33:1400/MediaRenderer/AVTransport/Event

Sonos Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)

Posted on
Mon Mar 21, 2016 10:18 pm
bkmar1192 offline
Posts: 274
Joined: Sep 12, 2015

Re: Not Getting Sonos State

I think it is Apple Music.

- Apple Music Radio = No Data
- Apple Music playlist by Apple = some data (seems to be missing artist)
- Apple Music playlist created by me = No Data

Posted on
Wed Mar 23, 2016 4:00 pm
nlagaros offline
Posts: 1646
Joined: Dec 20, 2010

Re: Note Getting Sonos State

Please try the new version I just posted (v0.9.7). I don't think it is related to the sources, but rather network issues with one or more of your ZonePlayers. I have one connected wirelessly and there are many drops. I added logic to resubscribe to updates if there is a detected drop.

bkmar1192 wrote:
I think it is Apple Music.

- Apple Music Radio = No Data
- Apple Music playlist by Apple = some data (seems to be missing artist)
- Apple Music playlist created by me = No Data

Posted on
Wed Mar 23, 2016 11:40 pm
bkmar1192 offline
Posts: 274
Joined: Sep 12, 2015

Re: Note Getting Sonos State

Still getting the same response. However, I do think it has something to do with my Sonos network. I converted from Vera and still have it around for locks. Installed the Sonos plugin on my Vera and I think it is having a similar issue. It did previously work on my Vera.

Not sure what to do at this point - any thoughts? Any idea if something on my network could be blocking my UPNP? The odd thing is that I get some info like volume so it isn't completely broke...

I turned on all the debugging and I don't see anything that looks odd - there is just values in any of the fields. I have three sons devices and they all are the same. I do get some information on Sirius but it duplicates current track in the next track fields and Artist is blank.

Sirius and Apple Music are my two primary sources.


nlagaros wrote:
Please try the new version I just posted (v0.9.7). I don't think it is related to the sources, but rather network issues with one or more of your ZonePlayers. I have one connected wirelessly and there are many drops. I added logic to resubscribe to updates if there is a detected drop.

bkmar1192 wrote:
I think it is Apple Music.

- Apple Music Radio = No Data
- Apple Music playlist by Apple = some data (seems to be missing artist)
- Apple Music playlist created by me = No Data

Posted on
Thu Mar 24, 2016 3:00 am
nlagaros offline
Posts: 1646
Joined: Dec 20, 2010

Re: Note Getting Sonos State

I'd be happy to look at the debug output. Check all the boxes and let the plugin restart. You can PM it to me. It would be helpful to see everything from plugin start.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 9 guests