Sonos

Posted on
Sat Nov 03, 2012 1:45 pm
jmesberg offline
Posts: 48
Joined: Mar 24, 2006
Location: Ann Arbor, MI

Re: Sonos

Nick, can you check to see if your site is up? I tried to get to vulture.lagaros.com and it seems to be unavailable. I'm a longstanding Sonos and Indigo user and am excited to try your plugin.

John

Posted on
Sat Nov 03, 2012 1:48 pm
dgburton offline
Posts: 6
Joined: Oct 28, 2012

Re: Sonos

Here's a link to it in the short term: http://cl.ly/3d19190y1c1L

Posted on
Sat Nov 03, 2012 7:01 pm
nlagaros offline
Posts: 1646
Joined: Dec 20, 2010

Re: Sonos

Hey all - sorry about that. Sandy did a number on my home server. Just got power back and the site should be up to download the latest version of the plugin.

Posted on
Sun Nov 04, 2012 10:07 am
jmesberg offline
Posts: 48
Joined: Mar 24, 2006
Location: Ann Arbor, MI

Re: Sonos

Thank you! I'm excited to get this working. I played around for months with henkelis sonospy stuff and 'almost/kinda' got it working but eventually it was more trouble than fun. This seems to be much better packaged and 'ready for prime time'. I'm assuming a prereq of having Python 2.6 and pycpoint installed and I'm fairly confident that I have them installed properly, but if the errors below suggest otherwise I can start from scratch. Note that I'm running all this on a Mac so if there are any other mac users out there successfully running Nick's Sonos plugin perhaps you can tell me step-by-step what you did to get it working.

So....here is where I am so far. I've installed the plugin, and I get the following errors in my Indigo log. Suggestions?

Sonos Error There was an error reading the plugin preferences. Please check your configuration.
Sonos Error Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
File "plugin.py", line 58, in runConcurrentThread
File "plugin.py", line 262, in runConcurrentThread
<type 'exceptions.TypeError'>: int() argument must be a string or a number, not 'NoneType'

Sonos Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Sonos Error There was an error reading the plugin preferences. Please check your configuration.
Sonos Error Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
File "plugin.py", line 58, in runConcurrentThread
File "plugin.py", line 262, in runConcurrentThread
<type 'exceptions.TypeError'>: int() argument must be a string or a number, not 'NoneType'

Sonos Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Sonos Saved Plugin Configuration
Sonos Playlist: SQ:2, Bed time, file:///jffs/settings/savedqueues.rsq#2

Posted on
Sun Nov 04, 2012 10:15 am
jmesberg offline
Posts: 48
Joined: Mar 24, 2006
Location: Ann Arbor, MI

Re: Sonos

Update: I disabled and then reloaded the plugin and this time got no errors. So ignore prior post. It works perfectly!

One question though: how does the plugin handle state information when playing music in 'groups' in Sonos? Should I set up Sonos 'devices' in Indigo for each of my Zoneplayers, etc. (i.e. one for each IP address)?

Posted on
Sun Nov 04, 2012 10:30 am
jmesberg offline
Posts: 48
Joined: Mar 24, 2006
Location: Ann Arbor, MI

Re: Sonos

Spoke too soon....I seem to have this partly working, but not entirely. If I add a device for the plugin using the IP address of my 'main' ZonePlayer it works perfectly. However since that only controls/reports on what is playing on that Zoneplayer, I made the leap that I should add additional devices for the other ZonePlayers, etc. That throws a bunch of errors in the log (see below).

Obviously it doesn't like multiple Indigo devices referencing different Zone Players. I'll stop cluttering this thread with additional posts and give Nick or someone else a chance to tell me what I'm doing wrong. (If you can't add multiple Indigo devices for different zoneplayers, then how can you control or check state info on the various zoneplayers in the home?).

Thank you!

Sonos Error Error in plugin execution ServerAddedElem:

Traceback (most recent call last):
File "/Library/Application Support/Perceptive Automation/Indigo 5/IndigoPluginHost.app/Contents/PlugIns/plugin_base.py", line 711, in deviceCreated
File "plugin.py", line 65, in deviceStartComm
File "plugin.py", line 229, in deviceStartComm
File "plugin.py", line 1271, in getLineInDirect
File "plugin.py", line 337, in SOAPSend
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/httplib.py", line 860, in endheaders
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/httplib.py", line 732, in _send_output
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/httplib.py", line 699, in send
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/httplib.py", line 667, in connect
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/idna.py", line 164, in encode
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/idna.py", line 73, in ToASCII
<type 'exceptions.UnicodeError'>: label empty or too long

Sonos Error Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
File "plugin.py", line 58, in runConcurrentThread
File "plugin.py", line 261, in runConcurrentThread
File "plugin.py", line 366, in checkDirect
File "plugin.py", line 371, in checkOneDirect
File "plugin.py", line 337, in SOAPSend
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/httplib.py", line 860, in endheaders
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/httplib.py", line 732, in _send_output
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/httplib.py", line 699, in send
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/httplib.py", line 667, in connect
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/idna.py", line 164, in encode
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/idna.py", line 73, in ToASCII
<type 'exceptions.UnicodeError'>: label empty or too long

Posted on
Sun Nov 04, 2012 10:32 am
nlagaros offline
Posts: 1646
Joined: Dec 20, 2010

Re: Sonos

The plugin does not require pycpoint - it did initially did as I was using sonospy, but I ended up rewriting everything to operate independently. This is why an ip address for each ZonePlayer is required as well as a reference ZonePlayer ip as part of the plugin configuration.

To answer your grouping question - I lever the topology web page of the root ZonePlayer to understand which devices are in groups and attempt to update state appropriately. Let me know if that is not working properly.

So you should set up a device for each ZonePlayer. If you have a stereo pair, then only one device is required for the pair.

Posted on
Sun Nov 04, 2012 10:33 am
nlagaros offline
Posts: 1646
Joined: Dec 20, 2010

Re: Sonos

jmesberg - can you run the plugin in debug mode and send me the log output. I should be able to pickup very quickly what is going on.

Thanks

Posted on
Sun Nov 04, 2012 11:21 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Sonos

jmesberg wrote:
?... I'm assuming a prereq of having Python 2.6 and pycpoint installed...


Could be a Python version issue. Indigo requires Python 5 for plugins.

Posted on
Sun Nov 04, 2012 11:39 am
jmesberg offline
Posts: 48
Joined: Mar 24, 2006
Location: Ann Arbor, MI

Re: Sonos

Oddly it now seems to be working well. I have multiple Indigo devices (6 of them) all referencing various zoneplayers. All are reporting accurate state information and are all controllable. This plug-in is awesome Nick, thank you! I don't know what I was doing before that was throwing the various errors, but the log is 'quiet' now and all is working well. If I can recreate the problem I will add debug and send you the log, but for now all is good.

Thanks again,

John

Posted on
Sun Nov 04, 2012 1:43 pm
nlagaros offline
Posts: 1646
Joined: Dec 20, 2010

Re: Sonos

I'm glad it is working for you. I'll be here if you do have issues as you use it a bit more.

Posted on
Mon Nov 05, 2012 11:48 am
bschollnick2 offline
Posts: 1355
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: Sonos

berkinet wrote:
jmesberg wrote:
?... I'm assuming a prereq of having Python 2.6 and pycpoint installed...


Could be a Python version issue. Indigo requires Python 5 for plugins.


I think you mean Python 2.5?

Python v5 is probably 7-10 years out at this time.... Considering that v3.xx is still relatively new....

------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33

Posted on
Sun Nov 25, 2012 8:34 am
nlagaros offline
Posts: 1646
Joined: Dec 20, 2010

Re: Sonos

I just updated the plugin to v0.5.3. Terry - I think this is what you wanted in terms of the ability to group multiple players simultaneously. I tested very lightly. Let me know if it works for you when you have a chance.

v0.5.3 - 11/25/2012
  • Added two actions to add and remove multiple players from Groups (Add Players to Zone, Set Standalones)

Posted on
Sun Nov 25, 2012 1:17 pm
terrydew offline
Posts: 258
Joined: Jun 10, 2011

Re: Sonos

Thanks for the up date. Here are the issues with the new set group and set standalones:

1. You need to add a "no selection" item to both actions. ONce you have selected a zone in either you can not delete but only replace with another zone.

2. In both actions it is only adding (or deleting) one zone in the list. I think it is the last zone listed but not sure if that in totally consistent. For example if you setup action for zone 1 and add in the list zones 2 3 and 4, it only adds zone 4.
The same is true for set standalone, with a group set of zones 1 2 3 and 4 and the action to set 3 and 4 as standalones it only sets zone 4.

Please let me know if you need debug output.

Posted on
Thu Dec 27, 2012 7:23 am
jabeard3 offline
Posts: 52
Joined: Nov 30, 2012

Re: Sonos

Nick -
First, thank you for the plugin. If I can get it working I'm very excited about it

I'm having an issue with the group announcement feature. Here is the log info
Dec 27, 2012 8:17:17 AM
Trigger Say Hi
Error (client) timeout waiting for plugin response from com.ssi.indigoplugin.Sonos for request UiGetValues2
Error (client) timeout waiting for plugin response from com.ssi.indigoplugin.Sonos for request CallPluginFunc
Error (client) dialogForActionId() caught exception: NSInvalidArgumentException -- *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]
Error (client) received unexpected packet response UiGetValues2 (waiting for )
Error (client) received unexpected packet response CallPluginFunc (waiting for )

Dec 27, 2012 8:18:34 AM
Sonos Error Error in plugin execution ExecuteAction:

Traceback (most recent call last):
File "plugin.py", line 137, in actionZP_announcement
File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/Sonos.indigoPlugin/Contents/Server Plugin/Sonos.py", line 818, in actionAnnouncement
File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/Sonos.indigoPlugin/Contents/Server Plugin/Sonos.py", line 808, in actionStates
File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/Sonos.indigoPlugin/Contents/Server Plugin/Sonos.py", line 197, in checkDirect
File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/Sonos.indigoPlugin/Contents/Server Plugin/Sonos.py", line 202, in checkOneDirect
File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/Sonos.indigoPlugin/Contents/Server Plugin/Sonos.py", line 168, in SOAPSend
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/httplib.py", line 860, in endheaders
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/httplib.py", line 732, in _send_output
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/httplib.py", line 699, in send
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/httplib.py", line 683, in connect
<class 'socket.error'>: (60, 'Operation timed out')

Currently just have 1 "zone player" an S5 addressed in the group announcement. I can control this zone from indigo in other ways, stop/play etc so there doesn't seem to be a communication issue.
Also, some of my zone players are not displaying a status on the main device page and are not available in the group announcement dialog

Any help is appreciated.

Who is online

Users browsing this forum: No registered users and 3 guests