Re: Python plugin: Sonos
Posted: Sunday 11 June 2017 22:44
by mvzut
bdormael wrote:G3rard wrote:There were some huge changes in the Python framework in the last beta releases. I believe the plugins are currently not working in the latest version, but I guess it will be fixed soon.
Any chance on an update so it works again with the newest beta of Domoticz ?
Yes that would be great! I am using the plugin to swithc my receiver, and this stopped working after the recent updates.\
I have been looking into the code myself a bit. I'm not an experienced programmer, but I think I understand just enough to see that the connection part has to be rewritten. It is now using a custom sendMessage function, which uses a http.client.HTTPConnection method to connect to the Sonos players. This should probably be changed into something like
Code: Select all
self.SonosConn = Domoticz.Connection(Name="Sonos", Transport="TCP/IP", Protocol="JSON", Address=Parameters["Address"])
self.SonosConn.connect()
self.SonosConn.Send(...)
When I have time I may give it a go, but success not guaranteed.
Tester 22, are you still using the plugin yourself? Would you consider making rhe necessary changes?
Re: Python plugin: Sonos
Posted: Friday 23 June 2017 15:11
by rathmannm
Hi,
I am still having an issue with the plugin which prevents Domoticz from startin. I am running the latest beta 3.8005 and updated the Sonos plugin from Github but this is what I get in the log:
2017-06-23 13:23:10.912 Error: Domoticz received fatal signal 11 !...
2017-06-23 13:23:10.913 Error: Domoticz received fatal signal 11 while backtracing !...
....
2017-06-23 13:23:10.920 Error: /home/pi/domoticz/domoticz() [0x1ccd84]
2017-06-23 13:23:10.920 Error: /home/pi/domoticz/domoticz(_Z14signal_handleri+0x58) [0x1cce3c]
2017-06-23 13:23:10.920 Error: /lib/arm-linux-gnueabihf/libc.so.6(__default_sa_restorer_v2+0) [0x76a8f180]
Any idea on how to rectify this or do I have to wait for the plugin to be updated?
Cheers,
Manuel
Re: Python plugin: Sonos
Posted: Saturday 24 June 2017 11:19
by rathmannm
Hi,
thanks for getting back to me. I've checked the folder and there are no scripts ending with *.demo.py. Here is the full log:
2017-06-24 08:44:23.763 Incoming connection from: 192.168.0.2
2017-06-24 08:44:25.694 EventSystem: reset all events...
2017-06-24 08:44:25.695 EventSystem: reset all device statuses...
2017-06-24 08:44:25.842 Python EventSystem: Module not found - Trying to initialize.
2017-06-24 08:44:25.844 Python EventSystem: Initalizing event module.
2017-06-24 08:44:25.845 EventSystem: Started
2017-06-24 08:44:26.183 PluginSystem: Entering work loop.
2017-06-24 08:44:26.194 OpenZWave: using config in: /home/pi/domoticz/Config/
2017-06-24 08:44:26.210 OpenZWave: Starting...
2017-06-24 08:44:26.211 OpenZWave: Version: 1.4-2501-g5af6780-dirty
2017-06-24 08:44:26.347 Error: (Sonos) failed to load 'plugin.py', Python Path used was ':/usr/lib/python3.4/:/usr/lib/python3.4/plat-arm-linux-gnueabihf:/usr/lib/python3.4/lib-dynload'.
2017-06-24 08:44:26.347 Error: (Sonos Livingroom) Module Import failed, exception: 'ImportError'
2017-06-24 08:44:26.348 Error: (Sonos Livingroom) Module Import failed: ' Name: plugin'
2017-06-24 08:44:26.510 OpenZWave: Driver Ready
2017-06-24 08:44:26.525 Error: (Sonos) failed to load 'plugin.py', Python Path used was ':/usr/lib/python3.4/:/usr/lib/python3.4/plat-arm-linux-gnueabihf:/usr/lib/python3.4/lib-dynload'.
2017-06-24 08:44:26.526 Error: (Sonos Kitchen) Module Import failed, exception: 'ImportError'
2017-06-24 08:44:26.526 Error: (Sonos Kitchen) Module Import failed: ' Name: plugin'
2017-06-24 08:44:26.528 OpenZWave: Value_Added: Node: 2 (0x02), CommandClass: SWITCH BINARY, Label: Switch, Instance: 1
2017-06-24 08:44:26.530 OpenZWave: Value_Added: Node: 2 (0x02), CommandClass: SWITCH MULTILEVEL, Label: Level, Instance: 1
2017-06-24 08:44:26.531 OpenZWave: Value_Added: Node: 2 (0x02), CommandClass: SWITCH MULTILEVEL, Label: Bright, Instance: 1
2017-06-24 08:44:26.531 OpenZWave: Value_Added: Node: 2 (0x02), CommandClass: SWITCH MULTILEVEL, Label: Dim, Instance: 1
2017-06-24 08:44:26.532 OpenZWave: Value_Added: Node: 2 (0x02), CommandClass: METER, Label: Energy, Instance: 1
2017-06-24 08:44:26.532 OpenZWave: Value_Added: Node: 2 (0x02), CommandClass: METER, Label: Power, Instance: 1
2017-06-24 08:44:26.532 OpenZWave: Value_Added: Node: 2 (0x02), CommandClass: METER, Label: Voltage, Instance: 1
2017-06-24 08:44:26.533 OpenZWave: Value_Added: Node: 2 (0x02), CommandClass: METER, Label: Current, Instance: 1
2017-06-24 08:44:26.533 OpenZWave: Value_Added: Node: 2 (0x02), CommandClass: COLOR, Label: Color, Instance: 1
2017-06-24 08:44:26.535 OpenZWave: Value_Added: Node: 2 (0x02), CommandClass: COLOR, Label: Color Index, Instance: 1
2017-06-24 08:44:26.536 OpenZWave: Value_Added: Node: 2 (0x02), CommandClass: CLOCK, Label: Day, Instance: 1
2017-06-24 08:44:26.536 OpenZWave: Value_Added: Node: 2 (0x02), CommandClass: CLOCK, Label: Hour, Instance: 1
2017-06-24 08:44:26.537 OpenZWave: Value_Added: Node: 2 (0x02), CommandClass: CLOCK, Label: Minute, Instance: 1
2017-06-24 08:44:26.537 OpenZWave: NodeID: 2 (0x02), Thermostat Clock: Friday 02:50
2017-06-24 08:44:26.539 (Aeontec Zwave USB) General/Thermostat Clock (Thermostat Clock)
2017-06-24 08:44:26.541 OpenZWave: Value_Added: Node: 3 (0x03), CommandClass: METER, Label: Energy, Instance: 1
2017-06-24 08:44:26.542 OpenZWave: Value_Added: Node: 3 (0x03), CommandClass: BATTERY, Label: Battery Level, Instance: 1
2017-06-24 08:44:26.544 OpenZWave: Value_Added: Node: 4 (0x04), CommandClass: SWITCH MULTILEVEL, Label: Level, Instance: 1
2017-06-24 08:44:26.546 OpenZWave: Value_Added: Node: 4 (0x04), CommandClass: SWITCH MULTILEVEL, Label: Bright, Instance: 1
2017-06-24 08:44:26.546 OpenZWave: Value_Added: Node: 4 (0x04), CommandClass: SWITCH MULTILEVEL, Label: Dim, Instance: 1
2017-06-24 08:44:26.549 OpenZWave: Value_Added: Node: 5 (0x05), CommandClass: SENSOR BINARY, Label: Sensor, Instance: 0
2017-06-24 08:44:26.550 OpenZWave: Value_Added: Node: 5 (0x05), CommandClass: SENSOR MULTILEVEL, Label: Temperature, Instance: 1
2017-06-24 08:44:26.550 OpenZWave: Value_Added: Node: 5 (0x05), CommandClass: SENSOR MULTILEVEL, Label: General, Instance: 2
2017-06-24 08:44:26.551 OpenZWave: Value_Added: Node: 5 (0x05), CommandClass: SENSOR MULTILEVEL, Label: Luminance, Instance: 3
2017-06-24 08:44:26.551 OpenZWave: Value_Added: Node: 5 (0x05), CommandClass: SENSOR MULTILEVEL, Label: Direction, Instance: 7
2017-06-24 08:44:26.552 OpenZWave: Value_Added: Unhandled Label: Direction, Unit:
2017-06-24 08:44:26.552 OpenZWave: Value_Added: Node: 5 (0x05), CommandClass: SENSOR MULTILEVEL, Label: Tank Capacity, Instance: 19
2017-06-24 08:44:26.553 OpenZWave: Value_Added: Node: 5 (0x05), CommandClass: BATTERY, Label: Battery Level, Instance: 1
2017-06-24 08:44:26.554 OpenZWave: Value_Added: Node: 5 (0x05), CommandClass: SENSOR ALARM, Label: General, Instance: 1
2017-06-24 08:44:26.556 OpenZWave: Value_Added: Node: 9 (0x09), CommandClass: SWITCH BINARY, Label: Switch, Instance: 1
2017-06-24 08:44:26.559 OpenZWave: Value_Added: Node: 10 (0x0a), CommandClass: SWITCH MULTILEVEL, Label: Level, Instance: 1
2017-06-24 08:44:26.560 OpenZWave: Value_Added: Node: 10 (0x0a), CommandClass: SWITCH MULTILEVEL, Label: Bright, Instance: 1
2017-06-24 08:44:26.560 OpenZWave: Value_Added: Node: 10 (0x0a), CommandClass: SWITCH MULTILEVEL, Label: Dim, Instance: 1
2017-06-24 08:44:26.563 OpenZWave: Value_Added: Node: 11 (0x0b), CommandClass: SWITCH MULTILEVEL, Label: Level, Instance: 1
2017-06-24 08:44:26.564 OpenZWave: Value_Added: Node: 11 (0x0b), CommandClass: SWITCH MULTILEVEL, Label: Bright, Instance: 1
2017-06-24 08:44:26.565 OpenZWave: Value_Added: Node: 11 (0x0b), CommandClass: SWITCH MULTILEVEL, Label: Dim, Instance: 1
2017-06-24 08:44:26.565 OpenZWave: Value_Added: Node: 11 (0x0b), CommandClass: INDICATOR, Label: Indicator, Instance: 1
2017-06-24 08:44:26.565 OpenZWave: Unhandled class: 0x87 (INDICATOR), NodeID: 11 (0x0b), Index: 0, Instance: 1
2017-06-24 08:44:26.567 OpenZWave: Value_Added: Node: 12 (0x0c), CommandClass: SENSOR BINARY, Label: Sensor, Instance: 0
2017-06-24 08:44:26.568 OpenZWave: Value_Added: Node: 12 (0x0c), CommandClass: BATTERY, Label: Battery Level, Instance: 1
2017-06-24 08:44:26.570 OpenZWave: Value_Added: Node: 13 (0x0d), CommandClass: SWITCH BINARY, Label: Switch, Instance: 1
2017-06-24 08:44:26.571 OpenZWave: Value_Added: Node: 13 (0x0d), CommandClass: SENSOR MULTILEVEL, Label: Temperature, Instance: 1
2017-06-24 08:44:26.571 OpenZWave: Value_Added: Node: 13 (0x0d), CommandClass: SENSOR MULTILEVEL, Label: Luminance, Instance: 3
2017-06-24 08:44:26.572 OpenZWave: Value_Added: Node: 13 (0x0d), CommandClass: SENSOR MULTILEVEL, Label: Dew Point, Instance: 11
2017-06-24 08:44:26.572 OpenZWave: Value_Added: Node: 13 (0x0d), CommandClass: THERMOSTAT MODE, Label: Mode, Instance: 1
2017-06-24 08:44:26.575 OpenZWave: Value_Added: Node: 13 (0x0d), CommandClass: THERMOSTAT SETPOINT, Label: Heating 1, Instance: 1
2017-06-24 08:44:26.576 OpenZWave: Value_Added: Node: 13 (0x0d), CommandClass: BATTERY, Label: Battery Level, Instance: 1
2017-06-24 08:44:26.579 Error: Domoticz received fatal signal 11 !...
2017-06-24 08:44:26.579 Error: Domoticz received fatal signal 11 while backtracing !...
2017-06-24 08:44:26.580 OpenZWave: Value_Added: Node: 14 (0x0e), CommandClass: SENSOR BINARY, Label: Sensor, Instance: 0
2017-06-24 08:44:26.581 OpenZWave: Value_Added: Node: 14 (0x0e), CommandClass: SENSOR BINARY, Label: Sensor, Instance: 2
2017-06-24 08:44:26.582 OpenZWave: Value_Added: Node: 14 (0x0e), CommandClass: SENSOR BINARY, Label: Sensor, Instance: 3
2017-06-24 08:44:26.582 OpenZWave: Value_Added: Node: 14 (0x0e), CommandClass: SENSOR BINARY, Label: Sensor, Instance: 4
2017-06-24 08:44:26.583 OpenZWave: Value_Added: Node: 14 (0x0e), CommandClass: SENSOR BINARY, Label: Sensor, Instance: 5
2017-06-24 08:44:26.586 Error: /home/pi/domoticz/domoticz() [0x1ccd84]
2017-06-24 08:44:26.586 Error: /home/pi/domoticz/domoticz(_Z14signal_handleri+0x58) [0x1cce3c]
2017-06-24 08:44:26.586 Error: /lib/arm-linux-gnueabihf/libc.so.6(__default_sa_restorer_v2+0) [0x76a6a180]
Cheers,
Manuel