I’ve written a small test script to help debug a basic issue that may exist on the Indigo server that would prevent the plugin from functioning at all. To run the script, open up a terminal on the Indigo server and type the following:
cd "/Library/Application/Support/Perceptive Automation/Indigo 7/Plugins/Sonos.indigoPlugin/Contents/Server Plugin"
python ./lib/test_SOCO.py [ZonePlayer IP] [Indigo Server IP]
The ZonePlayerIP should be the IP address of a device that you actively use during the testing. The Indigo Server IP is self explanatory.
You should get output for each track that is played with many details as well as any changes in volume and balance. If you see any errors, please report them as they indicate there is some new music source or variation of a music source that I have not supported.
How it works:
For each ZonePlayer that is configured, the plugin will attempt to construct the appropriate URL to retrieve an image representing the album cover, radio station logo, or whatever might exist for the source.
The constructed album art url is stored in the ZP_ART device state. The image name is made up of the ZonePlayer name, a suffix of “_art”, and is stored as a jpg file. Note that the ZonePlayer name is not the device name assigned in Indigo, but the actual name of the ZonePlayer as assigned in the Sonos application. This value is stored in the state ZP_ZoneName.
The files are saved to the following directory on the Indigo server:
/Library/Application Support/Perceptive Automation/images/Sonos
The subdirectories under Perceptive Automation will be created automatically if they do not already exist.
There are two canned images source from the Sonos plugin directory used for special purposes:
sonos_tv.jpg is used when a ZonePlayer’s source is set to TV.
sonos_art.jpg is used when there is no source set on a ZonePlayer.
They can be replaced with the image of your choosing and are in the following directory:
[Indigo x]/Plugins/Sonos.indigoPlugin/Contents/Server Plugin
Create a ‘Refreshing Image URL’ object on a control page. The refresh rate can be set to ‘Continuous’. The URL should look something like this:
file:///Library/Application Support/Perceptive Automation/images/Sonos/XXX_art.jpg