Page 3 of 4

Re: Python plugin: Sonos [new version]

Posted: Saturday 06 January 2018 22:23
by Rodio
OK

Again, thx for the good work.
I'm really happy with this plugin 8-) 8-)

GrR

Re: Python plugin: Sonos [new version]

Posted: Tuesday 16 January 2018 18:04
by Quax1507
I tried the plugin today. Configured IP of Sonos.
Radio list was discovered correctly.

Sonos does not react on any change of the created devices.

Here is the debug output after changing volume (no volume was changed at the Sonos box):

Code: Select all

2018-01-16 17:56:34.995  (Sonos) Sonos mute status: 0
2018-01-16 17:56:35.015  (Sonos) Update Sonos - Control: 0 - '0'
2018-01-16 17:57:01.620  (Sonos) Calling message handler 'onCommand'.
2018-01-16 17:57:01.620  (Sonos) onCommand called for Unit 2: Parameter 'Set Level'
2018-01-16 17:57:04.927  (Sonos) Calling message handler 'onHeartbeat'.
2018-01-16 17:57:04.941  (Sonos) <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetTransportInfoResponse xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"><CurrentTransportState>PLAYING</CurrentTransportState><CurrentTransportStatus>OK</CurrentTransportStatus><CurrentSpeed>1</CurrentSpeed></u:GetTransportInfoResponse></s:Body></s:Envelope>
2018-01-16 17:57:04.942  (Sonos) <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetTransportInfoResponse xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"><CurrentTransportState>PLAYING</CurrentTransportState><CurrentTransportStatus>OK</CurrentTransportStatus><CurrentSpeed>1</CurrentSpeed></u:GetTransportInfoResponse></s:Body></s:Envelope>
2018-01-16 17:57:04.942  (Sonos) Sonos state: PLAYING
2018-01-16 17:57:04.953  (Sonos) Update Sonos - Control: 1 - '0'
2018-01-16 17:57:04.967  (Sonos) <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetPositionInfoResponse xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"><Track>1</Track><TrackDuration>NOT_IMPLEMENTED</TrackDuration><TrackMetaData>NOT_IMPLEMENTED</TrackMetaData><TrackURI>x-rincon:RINCON_7828CA24905201400</TrackURI><RelTime>NOT_IMPLEMENTED</RelTime><AbsTime>NOT_IMPLEMENTED</AbsTime><RelCount>2147483647</RelCount><AbsCount>2147483647</AbsCount></u:GetPositionInfoResponse></s:Body></s:Envelope>
2018-01-16 17:57:04.967  (Sonos) <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetPositionInfoResponse xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"><Track>1</Track><TrackDuration>NOT_IMPLEMENTED</TrackDuration><TrackMetaData>NOT_IMPLEMENTED</TrackMetaData><TrackURI>x-rincon:RINCON_7828CA24905201400</TrackURI><RelTime>NOT_IMPLEMENTED</RelTime><AbsTime>NOT_IMPLEMENTED</AbsTime><RelCount>2147483647</RelCount><AbsCount>2147483647</AbsCount></u:GetPositionInfoResponse></s:Body></s:Envelope>
2018-01-16 17:57:05.006  (Sonos) <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetVolumeResponse xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"><CurrentVolume>10</CurrentVolume></u:GetVolumeResponse></s:Body></s:Envelope>
2018-01-16 17:57:05.007  (Sonos) <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetVolumeResponse xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"><CurrentVolume>10</CurrentVolume></u:GetVolumeResponse></s:Body></s:Envelope>
2018-01-16 17:57:05.007  (Sonos) Sonos volume: 10
2018-01-16 17:57:05.020  (Sonos) <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetMuteResponse xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"><CurrentMute>0</CurrentMute></u:GetMuteResponse></s:Body></s:Envelope>
2018-01-16 17:57:05.021  (Sonos) <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetMuteResponse xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"><CurrentMute>0</CurrentMute></u:GetMuteResponse></s:Body></s:Envelope>
2018-01-16 17:57:05.021  (Sonos) Sonos mute status: 0
2018-01-16 17:57:05.032  (Sonos) Update Sonos - Control: 0 - '0'
Any hints?

Re: Python plugin: Sonos [new version]

Posted: Tuesday 16 January 2018 18:56
by Quax1507
Plugin works when Sonos in *not* grouped!

After grouping a second Sonos it does not work anymore :(

Any idea to fix that?

Re: Python plugin: Sonos [new version]

Posted: Friday 19 January 2018 19:18
by Rodio
Boehoehoe

2018-01-19 19:14:14.020 (Sonos Woonkamer) Calling message handler 'onHeartbeat'.
2018-01-19 19:14:14.139 (P1) P1 Smart Meter (P1 - Power)
2018-01-19 19:14:16.517 (P1) General/Voltage (Voltage L1)
2018-01-19 19:14:17.175 Error: (Sonos Woonkamer) Sonos not available ([Errno 113] No route to host)

Not working anymore :shock: :shock:
Reboot doesn't help.
As far as I know I didn't change/install anything.
Anyone got an idea?

Thx
R

Re: Python plugin: Sonos [new version]

Posted: Friday 19 January 2018 23:04
by Rodio
mhhhhh,

Looks like I did install something :?
Python was on 2.7.9 and is now on 3.4.2.
Could this be the problem?

edit:
On the terminal:
pi@raspberrypi:~/domoticz/plugins/sonos $ python
Python 2.7.9 (default, Sep 17 2016, 20:26:04)

But during startup in the Domo logfiles it reports 3.4.2

Re: Python plugin: Sonos [new version]

Posted: Thursday 22 February 2018 21:01
by d3rax
Hi,

I'm running domoticz Version 3.8153 (July 30h 2017) on my raspberry pi.

I first installed python 3 using these commands:

sudo apt-get install -y python3

sudo apt-get install -y python3-dev

After that I installed the plugin using these commands:

cd domoticz/plugins
git clone https://github.com/gerard33/sonos.git

cd domoticz/plugins/sonos
git pull

Then I add the my Sonos One in the hardware tab and configure it. Everything works then works perfectly. Alle the switches and sliders work, the radio channels work and the mp3 notifications work.

It has been running stable for a few days, but the problems begin when I restart my Pi. After restarting I get the domoticz 'offline' screen, restarting does not work. The only way to get domoticz working again is renaming the plugin folder, e.a. disableing the plugins.

I don't really have an idea how to solve this. I did notice that my python version is at 2.7.9. I don't know why but I'm not able to get a higher version of python? Really hope you guys have a suggestion, I really like the plugin!

Small update:
Instead of renaming the plugin folder i renamed the folder AwoxSMP in the plugin folder. I don't know what this plugin does, but after I rebooted, domoticz came back online AND the sonos plugin works! But I would like know whats going on here, hope there are some suggestions!

Re: Python plugin: Sonos [new version]

Posted: Sunday 11 March 2018 20:24
by junr
Hello,

Domoticz reported an error in the log.

domoticz version: V3.9030
HELP!

2018-03-11 18:33:00.223 Error: (Sonos) Unexpected response status received in function sendMessage (500, Internal Server Error). The following command is sent: urn:schemas-upnp-org:service:AVTransport:1#Play, /MediaRenderer/AVTransport/Control
2018-03-11 18:33:00.231 Error: Notification NOT handled, please report on GitHub!
2018-03-11 18:33:00.231 (Sonos) Update Sonos - Status: 1 - 'Off'
2018-03-11 18:33:00.237 Error: Notification NOT handled, please report on GitHub!
2018-03-11 18:33:00.238 (Sonos) Update Sonos - Volume: 2 - '10'
2018-03-11 18:33:00.245 Error: Notification NOT handled, please report on GitHub!
2018-03-11 18:33:00.246 (Sonos) Update Sonos - Control: 1 - '0'
2018-03-11 18:33:08.377 User: Admin initiated a switch command (735/Sonos - Radio/Set Level)
2018-03-11 18:33:08.414 (Sonos) Radio 10, x-sonosapi-stream:s16793?sid=254&flags=8224&sn=0
2018-03-11 18:33:14.577 Error: Notification NOT handled, please report on GitHub!
2018-03-11 18:33:14.578 (Sonos) Update Sonos - Status: 1 - 'Radio 10 - Snow Patrol - Just Say Yes'
2018-03-11 18:33:14.586 Error: Notification NOT handled, please report on GitHub!

Greetz Jorgen

Python plugin: Sonos [new version]

Posted: Sunday 11 March 2018 20:27
by mvzut
I have the same... Reverted to a previous version which doesn't give these messages.

Re: Python plugin: Sonos [new version]

Posted: Monday 12 March 2018 20:16
by d3rax
d3rax wrote: Thursday 22 February 2018 21:01 Small update:
Instead of renaming the plugin folder i renamed the folder AwoxSMP in the plugin folder. I don't know what this plugin does, but after I rebooted, domoticz came back online AND the sonos plugin works! But I would like know whats going on here, hope there are some suggestions!
Renaming the AwoxSMP folder did not work for me either. After a reboot, domoticz does not come back online. Only thing that helps is renaming the plugin folder and reboot.

Does any one else have this issue?

Python plugin: Sonos [new version]

Posted: Wednesday 14 March 2018 21:50
by mvzut
mvzut wrote:I have the same... Reverted to a previous version which doesn't give these messages.
Changing to the last beta seems to have solved it for me.

Re: Python plugin: Sonos [new version]

Posted: Saturday 25 August 2018 21:40
by josimd
Hi Gerard, this plugin does not work anymore in version 4.9700 do you have an idea how to solve?

Many thanks!

Re: Python plugin: Sonos [new version]

Posted: Wednesday 17 October 2018 15:12
by leecollings
Hey all,

Can anyone give a status update as to the roadmap for this eventually being added to the stable release?

Re: Python plugin: Sonos [new version]

Posted: Wednesday 17 October 2018 15:16
by mvzut
leecollings wrote:Hey all,

Can anyone give a status update as to the roadmap for this eventually being added to the stable release?
I don't think Python plugins are intended to be added to a release. The plugin works fine by the way in the betas.

Re: Python plugin: Sonos [new version]

Posted: Wednesday 17 October 2018 15:19
by leecollings
Okay, sorry I didnt' mean to the release of Domoticz, I meant to be included in the dropdown of hardware on the stable version. What needs to happen for that?

Re: Python plugin: Sonos [new version]

Posted: Wednesday 17 October 2018 15:30
by mvzut
leecollings wrote:Okay, sorry I didnt' mean to the release of Domoticz, I meant to be included in the dropdown of hardware on the stable version. What needs to happen for that?
Python plugins only appear when you manually add the files to the plugin folder. Usually with some sort of git pull command, this is normally explained in the corresponding forum topic. Or alternatively with the plugin manager (which is a plugin in itself). Only a few examples are included in the plugin folder by default.

If you want a plugin to become part of the default list of hardware that is embedded in Domoticz, it should be completely rewritten in C and included in the beta versions first. But the whole point of Python plugins was that this much more complicated route would not be necessary anymore.

Re: Python plugin: Sonos [new version]

Posted: Wednesday 17 October 2018 15:37
by leecollings
So is this plugin ready to be pulled into the stable version of Domoticz yet, or not? You still haven't made it clear if it's ready for use or not...

Re: Python plugin: Sonos [new version]

Posted: Wednesday 17 October 2018 15:41
by mvzut
leecollings wrote:So is this plugin ready to be pulled into the stable version of Domoticz yet, or not? You still haven't made it clear if it's ready for use or not...
No, even though I am not the author I am pretty sure it will not become part of a stable version, simply because no Python plugin has ever been included in a stable version. But it's very much ready for use! Just follow the installation instructions and start using it, like I did a couple of months ago.

Re: Python plugin: Sonos [new version]

Posted: Wednesday 17 October 2018 15:42
by leecollings
Okay, forget about it being included in the stable release, I accept that's not what I meant.

But in terms of the huge long list of Hardware I have in my dropdown list, these have all been included in the release right? And there are some things there that are very specific and that I would never use.

So, how have these items been included in this list by default?

Re: Python plugin: Sonos [new version]

Posted: Wednesday 17 October 2018 15:43
by leecollings
This is why I find this confusing, so you're saying it's ready to use int he stable version.. However it has to be manually added. Why is this?

And is there a reason why it can't be automatically added to the dropdown list?

Python plugin: Sonos [new version]

Posted: Wednesday 17 October 2018 15:49
by mvzut
leecollings wrote:This is why I find this confusing, so you're saying it's ready to use int he stable version.. However it has to be manually added. Why is this?

And is there a reason why it can't be automatically added to the dropdown list?
The devices in the long list are there because people experienced in C coding worked on them in the past, and had them included in the main code. The Python framework was created to make it possible for more people to create plugins. There are already tens of those, all described somewhere in this forum, but none of them added to the list by default.

UPDATE:
I think that one of the reasons why all Python plugins are not included in the standard Domoticz package, is because they are still actively being developed in many cases. So they would be outdated very soon, especially if you use a stable release which you don't update very regularly. Domoticz has no automated update system built-in for plugins.

To address your "concerns", maybe it would be a good idea if the plugin manager (https://www.domoticz.com/wiki/Python_Plugin_Manager) would become a standard installed plugin...