Page 2 of 9

Re: Python plugin: Sonos

Posted: Tuesday 31 January 2017 8:41
by tester22
G3rard wrote:
tester22 wrote: I have added some more error handeling.
Try to use the plugin with debug enabled.
The plugin is now working again. When listening to a radio station I get the following message in the log (debug enabled).

Code: Select all

2017-01-30 22:27:27.253 (Sonos kantoor) Calling message handler 'onHeartbeat'.
2017-01-30 22:27:27.274 (Sonos kantoor) Failed to parse data
2017-01-30 22:27:27.274 (Sonos kantoor) QMusic Nonstopobject.item.audioItem.audioBroadcastSA_RINCON65031_.

2017-01-30 22:38:29.071 (Sonos kantoor) Calling message handler 'onHeartbeat'.
2017-01-30 22:38:29.100 (Sonos kantoor) Failed to parse data
2017-01-30 22:38:29.100 (Sonos kantoor) 538object.item.audioItem.audioBroadcastSA_RINCON65031_.
Where QMusic Nonstop and 538 are the radio stations.
I have tried to recreate the issue on my Sonos5 but it works as expected so right now the only thing I can think of is that the radio is returning some invalid characters like "&" and that it is causing the error.

Code: Select all

2017-01-31 08:32:34.188 (Kontoret) Calling message handler 'onHeartbeat'.
2017-01-31 08:33:04.218 (Kontoret) Calling message handler 'onHeartbeat'.
2017-01-31 08:33:34.228 (Kontoret) Calling message handler 'onHeartbeat'.
2017-01-31 08:33:34.252 (Kontoret) Update 1:'' (Kontoret - Status)
2017-01-31 08:33:34.297 (Kontoret) Update 1:'Qmusic - Kumu - Mixed' (Kontoret - Status)
2017-01-31 08:33:34.305 (Kontoret) Update 1:'Qmusic - Paradise - COLDPLAY' (Kontoret - Status)
2017-01-31 08:33:34.329 (Kontoret) Update 2:'6' (Kontoret - Volume)
2017-01-31 08:34:04.242 (Kontoret) Calling message handler 'onHeartbeat'.
2017-01-31 08:34:34.215 (Kontoret) Calling message handler 'onHeartbeat'.
2017-01-31 08:34:34.277 (Kontoret) Update 1:'Qmusic - Sorry - KENSINGTON' (Kontoret - Status)
2017-01-31 08:35:04.226 (Kontoret) Calling message handler 'onHeartbeat'.
2017-01-31 08:35:34.251 (Kontoret) Calling message handler 'onHeartbeat'.
2017-01-31 08:35:34.327 (Kontoret) Update 1:'Radio 538 - Sorry - KENSINGTON' (Kontoret - Status)
2017-01-31 08:35:34.335 (Kontoret) Update 1:'Radio 538 - ' (Kontoret - Status)
2017-01-31 08:36:04.249 (Kontoret) Calling message handler 'onHeartbeat'.
2017-01-31 08:36:34.237 (Kontoret) Calling message handler 'onHeartbeat'.
2017-01-31 08:37:04.261 (Kontoret) Calling message handler 'onHeartbeat'.
2017-01-31 08:37:34.266 (Kontoret) Calling message handler 'onHeartbeat'.
2017-01-31 08:37:34.320 (Kontoret) Update 1:'538 Party - ' (Kontoret - Status)
2017-01-31 08:38:04.267 (Kontoret) Calling message handler 'onHeartbeat'.
2017-01-31 08:38:34.276 (Kontoret) Calling message handler 'onHeartbeat'.
2017-01-31 08:38:34.330 (Kontoret) Update 1:'538 Hitzone - ' (Kontoret - Status)

Re: Python plugin: Sonos

Posted: Tuesday 31 January 2017 18:22
by RayAmsterdam
Version: 3.6568
Platform: Rpi 2

The Sonos hardware isn't visible in hardware menu.
What I did:

Created folder '/Domoticz/plugin'
Created folder '/plugin/sonos'
Created file 'plugin.py'
Copied scripttext from Github into the file
Changed 'Ip Address' into the ip address of one of my Sonos speakers
Saved file
Restarted Domoticz'

What am I doing wrong?

Re: Python plugin: Sonos

Posted: Tuesday 31 January 2017 18:25
by tester22
RayAmsterdam wrote:Version: 3.6568
Platform: Rpi 2

The Sonos hardware isn't visible in hardware menu.
What I did:

Created folder '/Domoticz/plugin'
Created folder '/plugin/sonos'
Created file 'plugin.py'
Copied scripttext from Github into the file
Changed 'Ip Address' into the ip address of one of my Sonos speakers
Saved file
Restarted Domoticz'

What am I doing wrong?
You shouldn't change anything in the files all config is done in hardware pane.
Are you on the latest beta version of domoticz?
Have you installed python3 manually?

Re: Python plugin: Sonos

Posted: Tuesday 31 January 2017 18:33
by RayAmsterdam
I replaced the file, without changing.
Beta version 3.6568
Python 3 is installed (for a long time)

Still not working...
Is it normal you have to manualy create the plugin folder?

Re: Python plugin: Sonos

Posted: Tuesday 31 January 2017 18:49
by tester22
RayAmsterdam wrote:I replaced the file, without changing.
Beta version 3.6568
Python 3 is installed (for a long time)

Still not working...
Is it normal you have to manualy create the plugin folder?
Did have a look on my pi and it seems like you misspelled the folder.
mine is <domoticz>/plugins/Sonos/plugin.py

Re: Python plugin: Sonos

Posted: Tuesday 31 January 2017 19:08
by RayAmsterdam
tester22 wrote:
RayAmsterdam wrote:I replaced the file, without changing.
Beta version 3.6568
Python 3 is installed (for a long time)

Still not working...
Is it normal you have to manualy create the plugin folder?
Did have a look on my pi and it seems like you misspelled the folder.
mine is <domoticz>/plugins/Sonos/plugin.py
I changed it. Seems like the misspel is also on the topicstart.
Mine now is /home/pi/domoticz/plugins/Sonos/plugin.py

Unfortunately still doesn't work...

Re: Python plugin: Sonos

Posted: Tuesday 31 January 2017 20:46
by tester22
RayAmsterdam wrote:
tester22 wrote:
RayAmsterdam wrote:I replaced the file, without changing.
Beta version 3.6568
Python 3 is installed (for a long time)

Still not working...
Is it normal you have to manualy create the plugin folder?
Did have a look on my pi and it seems like you misspelled the folder.
mine is <domoticz>/plugins/Sonos/plugin.py
I changed it. Seems like the misspel is also on the topicstart.
Mine now is /home/pi/domoticz/plugins/Sonos/plugin.py

Unfortunately still doesn't work...
Log in with ssh and go to /home/pi/domoticz/ and enter the following.
Make sure the bold line exists. If that doesn't work ask @Dnpwwo.

sudo /etc/init.d/domoticz.sh stop && ./domoticz -verbose 2

2017-01-31 20:44:19.597 Domoticz V3.6562 (c)2012-2017 GizMoCuz
2017-01-31 20:44:19.597 Build Hash: 974bc54, Date: 2017-01-30 00:43:50
2017-01-31 20:44:19.598 System: Raspberry Pi
2017-01-31 20:44:19.598 Startup Path: /home/pi/domoticz/
2017-01-31 20:44:19.667 Sunrise: 07:59:00 SunSet:16:03:00
2017-01-31 20:44:19.667 EventSystem: reset all events...
2017-01-31 20:44:20.096 PluginSystem: Started, Python version '3.5.1'.
2017-01-31 20:44:20.120 Active notification Subsystems: email, http, prowl (3/12)
2017-01-31 20:44:20.125 WebServer(HTTP) started on address: 0.0.0.0 with port 8080

Re: Python plugin: Sonos

Posted: Tuesday 31 January 2017 21:17
by RayAmsterdam
tester22 wrote:
RayAmsterdam wrote:
tester22 wrote:
Did have a look on my pi and it seems like you misspelled the folder.
mine is <domoticz>/plugins/Sonos/plugin.py
I changed it. Seems like the misspel is also on the topicstart.
Mine now is /home/pi/domoticz/plugins/Sonos/plugin.py

Unfortunately still doesn't work...
Log in with ssh and go to /home/pi/domoticz/ and enter the following.
Make sure the bold line exists. If that doesn't work ask @Dnpwwo.

sudo /etc/init.d/domoticz.sh stop && ./domoticz -verbose 2

2017-01-31 20:44:19.597 Domoticz V3.6562 (c)2012-2017 GizMoCuz
2017-01-31 20:44:19.597 Build Hash: 974bc54, Date: 2017-01-30 00:43:50
2017-01-31 20:44:19.598 System: Raspberry Pi
2017-01-31 20:44:19.598 Startup Path: /home/pi/domoticz/
2017-01-31 20:44:19.667 Sunrise: 07:59:00 SunSet:16:03:00
2017-01-31 20:44:19.667 EventSystem: reset all events...
2017-01-31 20:44:20.096 PluginSystem: Started, Python version '3.5.1'.
2017-01-31 20:44:20.120 Active notification Subsystems: email, http, prowl (3/12)
2017-01-31 20:44:20.125 WebServer(HTTP) started on address: 0.0.0.0 with port 8080
I get this:
-bash: ./domoticz: Is a directory

Re: Python plugin: Sonos

Posted: Tuesday 31 January 2017 21:19
by tester22
RayAmsterdam wrote:
tester22 wrote:
RayAmsterdam wrote: I changed it. Seems like the misspel is also on the topicstart.
Mine now is /home/pi/domoticz/plugins/Sonos/plugin.py

Unfortunately still doesn't work...
Log in with ssh and go to /home/pi/domoticz/ and enter the following.
Make sure the bold line exists. If that doesn't work ask @Dnpwwo.

sudo /etc/init.d/domoticz.sh stop && ./domoticz -verbose 2

2017-01-31 20:44:19.597 Domoticz V3.6562 (c)2012-2017 GizMoCuz
2017-01-31 20:44:19.597 Build Hash: 974bc54, Date: 2017-01-30 00:43:50
2017-01-31 20:44:19.598 System: Raspberry Pi
2017-01-31 20:44:19.598 Startup Path: /home/pi/domoticz/
2017-01-31 20:44:19.667 Sunrise: 07:59:00 SunSet:16:03:00
2017-01-31 20:44:19.667 EventSystem: reset all events...
2017-01-31 20:44:20.096 PluginSystem: Started, Python version '3.5.1'.
2017-01-31 20:44:20.120 Active notification Subsystems: email, http, prowl (3/12)
2017-01-31 20:44:20.125 WebServer(HTTP) started on address: 0.0.0.0 with port 8080
I get this:
-bash: ./domoticz: Is a directory
You need to go to /home/pi/domoticz/. Right now you are in /home/pi/

Re: Python plugin: Sonos

Posted: Tuesday 31 January 2017 23:15
by G3rard
tester22 wrote: I have tried to recreate the issue on my Sonos5 but it works as expected so right now the only thing I can think of is that the radio is returning some invalid characters like "&" and that it is causing the error.
It is working here right now as well :D
Problem was that I was using some PHP code for selecting a radio station using a Domoticz selector switch. That way the CurrentURIMetaData field in GetMediaInfo was filled with

Code: Select all

"Radio 538<\/dc:title>object.item.audioItem.audioBroadcast<\/upnp:class>SA_RINCON65031_<\/desc><\/item><\/DIDL-Lite>."
When I select the radio station with the Sonos app the CurrentURIMetaData field is

Code: Select all

"Radio 538<\/dc:title>object.item.audioItem.audioBroadcast<\/upnp:class>SA_RINCON65031_<\/desc><\/item><\/DIDL-Lite>"
Apparently the . at the end is causing the problem :?

I fixed this by removing the unintentional . in the PHPSonos.inc.php file which is used to select the radio station :P

Re: Python plugin: Sonos

Posted: Tuesday 31 January 2017 23:53
by RayAmsterdam
tester22 wrote:
RayAmsterdam wrote:
tester22 wrote:
Log in with ssh and go to /home/pi/domoticz/ and enter the following.
Make sure the bold line exists. If that doesn't work ask @Dnpwwo.

sudo /etc/init.d/domoticz.sh stop && ./domoticz -verbose 2

2017-01-31 20:44:19.597 Domoticz V3.6562 (c)2012-2017 GizMoCuz
2017-01-31 20:44:19.597 Build Hash: 974bc54, Date: 2017-01-30 00:43:50
2017-01-31 20:44:19.598 System: Raspberry Pi
2017-01-31 20:44:19.598 Startup Path: /home/pi/domoticz/
2017-01-31 20:44:19.667 Sunrise: 07:59:00 SunSet:16:03:00
2017-01-31 20:44:19.667 EventSystem: reset all events...
2017-01-31 20:44:20.096 PluginSystem: Started, Python version '3.5.1'.
2017-01-31 20:44:20.120 Active notification Subsystems: email, http, prowl (3/12)
2017-01-31 20:44:20.125 WebServer(HTTP) started on address: 0.0.0.0 with port 8080
I get this:
-bash: ./domoticz: Is a directory
You need to go to /home/pi/domoticz/. Right now you are in /home/pi/
Thanks, that worked. I now get this:
PluginSystem: Failed dynamic library load, install the latest libpython3.x library that is available for your platform.
Already had 3.2 installed. Just installed 3.6, but still no luck :-(

Tomorrow a new day. Thanks so far for the help.

Re: Python plugin: Sonos

Posted: Wednesday 01 February 2017 6:05
by Dnpwwo
@RayAmsterdam,

Installing Python 3 is not what is required. You need to install libpython3.x instead, where 3.4 is the minimum supported.

Give that a go (or have a look at http://www.domoticz.com/wiki/Linux#Prob ... ing_Python)

Re: Python plugin: Sonos

Posted: Wednesday 01 February 2017 16:08
by RayAmsterdam
Dnpwwo wrote:@RayAmsterdam,

Installing Python 3 is not what is required. You need to install libpython3.x instead, where 3.4 is the minimum supported.

Give that a go (or have a look at http://www.domoticz.com/wiki/Linux#Prob ... ing_Python)
This was the solution. Thanks!

Re: Python plugin: Sonos

Posted: Thursday 02 February 2017 18:02
by julianmclean
Just came across this thread (and learned of the Python plugin system), and will definitely be trying this out int he next couple of days. It may be a bit premature to start asking questions/making suggestions before I've even tried the thing :roll: but anyway just a few thoughts:

[*] From a (very) brief look through the code, as I understand it, the plugin is conversing directly with the Sonos SOAP API? Just wondered if any consideration had been given to interfacing with the HTTP Sonos wrapper (https://github.com/jishi/node-sonos-http-api), which abstracts away much of the complexity into simple HTTP GET URLs. I appreciate that this then demands a "middle-man" (node server running this module), but it could allow for richer functionality and easier expansion to perform new functions. Actually, I guess the comms from Sonos->Domoticz (rather than control) may become trickier, although the wrapper does itself include webhooks for passing along Sonos state transitions. On the plus side, this wrapper has some neat functions for doing announcements/text-to-speech/interrupt - e.g. I use this in my system for things like doorbell integration which become trivial HTTP calls to interrupt all players, ring the doorbell and resume. At the moment, these are "external" to Domoticz, but if would be really nice if these became possible through the semi-native Sonos Domoticz devices.

[*] One thing that would be really good (from my perspective at least ;o) would be the ability for advanced control from the Domoticz environment. Referring back to the HTTP Sonos wrapper again, you can issue simple HTTP commands that cause a search of a given music service to find the closest match and start playback, for example: "http://<server>/Lounge/musicsearch/apple/album/i created disco" finds and plays the Calvin Harris album. Now, having not read the Sonos wrapper code yet, I'm not sure if this is done "through" Sonos, or direct the the music services and then handing off the URL to Sonos. But...back to this Domoticz Sonos plugin, it would be great if we could actually set one of the values for the device to a search term, which would then invoke a search and play. I sometimes use a similar approach when I want to pass arbitrary parameters "through" Domoticz using something like a Text dummy device - I can pass in arbitrary parameter(s) of my choosing (e.g. delimited with pipes) and have Domoticz react to the change, triggering an integrated decide to do something and/or feeding into other Domoticz logic at the same time. Not sure what is possible through the python plugin, but all that is really needed is a single text field to act as a place to put command inputs - a simple scheme can then be developed for that text field, to differentiate different types of command (e.g. "search:i created disco", "radio:kiss FM", "favourite:my hits", "interrupt:doorbell"), essentially allowing for fairly advance interaction with the Sonos through the Domoticz system.

Anyway, first I'll try and get it running as is!

Re: Python plugin: Sonos

Posted: Thursday 02 February 2017 18:32
by tester22
julianmclean wrote:Just came across this thread (and learned of the Python plugin system), and will definitely be trying this out int he next couple of days. It may be a bit premature to start asking questions/making suggestions before I've even tried the thing :roll: but anyway just a few thoughts:

[*] From a (very) brief look through the code, as I understand it, the plugin is conversing directly with the Sonos SOAP API? Just wondered if any consideration had been given to interfacing with the HTTP Sonos wrapper (https://github.com/jishi/node-sonos-http-api), which abstracts away much of the complexity into simple HTTP GET URLs. I appreciate that this then demands a "middle-man" (node server running this module), but it could allow for richer functionality and easier expansion to perform new functions. Actually, I guess the comms from Sonos->Domoticz (rather than control) may become trickier, although the wrapper does itself include webhooks for passing along Sonos state transitions. On the plus side, this wrapper has some neat functions for doing announcements/text-to-speech/interrupt - e.g. I use this in my system for things like doorbell integration which become trivial HTTP calls to interrupt all players, ring the doorbell and resume. At the moment, these are "external" to Domoticz, but if would be really nice if these became possible through the semi-native Sonos Domoticz devices.

[*] One thing that would be really good (from my perspective at least ;o) would be the ability for advanced control from the Domoticz environment. Referring back to the HTTP Sonos wrapper again, you can issue simple HTTP commands that cause a search of a given music service to find the closest match and start playback, for example: "http://<server>/Lounge/musicsearch/apple/album/i created disco" finds and plays the Calvin Harris album. Now, having not read the Sonos wrapper code yet, I'm not sure if this is done "through" Sonos, or direct the the music services and then handing off the URL to Sonos. But...back to this Domoticz Sonos plugin, it would be great if we could actually set one of the values for the device to a search term, which would then invoke a search and play. I sometimes use a similar approach when I want to pass arbitrary parameters "through" Domoticz using something like a Text dummy device - I can pass in arbitrary parameter(s) of my choosing (e.g. delimited with pipes) and have Domoticz react to the change, triggering an integrated decide to do something and/or feeding into other Domoticz logic at the same time. Not sure what is possible through the python plugin, but all that is really needed is a single text field to act as a place to put command inputs - a simple scheme can then be developed for that text field, to differentiate different types of command (e.g. "search:i created disco", "radio:kiss FM", "favourite:my hits", "interrupt:doorbell"), essentially allowing for fairly advance interaction with the Sonos through the Domoticz system.

Anyway, first I'll try and get it running as is!
I had a look both at the node wrapper and the the Soco python class: https://github.com/SoCo/SoCo (I actually copied all the soap messges from there).
But for both those solutions the user would be required to install components other than just Domotics and the plugin.
In my point of view that pretty much ruins the purpose of the plugin and that is the reason why I even didn't use the Socos class even that it would be much easier from the developer perspective.

Also the plugin is currently designed to use the built in communication features of the Domoticz python plugin (when it is stable and I have time).

And yes I have considered TTS but in the implementations I have seen that requires an http server to publish the files so that sonos can read them and currently there is no such functionality in the python plugin framework.

Re: Python plugin: Sonos

Posted: Thursday 02 February 2017 21:57
by Dnpwwo
@julianmclean,

I can't speak for the Sonos functionality but the plugin framework does allow arbitrary commands to be sent through to the plugin from the event system (lua scripts). This allows you to link devices like text or selector switches to actions. I have an internet radio select switch that sents playlist commands to a Kodi plugin:

Code: Select all

    if (deviceName=='Lounge Radio') then
        print ("Kodi event fired on '"..deviceName.."', value '"..deviceValue.."', Lounge Kodi state '"..otherdevices['Lounge Kodi'].."', Denon state '"..otherdevices['Denon'].."'");
        -- Need to synchronise radio event with Denon Amplifier and Lounge Kodi states
        -- URLs for streaming can be found here: http://streamlist.southerncrossaustereo.com.au/
        if (deviceValue == 'Off') then
            if (otherdevices['Lounge Kodi'] ~= 'On') then commandArray['Lounge Kodi'] = 'Stop' end
        elseif (deviceValue == '101.9 Fox FM') then
            commandArray['Lounge Kodi'] = 'Trigger Favorites 0'
        elseif (deviceValue == '104.3 Gold FM') then
            commandArray['Lounge Kodi'] = 'Trigger Favorites 1'
        elseif (deviceValue == '105.1 Triple M FM') then commandArray['Lounge Kodi'] = 'Trigger Favorites 2'
        end
    end
the commands are passed straight through to the plugin onCommand callback.

Obviously that callback needs to interpret the command and send the required message(s) to the external hardware with something like:

Code: Select all

        elif (action == 'Trigger'):
            Domoticz.Send('{"jsonrpc":"2.0","method":"Input.ExecuteAction","params":{"action":"stop"},"id":1006}')
            Domoticz.Send('{"jsonrpc":"2.0","method":"Playlist.Clear","params":{"playlistid":0},"id":2000}')
            Domoticz.Send('{"jsonrpc":"2.0","method":"Playlist.Clear","params":{"playlistid":1},"id":2000}')
            action, sep, params = params.partition(' ')
            action = action.capitalize()
            playlistName = ""
            playlistPos = 0
            if (action == 'Playlist'):
                # Command formats: 'Trigger Playlist ActionMovies',  'Trigger Playlist ActionMovies 15'
                playlistName, sep, params = params.partition(' ')
                if (params.isdigit()):
                    playlistPos = int(params)
                Domoticz.Send('{"jsonrpc":"2.0","method":"Playlist.Add","params":{"playlistid":0,"item":{"directory":"special://profile/playlists/music/'+playlistName+'.xsp\", "media":"music"}},"id":2002}')
            elif (action == 'Favorites') or (action == 'Favourites'):
                # Command formats: 'Trigger Favorites', 'Trigger Favorites 3'
                if (params.isdigit()):
                    playlistPos = int(params)
                Domoticz.Send('{"jsonrpc":"2.0","method":"Favourites.GetFavourites","params":{"properties":["path"]},"id":2100}')
            else:
                Domoticz.Error( "Trigger, Unknown target: "+str(action)+", expected Playlist/Favorites.")

Python plugin: Sonos

Posted: Friday 03 February 2017 7:46
by mvzut
Tester22, I have the Sonos plugin running fine most of the time, but sometimes (maybe once a day) I get a whole bunch of error messages from it in the Domoticz log. Sometimes from one player, sometimes from more at the same time. I'm pretty sure they are caused by a temporary communication hiccup. That can of course happen once in a while with any plugin (it also happens sometimes with my Hue plugin for instance), but usually this is not causing such "explosions" in the log.
Is it possible to do silent retries in the background without immediately showing 5 error messages per player? Or just wait for the next update, and only show a single info message that the connection was lost? You can still show everything when debug mode is on, but I think most people don't want to be alarmed with a flooded error log by small glitches that occasionally happen.

P.S. I'm not a Python coder, but I can't seem to find anything on timeouts of the http request in your code. Maybe the problem can already be solved by waiting a bit longer for the player to respond?

Python plugin: Sonos

Posted: Friday 03 February 2017 10:03
by mvzut
My Sonos status devices are suddenly starting to get a battery level associated with them, which is reported as low. This morning for one player, a second one just a few minutes ago. That's not such a huge problem, unless you have configured battery low warnings. I keep getting those now. Is there something that can be done about this? Or is it a bug in the latest Domoticz beta version?

Re: Python plugin: Sonos

Posted: Friday 03 February 2017 11:57
by RayAmsterdam
I've got my 3 Sonos speakers up and running now :-)
Since the 3 speakers are grouped only 1 (main) speaker is updated in Domoticz with the information. For the stations,songs, etc that is not a problem. The grouped speakers however do not change their state in Domoticz when turned off, only the main speaker. They stay 'On'. Is this a bug in the plugin, or is this the behaviour of the Sonos protocol?

Re: Python plugin: Sonos

Posted: Friday 03 February 2017 13:22
by julianmclean
tester22 wrote:
I had a look both at the node wrapper and the the Soco python class: https://github.com/SoCo/SoCo (I actually copied all the soap messges from there).
But for both those solutions the user would be required to install components other than just Domotics and the plugin.
In my point of view that pretty much ruins the purpose of the plugin and that is the reason why I even didn't use the Socos class even that it would be much easier from the developer perspective.

Also the plugin is currently designed to use the built in communication features of the Domoticz python plugin (when it is stable and I have time).

And yes I have considered TTS but in the implementations I have seen that requires an http server to publish the files so that sonos can read them and currently there is no such functionality in the python plugin framework.
Understood, and you are probably right about the purpose of the plugin. I guess features from SoCo and node wrapper can always be "ported" across where considered useful, and if they fit within what is possible in the Domoticz framework. Regarding TTS and playing other "clips", it is also possible with just smb other shared drive (which many Sonos uses would generally already have for any locally-stored music).