Sonos - The Beginning

Posted on
Tue Feb 21, 2012 10:01 am
nlagaros offline
Posts: 1646
Joined: Dec 20, 2010

Re: Sonos - The Beginning

If the perl interface works with Line-In, I'm happy to take a look at that as well from an integration standpoint.

Posted on
Tue Feb 21, 2012 10:47 am
terrydew offline
Posts: 258
Joined: Jun 10, 2011

Re: Sonos - The Beginning

Are you and Mat running Lion? I am running 10.7.3.

Posted on
Tue Feb 21, 2012 10:48 am
nlagaros offline
Posts: 1646
Joined: Dec 20, 2010

Re: Sonos - The Beginning

I am on 10.7.3 as well. Latest and greatest.

Posted on
Tue Feb 21, 2012 11:39 am
mat offline
Posts: 769
Joined: Nov 25, 2010
Location: Cambridgeshire - UK

Re: Sonos - The Beginning

Lion too 10.7.3.

Terry shout if you need anything. I out for an couple of hours then up for a few.

Try this:

Save sonospy to a new folder called sonospy under you home user folder eg mine is "mat" and sonospy is saved in a folder called "sonospy".

Open terminal - it should open with a prompt. Something like:
Terry's iMac :~terry$ the first is your Computer name, the second is your home folder.

Then type "cd sonospy" and return.

Then type "sudo ./sonospy_web" and return
You will be asked to enter you "mac password" and return

Sonospy should then be running....

Late 2018 mini 10.14

Posted on
Tue Feb 21, 2012 1:55 pm
terrydew offline
Posts: 258
Joined: Jun 10, 2011

Re: Sonos - The Beginning

SUCCESS!!! (almost :) )

I found my problem. I had "medialink" installed as a system preference pane that was out of date for lion. I deleted rebooted and got sonospy to work I think. I got some errors in terminal as follows

Last login: Tue Feb 21 14:35:34 on ttys000
James-Dewberrys-Mac-mini:~ housemini$ cd sonospy
James-Dewberrys-Mac-mini:sonospy housemini$ ./sonospy_web
./sonospy_web: line 6: ../pycpoint.pid: Permission denied
./sonospy_web: line 10: web2py.pid: Permission denied
James-Dewberrys-Mac-mini:sonospy housemini$

However the web site looked better as below


The plugin appeared to work without error but I had no control. I went to the sonos desktop controller and was unable to play as it said the music library on my mac mini was denied access? Will sonospy stop the sonos apps from working?

Anyway made a lot of progress. If I can solve this latest problem maybe I can start helping with testing. :D

Terry
Attachments
Sonospy.tiff
Sonospy.tiff (186.5 KiB) Viewed 4659 times

Posted on
Tue Feb 21, 2012 2:39 pm
terrydew offline
Posts: 258
Joined: Jun 10, 2011

Re: Sonos - The Beginning

Never mind on the http://www.purple.org/sonos/. The last revision was in 08 so it has to be out of date.

Posted on
Tue Feb 21, 2012 2:39 pm
mat offline
Posts: 769
Joined: Nov 25, 2010
Location: Cambridgeshire - UK

Re: Sonos - The Beginning

Terry,

Just try stopping sonospy...

Instructions as above, but replace sudo ./sonospy_web with sudo ./sonospy_stop

Then restart using the Sudo command above. I'm no unix expert by a long shot, but using the sudo command will start sonospy with root control, and should avoid the access denied errors. Those errors will cause a problem I believe.

Late 2018 mini 10.14

Posted on
Tue Feb 21, 2012 3:31 pm
terrydew offline
Posts: 258
Joined: Jun 10, 2011

Re: Sonos - The Beginning

Mat

Thanks!!! That did it. I think I am now up with you. I have play control but get funny changes to the device status every few seconds, but it works.

It even worked on a pair of the new play 3's I had linked to play stereo. I will now add the other zones.

Thanks again

Terry

Posted on
Tue Feb 21, 2012 3:45 pm
mat offline
Posts: 769
Joined: Nov 25, 2010
Location: Cambridgeshire - UK

Re: Sonos - The Beginning

Great news. Your up with me.

How do you find the play3's? I've not listened to one yet?

Are you getting the same results as my recording on YouTube in indigo, or are the zones misbehaving in the web interface?

How are you using play? From the web interface or from indigo? If the latter, how? I've not had a chance to get that far! I've only been looking at the zone states.

Mat

Late 2018 mini 10.14

Posted on
Tue Feb 21, 2012 4:22 pm
mat offline
Posts: 769
Joined: Nov 25, 2010
Location: Cambridgeshire - UK

Re: Sonos - The Beginning

Just for fun (and because Avee asked for something similar in another thread), I've extended the transcoding support so that you can send whatever is playing on your PC soundcard to Sonos. You just select a dummy track served by the WMP clone (tagged however you like), and the clone will send the soundcard output to Sonos as a stream.

It needs some polish (like being independent of the PC volume so you can mute the PC), but it works.



That's a quote from mark from the sonospy thread on the sonos forum.....could be even more useful than the line-in? What do you think?

Late 2018 mini 10.14

Posted on
Tue Feb 21, 2012 5:36 pm
terrydew offline
Posts: 258
Joined: Jun 10, 2011

Re: Sonos - The Beginning

Mat

I like the play 3's. They sound fine to me but my hearing is not so good.

My devices are acting similar to yours, but there is no consistency. With nothing playing, they are switching between stopped and paused_playback. I just clicked on one and they stopped changing.

I set up action groups for play,stop and next so far and they all seem to work.

I have not been able to index yet as the scan command says not found. As of now there is no connection between the queue in the sonospy web server and the sons desktop.

I just started one zone playing using the action group and the state of all my zone devices changed to playing (they are not playing except the one I started)

I issued the stop action group for that zone and all the zones changed to stopped.

Posted on
Tue Feb 21, 2012 9:08 pm
nlagaros offline
Posts: 1646
Joined: Dec 20, 2010

Re: Sonos - The Beginning

I made a couple of minor updates to the source code (closed open file handles) -- hoping this is the cause of the confusion!

Also, the plugin will re-read it's configuration items if changed so no need to restart as you flip to and from debug mode.

Please give it a try and Terry - let me know if you see the same behavior when taking actions where all zones' status change when in fact only the target zone should show any update.

The new package is on the download page.

Thanks.

Posted on
Wed Feb 22, 2012 11:06 am
terrydew offline
Posts: 258
Joined: Jun 10, 2011

Re: Sonos - The Beginning

I installed the new version this morning and added action groups for all of the available action items for one zone.

Play and stop appear to work consistently, but the states of the other zones continue to change when the playing zone is changed.

Volume, volume up, and volume dn appear to all change volume to some preset level. I know that volume has a preset but also occurs with up and dn. For example if I use sonos desktop to run the vol up then hit the action item for vol dn it goes down to a preset and further dn actions do not appear to affect.

I think part of the problem is that the sonospy web presentation is some what flaky. Some times it seems to change randomly and there is no correlation between the status as shown in sonosdesktop and in sonospy. I have not been able to index yet as the scan command returns as not found. Also the gui controls on the sonoweb site do not work consistently.

Yesterday for every zone there was a server and a renderer listed on the sonospyweb. Today there are only servers.

The sonoweb system appears to have significant lag which could be the cause of some of the plugin problems. I have attached the web2py.log to see if it tells you anything. There is a warning at the first about running a later version of python than recommended. My sys has three versions of python but I do not know how to tell sonospy which to use.

If your sonospy install is stable and working consistently, that may be the difference.

If I am adding confusion rather than help, please let me know. This is beyond my skill set but am learning.

Terry

Posted on
Thu Feb 23, 2012 10:52 am
nlagaros offline
Posts: 1646
Joined: Dec 20, 2010

Re: Sonos - The Beginning

Terry & Mat - thanks for the testing. I've been tracing through this to try to understand what is going on and think I have more of a clue now. Basically each poll and action on a ZonePlayer requires two request/response commands. Unfortunately the response does not identify the ZonePlayer for which it is intended so all of these activities need to be single threaded. I need to adjust the logic to make sure actions are not stepping on the polling of zones and vice versa. If I were a real developer, I would figured it out by now, so working through it slowly.

Posted on
Thu Feb 23, 2012 1:11 pm
nlagaros offline
Posts: 1646
Joined: Dec 20, 2010

Re: Sonos - The Beginning

I think I got it. I am still testing with only one ZonePlayer, but I see both of the issues you were experiencing. I created some global variables to emulate synchronous calls (yuk!) and the big one ...

I realized to properly poll for all state changes, once a ZonePlayer is selected, I have to poll multiple times until a NOCHANGE is returned.

Please download the new package and let me know if this improves things. The version number should be 0.2.3.

Thanks!

Page 5 of 37 1, 2, 3, 4, 5, 6, 7, 8 ... 37

Who is online

Users browsing this forum: No registered users and 14 guests