It's Finally Here!!
I have completely re-written the plugin from the ground up. With this the plugin now will automatically update IP addresses, Zone Player names, will automatically add new ZP or remove them to match the network. The plugin is also using asynchronous sockets so nothing should be held by the plugin waiting for a response.
The encoding error should also be fixed now so stations selected with special characters should work fine.
To use the new plugin,
simply add it, set the debug level (default is 0), and use the actions to send commands to the ZPs on your network.
NOTE: each command is specific to a ZP based on it's unique MAC address. This allows you to change the name of a Zone Player without breaking any commands you already have. If a Zone Player is replaced with another, then your commands will have to be updated.
Commands Supported:
Play, Pause, Stop, Next, Previous, Relative Volume, Set Volume, Mute On, Mute Off, Play Mode, Start Favorite Playlist/Station
Soon to come:
Notifications, Group, Ungroup, Weather announcement
Events Supported:
New Zone Player added to network (generic for all ZP, payload carries ZP information)
Zone Player removed form network.
Zone Player Playing
Zone Player Stopped/Paused
Note: i'm currently receiving MetaData information for all currently playing music but I am not doing anything with it other than storing it in the plugin.
Soon to come:
event for new track playing with metadata in payload
event for volume adjustments (could be used to control max volume of a zone)
Known Issues added 2/22/2014
1)If you only have 1 zone player, the plugin might not automatically update the IP address if it changes or if you add another zone player to the network. If you close EG and reopen when adding a ZP it should be fine.
I have multiple Zps to test with and the system acts a little different between 1 and many.
2)Sometimes when grouping or ungrouping a zone player that zone player may trigger the wrong state (playing or stopped). Example, if you have a group that is stopped and add another stopped zp, there will be an event that says that ZP is now playing when it's not. Hopefully this will be fixed later.
3)sometimes when opening the configuration window for the StartPlayList action, EG hangs forever. Can't seem to find out why this is happening at this time. The first line in the Config function is a print line and that doesn't even execute when it hangs.
4) If your zone players have special characters in the name, receiving group topology info will fail which means when opening an action configuration window, the drop down list of ZPs is empty. This has been fixed for the next revision. line 491 needs to be changed from xml = parseString(xmlstring) to xml = parseString(xmlstring.encode('utf-8'))
update 2/25/2014
5) when sending many action commands sequencially in EG, the asyncore can crash which stops the plugin from receiving and sending ip packets. The current fix is to make sure there is a 0.6-1 second delay between commands.
Let me know how it goes and how you guys end up using.
If there are any issues, please set the debug level to 2 and send me the output of the error/messages printed to the screen.
Enjoy!
The latest version can be found here:
viewtopic.php?f=9&t=5312&p=30094#p30094
- __init__.py
- SONOS Plugin Rev: .006 (Beta)
- (73.96 KiB) Downloaded 193 times