Python plugin: Sonos [new version]

Python and python framework
Rodio
Posts: 40
Joined: Thursday 16 April 2015 10:18
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python plugin: Sonos [new version]

Post by Rodio » Saturday 06 January 2018 23:23

OK

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

GrR

Quax1507
Posts: 120
Joined: Tuesday 07 April 2015 21:29
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python plugin: Sonos [new version]

Post by Quax1507 » Tuesday 16 January 2018 19:04

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?

Quax1507
Posts: 120
Joined: Tuesday 07 April 2015 21:29
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python plugin: Sonos [new version]

Post by Quax1507 » Tuesday 16 January 2018 19:56

Plugin works when Sonos in *not* grouped!

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

Any idea to fix that?

Rodio
Posts: 40
Joined: Thursday 16 April 2015 10:18
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python plugin: Sonos [new version]

Post by Rodio » Friday 19 January 2018 20:18

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

Rodio
Posts: 40
Joined: Thursday 16 April 2015 10:18
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python plugin: Sonos [new version]

Post by Rodio » Saturday 20 January 2018 0:04

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

d3rax
Posts: 19
Joined: Thursday 25 February 2016 21:16
Target OS: -
Domoticz version:
Contact:

Re: Python plugin: Sonos [new version]

Post by d3rax » Thursday 22 February 2018 22:01

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!

junr
Posts: 11
Joined: Tuesday 07 June 2016 23:02
Target OS: Raspberry Pi
Domoticz version:
Location: Netherlands
Contact:

Re: Python plugin: Sonos [new version]

Post by junr » Sunday 11 March 2018 21:24

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
RFXcom | Toon | Zware | Sonos |

mvzut
Posts: 306
Joined: Thursday 12 November 2015 11:55
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Marum, The Netherlands
Contact:

Python plugin: Sonos [new version]

Post by mvzut » Sunday 11 March 2018 21:27

I have the same... Reverted to a previous version which doesn't give these messages.
Raspberry Pi 2B - RFXtrx433 - Aeon Z-Stick gen5 - Opentherm Gateway - P1 smart meter - Netatmo - Philips Hue - ELV Max! - ESP8266 DIY water meter - Sonos Connect & PLAY:1 - Kodi - Wall mounted tablet + Imperihome - MANY switches/sensors

d3rax
Posts: 19
Joined: Thursday 25 February 2016 21:16
Target OS: -
Domoticz version:
Contact:

Re: Python plugin: Sonos [new version]

Post by d3rax » Monday 12 March 2018 21:16

d3rax wrote:
Thursday 22 February 2018 22: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?

mvzut
Posts: 306
Joined: Thursday 12 November 2015 11:55
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Marum, The Netherlands
Contact:

Python plugin: Sonos [new version]

Post by mvzut » Wednesday 14 March 2018 22:50

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.
Raspberry Pi 2B - RFXtrx433 - Aeon Z-Stick gen5 - Opentherm Gateway - P1 smart meter - Netatmo - Philips Hue - ELV Max! - ESP8266 DIY water meter - Sonos Connect & PLAY:1 - Kodi - Wall mounted tablet + Imperihome - MANY switches/sensors

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests