Page 3 of 9

Re: Python plugin: Sonos

Posted: Friday 03 February 2017 14:50
by Dnpwwo
@mvzut,

Battery and Signal level functionality was introduced in the last beta and it had an issue. I've submitted a fix tonight but once you take that beta you will need to delete and recreate the affacted devices to clear the low battery status.

Should be alright after that.

Re: Python plugin: Sonos

Posted: Friday 03 February 2017 15:02
by tester22
mvzut wrote: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?
Hm, right now there is no error handeling since I will switch to the built in function when it works for sonos.
So yes, if the Sonos would go down today you will get one error for each try. (this means 2 or 3 errors per polling intervall).

Re: Python plugin: Sonos

Posted: Friday 03 February 2017 15:03
by tester22
RayAmsterdam wrote: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?
This is related to the Sonos protocol but I can try to make it look better in the gui.

Python plugin: Sonos

Posted: Friday 03 February 2017 15:14
by mvzut
tester22 wrote:Hm, right now there is no error handeling since I will switch to the built in function when it works for sonos.
So yes, if the Sonos would go down today you will get one error for each try. (this means 2 or 3 errors per polling intervall).
That sounds good, I can't wait... Just had such a small hiccup again, and this is what's in the log for one missed update on just two players:

Code: Select all

017-02-03 13:49:40.262 Error: (Sonos Laura) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:42.869 Error: (Sonos studeerkamer) 'onHeartbeat' failed 'ConnectionRefusedError'.
2017-02-03 13:49:42.869 Error: (Sonos studeerkamer) ----> Line 188 in /home/pi/domoticz/plugins/Sonos/plugin.py, function onHeartbeat
2017-02-03 13:49:42.869 Error: (Sonos studeerkamer) ----> Line 211 in /home/pi/domoticz/plugins/Sonos/plugin.py, function sendMessage
2017-02-03 13:49:42.869 Error: (Sonos studeerkamer) ----> Line 1083 in /usr/local/lib/python3.5/http/client.py, function request
2017-02-03 13:49:42.869 Error: (Sonos studeerkamer) ----> Line 1128 in /usr/local/lib/python3.5/http/client.py, function _send_request
2017-02-03 13:49:42.869 Error: (Sonos studeerkamer) ----> Line 1079 in /usr/local/lib/python3.5/http/client.py, function endheaders
2017-02-03 13:49:42.869 Error: (Sonos studeerkamer) ----> Line 911 in /usr/local/lib/python3.5/http/client.py, function _send_output
2017-02-03 13:49:42.870 Error: (Sonos studeerkamer) ----> Line 854 in /usr/local/lib/python3.5/http/client.py, function send
2017-02-03 13:49:42.870 Error: (Sonos studeerkamer) ----> Line 826 in /usr/local/lib/python3.5/http/client.py, function connect
2017-02-03 13:49:42.870 Error: (Sonos studeerkamer) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:42.870 Error: (Sonos studeerkamer) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:42.962 Error: (Sonos Laura) 'onHeartbeat' failed 'ConnectionRefusedError'.
2017-02-03 13:49:42.964 Error: (Sonos Laura) ----> Line 188 in /home/pi/domoticz/plugins/Sonos/plugin.py, function onHeartbeat
2017-02-03 13:49:42.966 Error: (Sonos Laura) ----> Line 211 in /home/pi/domoticz/plugins/Sonos/plugin.py, function sendMessage
2017-02-03 13:49:42.968 Error: (Sonos Laura) ----> Line 1083 in /usr/local/lib/python3.5/http/client.py, function request
2017-02-03 13:49:42.970 Error: (Sonos Laura) ----> Line 1128 in /usr/local/lib/python3.5/http/client.py, function _send_request
2017-02-03 13:49:42.970 Error: (Sonos Laura) ----> Line 1079 in /usr/local/lib/python3.5/http/client.py, function endheaders
2017-02-03 13:49:42.972 Error: (Sonos Laura) ----> Line 911 in /usr/local/lib/python3.5/http/client.py, function _send_output
2017-02-03 13:49:42.972 Error: (Sonos Laura) ----> Line 854 in /usr/local/lib/python3.5/http/client.py, function send
2017-02-03 13:49:42.972 Error: (Sonos Laura) ----> Line 826 in /usr/local/lib/python3.5/http/client.py, function connect
2017-02-03 13:49:42.972 Error: (Sonos Laura) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:42.972 Error: (Sonos Laura) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:42.996 Error: (Sonos studeerkamer) 'onHeartbeat' failed 'ConnectionRefusedError'.
2017-02-03 13:49:42.998 Error: (Sonos studeerkamer) ----> Line 188 in /home/pi/domoticz/plugins/Sonos/plugin.py, function onHeartbeat
2017-02-03 13:49:43.000 Error: (Sonos studeerkamer) ----> Line 211 in /home/pi/domoticz/plugins/Sonos/plugin.py, function sendMessage
2017-02-03 13:49:43.002 Error: (Sonos studeerkamer) ----> Line 1083 in /usr/local/lib/python3.5/http/client.py, function request
2017-02-03 13:49:43.004 Error: (Sonos studeerkamer) ----> Line 1128 in /usr/local/lib/python3.5/http/client.py, function _send_request
2017-02-03 13:49:43.004 Error: (Sonos studeerkamer) ----> Line 1079 in /usr/local/lib/python3.5/http/client.py, function endheaders
2017-02-03 13:49:43.004 Error: (Sonos studeerkamer) ----> Line 911 in /usr/local/lib/python3.5/http/client.py, function _send_output
2017-02-03 13:49:43.004 Error: (Sonos studeerkamer) ----> Line 854 in /usr/local/lib/python3.5/http/client.py, function send
2017-02-03 13:49:43.004 Error: (Sonos studeerkamer) ----> Line 826 in /usr/local/lib/python3.5/http/client.py, function connect
2017-02-03 13:49:43.004 Error: (Sonos studeerkamer) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:43.004 Error: (Sonos studeerkamer) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:43.057 Error: (Sonos Laura) 'onHeartbeat' failed 'ConnectionRefusedError'.
2017-02-03 13:49:43.060 Error: (Sonos Laura) ----> Line 188 in /home/pi/domoticz/plugins/Sonos/plugin.py, function onHeartbeat
2017-02-03 13:49:43.062 Error: (Sonos Laura) ----> Line 211 in /home/pi/domoticz/plugins/Sonos/plugin.py, function sendMessage
2017-02-03 13:49:43.063 Error: (Sonos Laura) ----> Line 1083 in /usr/local/lib/python3.5/http/client.py, function request
2017-02-03 13:49:43.065 Error: (Sonos Laura) ----> Line 1128 in /usr/local/lib/python3.5/http/client.py, function _send_request
2017-02-03 13:49:43.065 Error: (Sonos Laura) ----> Line 1079 in /usr/local/lib/python3.5/http/client.py, function endheaders
2017-02-03 13:49:43.065 Error: (Sonos Laura) ----> Line 911 in /usr/local/lib/python3.5/http/client.py, function _send_output
2017-02-03 13:49:43.065 Error: (Sonos Laura) ----> Line 854 in /usr/local/lib/python3.5/http/client.py, function send
2017-02-03 13:49:43.065 Error: (Sonos Laura) ----> Line 826 in /usr/local/lib/python3.5/http/client.py, function connect
2017-02-03 13:49:43.066 Error: (Sonos Laura) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:43.066 Error: (Sonos Laura) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:43.090 Error: (Sonos studeerkamer) 'onHeartbeat' failed 'ConnectionRefusedError'.
2017-02-03 13:49:43.092 Error: (Sonos studeerkamer) ----> Line 188 in /home/pi/domoticz/plugins/Sonos/plugin.py, function onHeartbeat
2017-02-03 13:49:43.094 Error: (Sonos studeerkamer) ----> Line 211 in /home/pi/domoticz/plugins/Sonos/plugin.py, function sendMessage
2017-02-03 13:49:43.096 Error: (Sonos studeerkamer) ----> Line 1083 in /usr/local/lib/python3.5/http/client.py, function request
2017-02-03 13:49:43.098 Error: (Sonos studeerkamer) ----> Line 1128 in /usr/local/lib/python3.5/http/client.py, function _send_request
2017-02-03 13:49:43.098 Error: (Sonos studeerkamer) ----> Line 1079 in /usr/local/lib/python3.5/http/client.py, function endheaders
2017-02-03 13:49:43.098 Error: (Sonos studeerkamer) ----> Line 911 in /usr/local/lib/python3.5/http/client.py, function _send_output
2017-02-03 13:49:43.098 Error: (Sonos studeerkamer) ----> Line 854 in /usr/local/lib/python3.5/http/client.py, function send
2017-02-03 13:49:43.098 Error: (Sonos studeerkamer) ----> Line 826 in /usr/local/lib/python3.5/http/client.py, function connect
2017-02-03 13:49:43.098 Error: (Sonos studeerkamer) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:43.098 Error: (Sonos studeerkamer) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:43.144 Error: (Sonos Laura) 'onHeartbeat' failed 'ConnectionRefusedError'.
2017-02-03 13:49:43.146 Error: (Sonos Laura) ----> Line 188 in /home/pi/domoticz/plugins/Sonos/plugin.py, function onHeartbeat
2017-02-03 13:49:43.148 Error: (Sonos Laura) ----> Line 211 in /home/pi/domoticz/plugins/Sonos/plugin.py, function sendMessage
2017-02-03 13:49:43.149 Error: (Sonos Laura) ----> Line 1083 in /usr/local/lib/python3.5/http/client.py, function request
2017-02-03 13:49:43.152 Error: (Sonos Laura) ----> Line 1128 in /usr/local/lib/python3.5/http/client.py, function _send_request
2017-02-03 13:49:43.152 Error: (Sonos Laura) ----> Line 1079 in /usr/local/lib/python3.5/http/client.py, function endheaders
2017-02-03 13:49:43.152 Error: (Sonos Laura) ----> Line 911 in /usr/local/lib/python3.5/http/client.py, function _send_output
2017-02-03 13:49:43.152 Error: (Sonos Laura) ----> Line 854 in /usr/local/lib/python3.5/http/client.py, function send
2017-02-03 13:49:43.152 Error: (Sonos Laura) ----> Line 826 in /usr/local/lib/python3.5/http/client.py, function connect
2017-02-03 13:49:43.152 Error: (Sonos Laura) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:43.152 Error: (Sonos Laura) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:43.177 Error: (Sonos studeerkamer) 'onHeartbeat' failed 'ConnectionRefusedError'.
2017-02-03 13:49:43.179 Error: (Sonos studeerkamer) ----> Line 188 in /home/pi/domoticz/plugins/Sonos/plugin.py, function onHeartbeat
2017-02-03 13:49:43.182 Error: (Sonos studeerkamer) ----> Line 211 in /home/pi/domoticz/plugins/Sonos/plugin.py, function sendMessage
2017-02-03 13:49:43.184 Error: (Sonos studeerkamer) ----> Line 1083 in /usr/local/lib/python3.5/http/client.py, function request
2017-02-03 13:49:43.186 Error: (Sonos studeerkamer) ----> Line 1128 in /usr/local/lib/python3.5/http/client.py, function _send_request
2017-02-03 13:49:43.186 Error: (Sonos studeerkamer) ----> Line 1079 in /usr/local/lib/python3.5/http/client.py, function endheaders
2017-02-03 13:49:43.186 Error: (Sonos studeerkamer) ----> Line 911 in /usr/local/lib/python3.5/http/client.py, function _send_output
2017-02-03 13:49:43.186 Error: (Sonos studeerkamer) ----> Line 854 in /usr/local/lib/python3.5/http/client.py, function send
2017-02-03 13:49:43.186 Error: (Sonos studeerkamer) ----> Line 826 in /usr/local/lib/python3.5/http/client.py, function connect
2017-02-03 13:49:43.186 Error: (Sonos studeerkamer) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:43.186 Error: (Sonos studeerkamer) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:43.234 Error: (Sonos Laura) 'onHeartbeat' failed 'ConnectionRefusedError'.
2017-02-03 13:49:43.236 Error: (Sonos Laura) ----> Line 188 in /home/pi/domoticz/plugins/Sonos/plugin.py, function onHeartbeat
2017-02-03 13:49:43.238 Error: (Sonos Laura) ----> Line 211 in /home/pi/domoticz/plugins/Sonos/plugin.py, function sendMessage
2017-02-03 13:49:43.240 Error: (Sonos Laura) ----> Line 1083 in /usr/local/lib/python3.5/http/client.py, function request
2017-02-03 13:49:43.242 Error: (Sonos Laura) ----> Line 1128 in /usr/local/lib/python3.5/http/client.py, function _send_request
2017-02-03 13:49:43.242 Error: (Sonos Laura) ----> Line 1079 in /usr/local/lib/python3.5/http/client.py, function endheaders
2017-02-03 13:49:43.242 Error: (Sonos Laura) ----> Line 911 in /usr/local/lib/python3.5/http/client.py, function _send_output
2017-02-03 13:49:43.242 Error: (Sonos Laura) ----> Line 854 in /usr/local/lib/python3.5/http/client.py, function send
2017-02-03 13:49:43.242 Error: (Sonos Laura) ----> Line 826 in /usr/local/lib/python3.5/http/client.py, function connect
2017-02-03 13:49:43.242 Error: (Sonos Laura) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:43.242 Error: (Sonos Laura) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:43.268 Error: (Sonos studeerkamer) 'onHeartbeat' failed 'ConnectionRefusedError'.
2017-02-03 13:49:43.270 Error: (Sonos studeerkamer) ----> Line 188 in /home/pi/domoticz/plugins/Sonos/plugin.py, function onHeartbeat
2017-02-03 13:49:43.272 Error: (Sonos studeerkamer) ----> Line 211 in /home/pi/domoticz/plugins/Sonos/plugin.py, function sendMessage
2017-02-03 13:49:43.274 Error: (Sonos studeerkamer) ----> Line 1083 in /usr/local/lib/python3.5/http/client.py, function request
2017-02-03 13:49:43.276 Error: (Sonos studeerkamer) ----> Line 1128 in /usr/local/lib/python3.5/http/client.py, function _send_request
2017-02-03 13:49:43.276 Error: (Sonos studeerkamer) ----> Line 1079 in /usr/local/lib/python3.5/http/client.py, function endheaders
2017-02-03 13:49:43.276 Error: (Sonos studeerkamer) ----> Line 911 in /usr/local/lib/python3.5/http/client.py, function _send_output
2017-02-03 13:49:43.276 Error: (Sonos studeerkamer) ----> Line 854 in /usr/local/lib/python3.5/http/client.py, function send
2017-02-03 13:49:43.276 Error: (Sonos studeerkamer) ----> Line 826 in /usr/local/lib/python3.5/http/client.py, function connect
2017-02-03 13:49:43.277 Error: (Sonos studeerkamer) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:43.277 Error: (Sonos studeerkamer) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection

Re: Python plugin: Sonos

Posted: Friday 03 February 2017 15:58
by tester22
mvzut wrote:
tester22 wrote:Hm, right now there is no error handeling since I will switch to the built in function when it works for sonos.
So yes, if the Sonos would go down today you will get one error for each try. (this means 2 or 3 errors per polling intervall).
That sounds good, I can't wait... Just had such a small hiccup again, and this is what's in the log for one missed update on just two players:

Code: Select all

017-02-03 13:49:40.262 Error: (Sonos Laura) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:42.869 Error: (Sonos studeerkamer) 'onHeartbeat' failed 'ConnectionRefusedError'.
2017-02-03 13:49:42.869 Error: (Sonos studeerkamer) ----> Line 188 in /home/pi/domoticz/plugins/Sonos/plugin.py, function onHeartbeat
2017-02-03 13:49:42.869 Error: (Sonos studeerkamer) ----> Line 211 in /home/pi/domoticz/plugins/Sonos/plugin.py, function sendMessage
2017-02-03 13:49:42.869 Error: (Sonos studeerkamer) ----> Line 1083 in /usr/local/lib/python3.5/http/client.py, function request
2017-02-03 13:49:42.869 Error: (Sonos studeerkamer) ----> Line 1128 in /usr/local/lib/python3.5/http/client.py, function _send_request
2017-02-03 13:49:42.869 Error: (Sonos studeerkamer) ----> Line 1079 in /usr/local/lib/python3.5/http/client.py, function endheaders
2017-02-03 13:49:42.869 Error: (Sonos studeerkamer) ----> Line 911 in /usr/local/lib/python3.5/http/client.py, function _send_output
2017-02-03 13:49:42.870 Error: (Sonos studeerkamer) ----> Line 854 in /usr/local/lib/python3.5/http/client.py, function send
2017-02-03 13:49:42.870 Error: (Sonos studeerkamer) ----> Line 826 in /usr/local/lib/python3.5/http/client.py, function connect
2017-02-03 13:49:42.870 Error: (Sonos studeerkamer) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:42.870 Error: (Sonos studeerkamer) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:42.962 Error: (Sonos Laura) 'onHeartbeat' failed 'ConnectionRefusedError'.
2017-02-03 13:49:42.964 Error: (Sonos Laura) ----> Line 188 in /home/pi/domoticz/plugins/Sonos/plugin.py, function onHeartbeat
2017-02-03 13:49:42.966 Error: (Sonos Laura) ----> Line 211 in /home/pi/domoticz/plugins/Sonos/plugin.py, function sendMessage
2017-02-03 13:49:42.968 Error: (Sonos Laura) ----> Line 1083 in /usr/local/lib/python3.5/http/client.py, function request
2017-02-03 13:49:42.970 Error: (Sonos Laura) ----> Line 1128 in /usr/local/lib/python3.5/http/client.py, function _send_request
2017-02-03 13:49:42.970 Error: (Sonos Laura) ----> Line 1079 in /usr/local/lib/python3.5/http/client.py, function endheaders
2017-02-03 13:49:42.972 Error: (Sonos Laura) ----> Line 911 in /usr/local/lib/python3.5/http/client.py, function _send_output
2017-02-03 13:49:42.972 Error: (Sonos Laura) ----> Line 854 in /usr/local/lib/python3.5/http/client.py, function send
2017-02-03 13:49:42.972 Error: (Sonos Laura) ----> Line 826 in /usr/local/lib/python3.5/http/client.py, function connect
2017-02-03 13:49:42.972 Error: (Sonos Laura) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:42.972 Error: (Sonos Laura) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:42.996 Error: (Sonos studeerkamer) 'onHeartbeat' failed 'ConnectionRefusedError'.
2017-02-03 13:49:42.998 Error: (Sonos studeerkamer) ----> Line 188 in /home/pi/domoticz/plugins/Sonos/plugin.py, function onHeartbeat
2017-02-03 13:49:43.000 Error: (Sonos studeerkamer) ----> Line 211 in /home/pi/domoticz/plugins/Sonos/plugin.py, function sendMessage
2017-02-03 13:49:43.002 Error: (Sonos studeerkamer) ----> Line 1083 in /usr/local/lib/python3.5/http/client.py, function request
2017-02-03 13:49:43.004 Error: (Sonos studeerkamer) ----> Line 1128 in /usr/local/lib/python3.5/http/client.py, function _send_request
2017-02-03 13:49:43.004 Error: (Sonos studeerkamer) ----> Line 1079 in /usr/local/lib/python3.5/http/client.py, function endheaders
2017-02-03 13:49:43.004 Error: (Sonos studeerkamer) ----> Line 911 in /usr/local/lib/python3.5/http/client.py, function _send_output
2017-02-03 13:49:43.004 Error: (Sonos studeerkamer) ----> Line 854 in /usr/local/lib/python3.5/http/client.py, function send
2017-02-03 13:49:43.004 Error: (Sonos studeerkamer) ----> Line 826 in /usr/local/lib/python3.5/http/client.py, function connect
2017-02-03 13:49:43.004 Error: (Sonos studeerkamer) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:43.004 Error: (Sonos studeerkamer) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:43.057 Error: (Sonos Laura) 'onHeartbeat' failed 'ConnectionRefusedError'.
2017-02-03 13:49:43.060 Error: (Sonos Laura) ----> Line 188 in /home/pi/domoticz/plugins/Sonos/plugin.py, function onHeartbeat
2017-02-03 13:49:43.062 Error: (Sonos Laura) ----> Line 211 in /home/pi/domoticz/plugins/Sonos/plugin.py, function sendMessage
2017-02-03 13:49:43.063 Error: (Sonos Laura) ----> Line 1083 in /usr/local/lib/python3.5/http/client.py, function request
2017-02-03 13:49:43.065 Error: (Sonos Laura) ----> Line 1128 in /usr/local/lib/python3.5/http/client.py, function _send_request
2017-02-03 13:49:43.065 Error: (Sonos Laura) ----> Line 1079 in /usr/local/lib/python3.5/http/client.py, function endheaders
2017-02-03 13:49:43.065 Error: (Sonos Laura) ----> Line 911 in /usr/local/lib/python3.5/http/client.py, function _send_output
2017-02-03 13:49:43.065 Error: (Sonos Laura) ----> Line 854 in /usr/local/lib/python3.5/http/client.py, function send
2017-02-03 13:49:43.065 Error: (Sonos Laura) ----> Line 826 in /usr/local/lib/python3.5/http/client.py, function connect
2017-02-03 13:49:43.066 Error: (Sonos Laura) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:43.066 Error: (Sonos Laura) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:43.090 Error: (Sonos studeerkamer) 'onHeartbeat' failed 'ConnectionRefusedError'.
2017-02-03 13:49:43.092 Error: (Sonos studeerkamer) ----> Line 188 in /home/pi/domoticz/plugins/Sonos/plugin.py, function onHeartbeat
2017-02-03 13:49:43.094 Error: (Sonos studeerkamer) ----> Line 211 in /home/pi/domoticz/plugins/Sonos/plugin.py, function sendMessage
2017-02-03 13:49:43.096 Error: (Sonos studeerkamer) ----> Line 1083 in /usr/local/lib/python3.5/http/client.py, function request
2017-02-03 13:49:43.098 Error: (Sonos studeerkamer) ----> Line 1128 in /usr/local/lib/python3.5/http/client.py, function _send_request
2017-02-03 13:49:43.098 Error: (Sonos studeerkamer) ----> Line 1079 in /usr/local/lib/python3.5/http/client.py, function endheaders
2017-02-03 13:49:43.098 Error: (Sonos studeerkamer) ----> Line 911 in /usr/local/lib/python3.5/http/client.py, function _send_output
2017-02-03 13:49:43.098 Error: (Sonos studeerkamer) ----> Line 854 in /usr/local/lib/python3.5/http/client.py, function send
2017-02-03 13:49:43.098 Error: (Sonos studeerkamer) ----> Line 826 in /usr/local/lib/python3.5/http/client.py, function connect
2017-02-03 13:49:43.098 Error: (Sonos studeerkamer) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:43.098 Error: (Sonos studeerkamer) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:43.144 Error: (Sonos Laura) 'onHeartbeat' failed 'ConnectionRefusedError'.
2017-02-03 13:49:43.146 Error: (Sonos Laura) ----> Line 188 in /home/pi/domoticz/plugins/Sonos/plugin.py, function onHeartbeat
2017-02-03 13:49:43.148 Error: (Sonos Laura) ----> Line 211 in /home/pi/domoticz/plugins/Sonos/plugin.py, function sendMessage
2017-02-03 13:49:43.149 Error: (Sonos Laura) ----> Line 1083 in /usr/local/lib/python3.5/http/client.py, function request
2017-02-03 13:49:43.152 Error: (Sonos Laura) ----> Line 1128 in /usr/local/lib/python3.5/http/client.py, function _send_request
2017-02-03 13:49:43.152 Error: (Sonos Laura) ----> Line 1079 in /usr/local/lib/python3.5/http/client.py, function endheaders
2017-02-03 13:49:43.152 Error: (Sonos Laura) ----> Line 911 in /usr/local/lib/python3.5/http/client.py, function _send_output
2017-02-03 13:49:43.152 Error: (Sonos Laura) ----> Line 854 in /usr/local/lib/python3.5/http/client.py, function send
2017-02-03 13:49:43.152 Error: (Sonos Laura) ----> Line 826 in /usr/local/lib/python3.5/http/client.py, function connect
2017-02-03 13:49:43.152 Error: (Sonos Laura) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:43.152 Error: (Sonos Laura) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:43.177 Error: (Sonos studeerkamer) 'onHeartbeat' failed 'ConnectionRefusedError'.
2017-02-03 13:49:43.179 Error: (Sonos studeerkamer) ----> Line 188 in /home/pi/domoticz/plugins/Sonos/plugin.py, function onHeartbeat
2017-02-03 13:49:43.182 Error: (Sonos studeerkamer) ----> Line 211 in /home/pi/domoticz/plugins/Sonos/plugin.py, function sendMessage
2017-02-03 13:49:43.184 Error: (Sonos studeerkamer) ----> Line 1083 in /usr/local/lib/python3.5/http/client.py, function request
2017-02-03 13:49:43.186 Error: (Sonos studeerkamer) ----> Line 1128 in /usr/local/lib/python3.5/http/client.py, function _send_request
2017-02-03 13:49:43.186 Error: (Sonos studeerkamer) ----> Line 1079 in /usr/local/lib/python3.5/http/client.py, function endheaders
2017-02-03 13:49:43.186 Error: (Sonos studeerkamer) ----> Line 911 in /usr/local/lib/python3.5/http/client.py, function _send_output
2017-02-03 13:49:43.186 Error: (Sonos studeerkamer) ----> Line 854 in /usr/local/lib/python3.5/http/client.py, function send
2017-02-03 13:49:43.186 Error: (Sonos studeerkamer) ----> Line 826 in /usr/local/lib/python3.5/http/client.py, function connect
2017-02-03 13:49:43.186 Error: (Sonos studeerkamer) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:43.186 Error: (Sonos studeerkamer) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:43.234 Error: (Sonos Laura) 'onHeartbeat' failed 'ConnectionRefusedError'.
2017-02-03 13:49:43.236 Error: (Sonos Laura) ----> Line 188 in /home/pi/domoticz/plugins/Sonos/plugin.py, function onHeartbeat
2017-02-03 13:49:43.238 Error: (Sonos Laura) ----> Line 211 in /home/pi/domoticz/plugins/Sonos/plugin.py, function sendMessage
2017-02-03 13:49:43.240 Error: (Sonos Laura) ----> Line 1083 in /usr/local/lib/python3.5/http/client.py, function request
2017-02-03 13:49:43.242 Error: (Sonos Laura) ----> Line 1128 in /usr/local/lib/python3.5/http/client.py, function _send_request
2017-02-03 13:49:43.242 Error: (Sonos Laura) ----> Line 1079 in /usr/local/lib/python3.5/http/client.py, function endheaders
2017-02-03 13:49:43.242 Error: (Sonos Laura) ----> Line 911 in /usr/local/lib/python3.5/http/client.py, function _send_output
2017-02-03 13:49:43.242 Error: (Sonos Laura) ----> Line 854 in /usr/local/lib/python3.5/http/client.py, function send
2017-02-03 13:49:43.242 Error: (Sonos Laura) ----> Line 826 in /usr/local/lib/python3.5/http/client.py, function connect
2017-02-03 13:49:43.242 Error: (Sonos Laura) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:43.242 Error: (Sonos Laura) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:43.268 Error: (Sonos studeerkamer) 'onHeartbeat' failed 'ConnectionRefusedError'.
2017-02-03 13:49:43.270 Error: (Sonos studeerkamer) ----> Line 188 in /home/pi/domoticz/plugins/Sonos/plugin.py, function onHeartbeat
2017-02-03 13:49:43.272 Error: (Sonos studeerkamer) ----> Line 211 in /home/pi/domoticz/plugins/Sonos/plugin.py, function sendMessage
2017-02-03 13:49:43.274 Error: (Sonos studeerkamer) ----> Line 1083 in /usr/local/lib/python3.5/http/client.py, function request
2017-02-03 13:49:43.276 Error: (Sonos studeerkamer) ----> Line 1128 in /usr/local/lib/python3.5/http/client.py, function _send_request
2017-02-03 13:49:43.276 Error: (Sonos studeerkamer) ----> Line 1079 in /usr/local/lib/python3.5/http/client.py, function endheaders
2017-02-03 13:49:43.276 Error: (Sonos studeerkamer) ----> Line 911 in /usr/local/lib/python3.5/http/client.py, function _send_output
2017-02-03 13:49:43.276 Error: (Sonos studeerkamer) ----> Line 854 in /usr/local/lib/python3.5/http/client.py, function send
2017-02-03 13:49:43.276 Error: (Sonos studeerkamer) ----> Line 826 in /usr/local/lib/python3.5/http/client.py, function connect
2017-02-03 13:49:43.277 Error: (Sonos studeerkamer) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
2017-02-03 13:49:43.277 Error: (Sonos studeerkamer) ----> Line 707 in /usr/local/lib/python3.5/socket.py, function create_connection
Yes, looks like network problems.
But there is so much logging that it seems like you have debug set to true under hardware settings.
Disable it to reduce the logging.

Re: Python plugin: Sonos

Posted: Friday 03 February 2017 16:01
by mvzut
tester22 wrote:Yes, looks like network problems.
But there is so much logging that it seems like you have debug set to true under hardware settings.
Disable it to reduce the logging.
That's what I thought too, but I can assure you its not!

Re: Python plugin: Sonos

Posted: Friday 03 February 2017 16:24
by bran2000
sorry when i run the script, i have this error any idea how i can fix this :

pi@DomoticzSam ~/domoticz/scripts/Sonos $ ./plugin.py
./plugin.py: ligne8: $'\n<plugin key=Sonos name=Sonos' : commande introuvable
./plugin.py: ligne25: import : commande introuvable
./plugin.py: ligne26: import : commande introuvable
./plugin.py: ligne27: import : commande introuvable
./plugin.py: ligne30: playerState : commande introuvable
./plugin.py: ligne31: mediaLevel : commande introuvable
./plugin.py: ligne32: mediaDescription : commande introuvable
./plugin.py: ligne33: muted : commande introuvable
./plugin.py: ligne34: creator : commande introuvable
./plugin.py: ligne35: title : commande introuvable
./plugin.py: ligne38: Erreur de syntaxe près du symbole inattendu « ( »
./plugin.py: ligne38: `def onStart():'

thanks

Re: Python plugin: Sonos

Posted: Friday 03 February 2017 17:29
by tester22
mvzut wrote:
tester22 wrote:Yes, looks like network problems.
But there is so much logging that it seems like you have debug set to true under hardware settings.
Disable it to reduce the logging.
That's what I thought too, but I can assure you its not!
Added an quick fix for this in the latest commit: https://github.com/tester22/Domoticz-Sonos

Re: Python plugin: Sonos

Posted: Friday 03 February 2017 17:29
by tester22
bran2000 wrote:sorry when i run the script, i have this error any idea how i can fix this :

pi@DomoticzSam ~/domoticz/scripts/Sonos $ ./plugin.py
./plugin.py: ligne8: $'\n<plugin key=Sonos name=Sonos' : commande introuvable
./plugin.py: ligne25: import : commande introuvable
./plugin.py: ligne26: import : commande introuvable
./plugin.py: ligne27: import : commande introuvable
./plugin.py: ligne30: playerState : commande introuvable
./plugin.py: ligne31: mediaLevel : commande introuvable
./plugin.py: ligne32: mediaDescription : commande introuvable
./plugin.py: ligne33: muted : commande introuvable
./plugin.py: ligne34: creator : commande introuvable
./plugin.py: ligne35: title : commande introuvable
./plugin.py: ligne38: Erreur de syntaxe près du symbole inattendu « ( »
./plugin.py: ligne38: `def onStart():'

thanks

You should read this: http://www.domoticz.com/forum/viewtopic ... 65&t=15233

Re: Python plugin: Sonos

Posted: Friday 03 February 2017 17:49
by bran2000
i read it and i created a separated folder into the script folder :
domoticz/plugins/Sonos
do you think that's my problem ?

Python plugin: Sonos

Posted: Friday 03 February 2017 18:10
by mvzut
Dnpwwo wrote:@mvzut,

Battery and Signal level functionality was introduced in the last beta and it had an issue. I've submitted a fix tonight but once you take that beta you will need to delete and recreate the affacted devices to clear the low battery status.

Should be alright after that.
I just installed your latest script version from github, and reinstalled all the players devices, but I still get the battery problem. Our do I need to update Domoticz too?

Re: Python plugin: Sonos

Posted: Friday 03 February 2017 18:53
by G3rard
The beta from Dnpwwo is indeed the new Domoticz beta, so you have to update Domoticz too.

Re: Python plugin: Sonos

Posted: Friday 03 February 2017 21:01
by mvzut
G3rard wrote:The beta from Dnpwwo is indeed the new Domoticz beta, so you have to update Domoticz too.
Did that, and recreated all my Sonos devices again. All of them still get (zero) signal strengths and battery levels. Is that the intended behaviour?

Re: Python plugin: Sonos

Posted: Friday 03 February 2017 22:29
by Dnpwwo
@mvzut,

That's not the intended behaviour at all.

I was a bit surprised you still had the problem until I realised I had missed the main file from the pull request :oops: I've created a new pull request and once that gets added to the beta you will need to remove and re-add them again and it should work.

Re: Python plugin: Sonos

Posted: Saturday 04 February 2017 7:31
by bran2000
bran2000 wrote:i read it and i created a separated folder into the script folder :
domoticz/plugins/Sonos
do you think that's my problem ?
Any idea about my problem ?

Re: Python plugin: Sonos

Posted: Saturday 04 February 2017 13:13
by mvzut
Dnpwwo wrote:@mvzut,

That's not the intended behaviour at all.

I was a bit surprised you still had the problem until I realised I had missed the main file from the pull request :oops: I've created a new pull request and once that gets added to the beta you will need to remove and re-add them again and it should work.
Ok, works now, thanks!

Re: Python plugin: Sonos

Posted: Saturday 04 February 2017 15:15
by mvzut
bran2000 wrote:
bran2000 wrote:i read it and i created a separated folder into the script folder :
domoticz/plugins/Sonos
do you think that's my problem ?
Any idea about my problem ?
I have it in the same folder, so that can't be the problem I guess.

Re: Python plugin: Sonos

Posted: Monday 06 February 2017 17:08
by mvzut
tester22 wrote:
mvzut wrote:
tester22 wrote:Yes, looks like network problems.
But there is so much logging that it seems like you have debug set to true under hardware settings.
Disable it to reduce the logging.
That's what I thought too, but I can assure you its not!
Added an quick fix for this in the latest commit: https://github.com/tester22/Domoticz-Sonos
Haven't had any connection error in the log since the new version, already running super stable for almost three days now. Thanks!

Re: Python plugin: Sonos

Posted: Thursday 16 February 2017 17:34
by DomoRies
Nice plugin, but what do you need to fill in at ip-adres in Domoticz? Now it's for default 127.0.0.1

Re: Python plugin: Sonos

Posted: Thursday 16 February 2017 22:38
by mvzut
DomoRies wrote:Nice plugin, but what do you need to fill in at ip-adres in Domoticz? Now it's for default 127.0.0.1
You must fill in the IP address of the Sonos player you want to add. Easiest way to find this is via the Sonos app, under Settings > About my Sonos System.