but if you post the exact plugin.py file I can try and 'not load it' as well to see if I can reproduce the issue. I haven't seen import failure cause stability issues previously though.
You could try removing the '_pycache_' folder in the Sonos plugins folder if you have one. I have had issues when upgrading a plugin where Python got a little confused.
Thanks for looking into this. I have removed the '_pycache_' folder but that didn't make any difference. It's interesting that tester22 has got the exact same error in the log. Also as soon as I remove the Sonos script Domoticz starts without any issues so it really seems the culprit to me.
If you want to try for yourself I am using the latest version of the plugin:
tester22 wrote:Managed to get the built in xml parser to work.
Currently only player state and title.
Volume and mute is not loaded nor radio stations.
Works, thanks! You say that (only) radio stations are not shown, but when I play something from a streaming service like Spotify it also doesn't show the title.
Hmmm, looks like I was too optimistic, Domoticz froze after a few minutes. Can't seem to get it running stable. Is it working reliable at your side?
Tried it again today, there have been a few beta updates of Domoticz since the last time I tried. I removed the __pycache__ folder first. It seems to work again for me! Song names are also shown. I only added one player this time, I will add some more when this continues to run stable.
Raspberry Pi 4 - RFXtrx433 - CC2531 Zigbee - Opentherm Gateway - P1 smart meter - Netatmo - Philips Hue - ELV Max! - ESP8266 DIY water meter - 6 x Sonos - 4 x IP cameras - Wall mounted tablet + Dashticz - Google Home integration - MANY switches/sensors
mvzut wrote:
Works, thanks! You say that (only) radio stations are not shown, but when I play something from a streaming service like Spotify it also doesn't show the title.
Hmmm, looks like I was too optimistic, Domoticz froze after a few minutes. Can't seem to get it running stable. Is it working reliable at your side?
Tried it again today, there have been a few beta updates of Domoticz since the last time I tried. I removed the __pycache__ folder first. It seems to work again for me! Song names are also shown. I only added one player this time, I will add some more when this continues to run stable.
Actually did you remove all the Sonos setup within Domoticz, then remove the __pycache__ folder and then re-add the plugin and manually setup all of the configuration? So far I only deleted the __pycache__ folder with leaving everything else in place and got nowhere...
Unfortunately tester22 is no longer maintaining the code for this plugin.
But I agreed with him that I will continue developing and maintaining the code for the Sonos plugin.
I am currently working on a new version which also shows the radio station and the volume again and has an option to go to the previous or next song. Will see if I can add some more options to the Control switch. Any ideas are welcome.
Next to that I will also have a look if I can load the favorites so they (at least the first 10 due to the limit of the items in the selector switch) can be operated from Domoticz.
screenprint.png (89.44 KiB) Viewed 3552 times
When I have the new version ready for testing, I will post that here.
That looks pretty cool. I had to switch back from Beta to Stable so for now don't have any native SOnos control from Domoticz, but I'm using jishi's node script, which works pretty good for now.
Would it be possible to build something similar to how his 'clipall' command works, as a native Notification in Domoticz?
The test version of the new plugin is nearly ready.
It will have on option to play a file on the Sonos via the notification system in Domoticz
That way a file can be played from any other switch or LUA by sending it as a notification to the Sonos.
The Sonos will then play that file and after that continue playing the song (on the same position) or radio station it was playing before the notification.
I aim to have the test version ready this weekend so you can also try it yourself.
screenprint_notification.png (218.87 KiB) Viewed 3422 times
This looks brilliant! Does this single notification get played to all sonos speakers in the system, or is there any control over which ones can be applied?
Is there any idea, on how long the process usually takes to go from this stage to appearing in the stable release?
WHilst on that subject, is there any updated roadmap or schedule for the next stable release?
The notification will get played on the Sonos you choose in the overview with the checkboxes. So if you have for example 2 Sonos, you can both select them and the message will be played on both.
The beauty of the Python plugins is that is independent from the Domoticz releases (except for breaking changes in the Python framework in Domoticz of course).
So I am currently working on the plugin with the latest Domoticz stable version from 30th July.
Once the plugin is ready, you can just add the plugin to Domoticz and it will be available for you. No need to wait for a Domoticz release, assuming you have the latest stable version in use.
Currently working on a way to show your favorite TuneIn radio stations in a Domoticz selector switch. Once that is added I need to do some code cleanup and after that the plugin is ready for testing.
G3rard wrote:The notification will get played on the Sonos you choose in the overview with the checkboxes. So if you have for example 2 Sonos, you can both select them and the message will be played on both.
The beauty of the Python plugins is that is independent from the Domoticz releases (except for breaking changes in the Python framework in Domoticz of course).
So I am currently working on the plugin with the latest Domoticz stable version from 30th July.
Once the plugin is ready, you can just add the plugin to Domoticz and it will be available for you. No need to wait for a Domoticz release, assuming you have the latest stable version in use.
Currently working on a way to show your favorite TuneIn radio stations in a Domoticz selector switch. Once that is added I need to do some code cleanup and after that the plugin is ready for testing.
Sounds pretty awesome. I'm hoping this plugin will have the ability to instantly play stored MP3 messages for notifications, with minimal delay. I'm currently using the Node Sonos http api for a doorbell, but there's anywhere between 5 - 15 seconds of delay between the button push and the audio played, which isn't ideal.
One last thing, where can I find your plugin? Is it currently on GH?
That is a php Sonos solution, it is not the Python script I am working on now.
The Python script is not yet on Github. Will place it there asap and post it there. But I still need some time to finish the radio station favorites and clean up the code.