Sonos without Duet
true
Posts: 307
1) Why was the thread deleted? It probably should have been split - there were like 3 different metadiscussions going on - but why deleted?
2) I'll try to get event registration stuff working this week / weekend to get unsolicited feedback (and also add now playing feedback) and upload an updated module. Then a bit of a delay before I work on grouping and browsing.
Has anyone tried the previous version? Any problems? Any successes?
Edit: Module can be found here: http://www.truecontrol.org/files/AMX_Sonos_0_0_1.zip
NOTE - the module supports auto-detection of players, basic one-way transport, volume (with fb), mute (with fb), led light (with fb), setting an input for line-in. I'll be doing more to improve it.
Full source, readme for commands and loader demo is included - you will have to send commands manually and parse feedback until I create a UI module. Please report bugs, and feel free to submit patches.
2) I'll try to get event registration stuff working this week / weekend to get unsolicited feedback (and also add now playing feedback) and upload an updated module. Then a bit of a delay before I work on grouping and browsing.
Has anyone tried the previous version? Any problems? Any successes?
Edit: Module can be found here: http://www.truecontrol.org/files/AMX_Sonos_0_0_1.zip
NOTE - the module supports auto-detection of players, basic one-way transport, volume (with fb), mute (with fb), led light (with fb), setting an input for line-in. I'll be doing more to improve it.
Full source, readme for commands and loader demo is included - you will have to send commands manually and parse feedback until I create a UI module. Please report bugs, and feel free to submit patches.
0
Comments
I am going to try to do some testing this week. I have 2 connects and 1 connect amp on the office network (plus a ton of other crap), so it should be a good stress test environment.
EDIT: Have volume and mute feedback being updated in trunk. Feedback for vol, mute, loudness, bass, treble, output fixed is subscribed / unsolicited. Other feedback is still solicited or unavailable until I complete the rest of the subscribes.
I hope to complete the rest of the subscribes for currently programmed stuff and also add now playing unsolicited feedback for the next version.
Has anyone tried this yet?
EDIT 2: The feedback parsing was really rushed just to get something out...I'm working on it now and it should be improved. EDIT 3: Have a tag name function and tag attribute function, should be way easier to read and now I can get now-playing metadata
Want to test it, but have no Sonos system at home (yet)...
Have a nice weekend!
I tried your module and I'm facing issue when I send_command to the virtual device. Your module discover well my sonos player but answer the player is not found when I sent the command to the vdv.
Maybe I didn't format well the expression I tried 'Salon vol 60' and '"Salon" vol 60' but none worked. Any idea ?
By the way for what I could see, you already have done an amazing job in few times, I really hope that you could finish it.
I attached a print screen if you are interested.
You don't have "String Expressions" checked so it is sending literal single quotes. Either check "String Expressions" or remove the single quotes. You can see this as the name of the player it is seeing is literally 'Salon
Double-quotes are only required around the name of the player if the player has spaces in the name.
readme.txt has been updated and will be kept up-to-date with currently working unsolicited feedback.
I'll try to keep future update logs to a minimum. My next update post will likely be for the next release, which will have now-playing feedback and probably a way to get a list of the Sonos units so that they can be dynamically selected by UIs. Maybe even a simple UI functionality test (I don't have any spare panels to develop with though).
Didn't take long, did it
Here's 0.0.2. Supports some basic now-playing feedback and playback status for the Radio and Pandora components. Also, all feedback supported is now unsolicited and will update no matter what device actually operates the Sonos.
As usual, see readme.txt for usage and the feedback / command reference.
I am testing on a busy office network with 2 Connects and 1 Connect Amp. The module grabbed the 3 Sonos devices right away, and the communication (volume, now playing, etc) seems to be really fast. Awesome work.
I think, as I have time, I am going to work on browsing favorites and selecting a favorite to start playing as my first priority. Second will probably be looking at getting the now playing for more services working.
Let me know if you are working on the same things so we don't double up efforts on the same functions. Send me a message on skype (petew__) if you want to work on this in a more realtime avenue.
Thanks for the hard work.
Radio feedback is working good and fast and also the volume fb/control
Not yet feedback from the music of the NAS, hopefully soon
Great work! wondering where an update comes down...
Regards,
Niels
I have seen a couple posts on another forum about a new iPad app to control Sonos that may work as a stop gap.
https://itunes.apple.com/us/app/id579984303?mt=8
http://sonopad.com/
It has full control over a Sonos system and adds a few features for integrators using the URI structure. You can specify a zone, add a return to TPC button, select a music service, etc all from AMX or TPC. It basically has the integration features of KScape's iPad app.
It's actually the street from the house I grew up in: The 8th Street. There isn't a profound meaning behind it, and I've had the handle far too many years to make it worth changing.
I have been doing more standalone Sonos systems and not much AMX (lots of cheaper RTI and really low end URC lately) and also developing my own integration hardware products so I haven't had much time to work on this either. Doesn't help that I am rushed on every job where I do write code.
I'd really like to find time...I will try
Re: Sonopad, maybe that will work for some customers, thanks for bringing that up.
I thought this was a couple weeks work for you and it'd be done. Remember how trivial you insisted it would be? I was looking forward to implementing your module with 32 players, 21 touch panels and all features implemented
Paul
Yes, I spent a day and a half on it. As I said in the other thread already, I was quite busy but had some time. I no longer have that time.
At this point it pretty much is trivial - look at and parse feedback for the different source types. Adding browsing will take a little more work, but should be handled by a UI module so each panel can do its own thing. The fun part is done, it's mostly just the tedium that needs done now.
This will already pretty much do the first two (try it), just not the last one.
I guess you didn't get too far into it. Parsing XML packets of over 1MB in Netlinx isn't really trivial with a running system if you don't want to hog the processor. It gets tricky considering an array can't be any larger than 16k. That was the most interesting part for me. I found the basic comm stuff the trivial part, and parsing huge XML/SOAP packets, implementing cover art despite a Netlinx send_command 200 character limitation, and replicating the Sonos controller UI the fun part.
Paul
We have released an AMX module for our Sire for Sonos unit. This is a hardware based solution with an AMX module enabling you to perform full control and feedback for up to 32 Sonos zones.
See http://www.sirecontrol.com for more information.
Thanks for the great module. You documentation needs updating. For all the send_commands you have stated
send_command vdev, '"Living Room" mute on'
instead it should be
send_command sonos_vdev, '"Living Room" mute on'
P.S: Much better then the RTI Sonos module
I've worked on the module a bit, to improve reliability with a large number of Sonos (Sonoses?), with the instability mostly caused by unnecessary feedback polling. AMX seems to keep up with normal activity with 20 sonos but doesn't like a ton of connections; IP on Netlinx is expensive and some polling assumptions are incorrect. I've been extraordinarily busy with all extra time going to other hardware and firmware projects, but I'll commit an updated version eventually...
Before spending a lot of effort working on this (grouping/ungrouping, services, etc), I am considering making some interface software on a platform that can easily deal with many IP connections, such as just a simple PC or Raspberry Pi application. In practice with some tests it looks like a native AMX solution would still work acceptably but writing an AMX module doesn't help for other platforms and the overall experience may be better handling this outside of AMX.
Re: processing feedback, I will have a UI module at some point that can be used directly or as a reference. For now, for basic feedback, you can manually parse or use something like explode_quoted from string.axi (included with the module) to parse. Something like this:
I think 0.0.2 wasn't sending a whole lot for now playing feedback, can't remember...
Re: RTI, I would have started work on one, but their terms for the SDK are ridiculous and the platform is very limiting. The most important idea I had for a driver since I first did an iPad on RTI (a local flag type thing) was done by someone and it works well, so I am less interested in writing for their platform now. Still, it would be nice having some basic control (source select, transports, volume) that didn't cost anything extra or require registration like the current modules do.
-Emmett