Smanar / Domoticz-deCONZ

deCONZ plugin for Domoticz (Zigbee application)
GNU General Public License v3.0
36 stars 26 forks source link

after deconz update to .78 errors occur #59

Closed salopette closed 4 years ago

salopette commented 4 years ago

Hi, I updated Deconz to the last beta .78 today, now there are errors in the log all the time. Do you know what's going on?

https://pastebin.com/zekqVif2

Smanar commented 4 years ago

Yep, it seem there is a new field in websocket. I m getting more information ATM.

Waiting for final decision, If you are bored with error message, I have updated the beta to skip theses messages.

Smanar commented 4 years ago

Ok so It's that. It's something definitive, and I think we can do usefull thing with it.

But for the moment the only way to avoid them (the plugin works fine with theses errors) is using the beta.

salopette commented 4 years ago

hi, i switched back to .77 for the time being, i will try again tonight!

salopette commented 4 years ago

2020-06-21 21:04:46.859 (deconz) Double UniqueID correction : 92 > 1 2020-06-21 21:04:46.859 Error: (deconz) Missing device > 1 (lights)

2020-06-21 21:24:35.327 (deconz) onMessage called 2020-06-21 21:24:35.328 (deconz) ### WebSocket Data : {'attr': {'lastannounced': None, 'lastseen': '2020-06-21T19:24:35Z', 'manufacturername': 'dresden elektronik', 'modelid': 'ConBee II', 'name': 'Configuration tool 92', 'swversion': '0x264a0700', 'type': 'Configuration tool', 'uniqueid': '00:21:2e:ff:ff:04:08:01-01'}, 'e': 'changed', 'id': '92', 'r': 'lights', 't': 'event', 'uniqueid': '00:21:2e:ff:ff:04:08:01-01'} 2020-06-21 21:24:35.328 (deconz) Double UniqueID correction : 92 > 1 2020-06-21 21:24:35.329 Error: (deconz) Missing device > 1 (lights) 2020-06-21 21:24:38.785 (deconz) onMessage called 2020-06-21 21:24:38.785 (deconz) ### WebSocket Data : {'e': 'changed', 'id': '46', 'r': 'sensors', 'state': {'dark': False, 'daylight': True, 'lastupdated': '2020-06-21T19:24:38.738', 'lightlevel': 22587, 'lux': 181}, 't': 'event', 'uniqueid': '00:17:88:01:06:45:70:67-02-0400'} 2020-06-21 21:24:38.787 (deconz) ### Update device (deconz - BWM Eingang) : {'nValue': 0, 'sValue': '181'} 2020-06-21 21:24:39.174 EventSystem: Event triggered: Keller Licht_2 2020-06-21 21:24:41.700 (Schlafzimmer-LED) Updating effects 2020-06-21 21:24:41.739 (Schlafzimmer-LED) Updating palettes 2020-06-21 21:24:42.171 (LED) Updating effects 2020-06-21 21:24:42.211 (LED) Updating palettes 2020-06-21 21:24:42.294 (deconz) onMessage called 2020-06-21 21:24:42.294 (deconz) ### WebSocket Data : {'e': 'changed', 'id': '1', 'r': 'sensors', 'state': {'dark': False, 'daylight': False, 'lastupdated': '2020-06-21T19:24:42.279', 'status': 180, 'sunrise': '2020-06-21T02:51:42', 'sunset': '2020-06-21T19:54:33'}, 't': 'event', 'uniqueid': '00:21:2e:ff:ff:04:08:01-01'} 2020-06-21 21:24:42.295 (deconz) Double UniqueID correction : 1 > 1 2020-06-21 21:24:42.295 (deconz) Send Command /api/097DEDA817/sensors/1 with None (0 in buffer) 2020-06-21 21:24:42.295 (deconz) Making Request : http://192.168.178.71:80/api/097DEDA817/sensors/1 with params None 2020-06-21 21:24:42.307 (deconz) Request Return : {"config":{"configured":true,"on":true,"sunriseoffset":30,"sunsetoffset":-30},"etag":"ca77254657c95565685a791d470179df","manufacturername":"Philips","modelid":"PHDL00","name":"Daylight","state":{"dark":false,"daylight":false,"lastupdated":"2020-06-21T19:24:42.279","status":180,"sunrise":"2020-06-21T02:51:42","sunset":"2020-06-21T19:54:33"},"swversion":"1.0","type":"Daylight","uniqueid":"00:21:2e:ff:ff:04:08:01-01"} 2020-06-21 21:24:42.308 (deconz) Classic Data : {'config': {'configured': True, 'on': True, 'sunriseoffset': 30, 'sunsetoffset': -30}, 'etag': 'ca77254657c95565685a791d470179df', 'manufacturername': 'Philips', 'modelid': 'PHDL00', 'name': 'Daylight', 'state': {'dark': False, 'daylight': False, 'lastupdated': '2020-06-21T19:24:42.279', 'status': 180, 'sunrise': '2020-06-21T02:51:42', 'sunset': '2020-06-21T19:54:33'}, 'swversion': '1.0', 'type': 'Daylight', 'uniqueid': '00:21:2e:ff:ff:04:08:01-01'} 2020-06-21 21:24:42.308 (deconz) ### Device > 1 Name:Daylight Type:Daylight Details:{'dark': False, 'daylight': False, 'lastupdated': '2020-06-21T19:24:42.279', 'status': 180, 'sunrise': '2020-06-21T02:51:42', 'sunset': '2020-06-21T19:54:33'} and {'configured': True, 'on': True, 'sunriseoffset': 30, 'sunsetoffset': -30} 2020-06-21 21:24:42.308 (deconz) ### Update device (deconz - Daylight) : {'nValue': 0, 'sValue': 'Off'} 2020-06-21 21:24:42.308 Status: (deconz) Adding missing device :1 Type:Daylight 2020-06-21 21:24:42.295 Error: (deconz) Websocket error, unknow device > 1 (sensors) Asking for information 2020-06-21 21:24:44.584 (deconz) onHeartbeat called 2020-06-21 21:24:48.558 EventSystem: Event triggered: Keller Licht_1 2020-06-21 21:24:50.709 (deconz) onMessage called 2020-06-21 21:24:50.709 (deconz) ### WebSocket Data : {'attr': {'lastannounced': None, 'lastseen': '2020-06-21T19:24:50Z', 'manufacturername': 'dresden elektronik', 'modelid': 'ConBee II', 'name': 'Configuration tool 92', 'swversion': '0x264a0700', 'type': 'Configuration tool', 'uniqueid': '00:21:2e:ff:ff:04:08:01-01'}, 'e': 'changed', 'id': '92', 'r': 'lights', 't': 'event', 'uniqueid': '00:21:2e:ff:ff:04:08:01-01'} 2020-06-21 21:24:50.710 (deconz) Double UniqueID correction : 92 > 1 2020-06-21 21:24:50.710 (deconz) Send Command /api/097DEDA817/lights/1 with None (0 in buffer) 2020-06-21 21:24:50.710 (deconz) Making Request : http://192.168.178.71:80/api/097DEDA817/lights/1 with params None 2020-06-21 21:24:50.710 Error: (deconz) Websocket error, unknow device > 1 (lights) Asking for information 2020-06-21 21:24:50.777 Error: (deconz) Connexion problem (1) with Gateway : 404 2020-06-21 21:24:52.581 (deconz) onMessage called 2020-06-21 21:24:52.582 (deconz) ### WebSocket Data : {'attr': {'lastannounced': None, 'lastseen': '2020-06-21T19:24:52Z', 'manufacturername': 'SZ', 'modelid': 'Lamp_01', 'name': 'Gartenbrunnen', 'swversion': '20181107', 'type': 'On/Off light', 'uniqueid': '01:12:4b:00:1b:ae:6b:b7-0b'}, 'e': 'changed', 'id': '46', 'r': 'lights', 't': 'event', 'uniqueid': '01:12:4b:00:1b:ae:6b:b7-0b'} 2020-06-21 21:24:54.632 (deconz) onHeartbeat called 2020-06-21 21:24:54.883 (deconz) onMessage called 2020-06-21 21:24:54.883 (deconz) ### WebSocket Data : {'config': {'alert': 'none', 'battery': 100, 'ledindication': False, 'offset': 0, 'on': True, 'reachable': True, 'usertest': False}, 'e': 'changed', 'id': '107', 'r': 'sensors', 't': 'event', 'uniqueid': '00:17:88:01:08:64:1f:4d-02-0402'} 2020-06-21 21:24:54.885 (deconz) ### Update device (deconz - BWM Treppe-OG) : {'BatteryLevel': 100, 'nValue': 0, 'sValue': '24.61'}, IGNORED , no changes ! 2020-06-21 21:24:54.885 (deconz) onMessage called 2020-06-21 21:24:54.885 (deconz) ### WebSocket Data : {'config': {'alert': 'none', 'battery': 100, 'delay': 0, 'ledindication': False, 'on': True, 'reachable': True, 'sensitivity': 2, 'sensitivitymax': 2, 'usertest': False}, 'e': 'changed', 'id': '106', 'r': 'sensors', 't': 'event', 'uniqueid': '00:17:88:01:08:64:1f:4d-02-0406'} 2020-06-21 21:24:54.887 (deconz) ### Update device (deconz - BWM Treppe-OG) : {'BatteryLevel': 100, 'nValue': 0, 'sValue': 'Off'}, IGNORED , no changes ! 2020-06-21 21:24:54.887 (deconz) onMessage called 2020-06-21 21:24:54.887 (deconz) ### WebSocket Data : {'config': {'alert': 'none', 'battery': 100, 'ledindication': False, 'on': True, 'reachable': True, 'tholddark': 12000, 'tholdoffset': 7000, 'usertest': False}, 'e': 'changed', 'id': '108', 'r': 'sensors', 't': 'event', 'uniqueid': '00:17:88:01:08:64:1f:4d-02-0400'} 2020-06-21 21:24:54.888 (deconz) ### Update device (deconz - BWM Treppe-OG) : {'BatteryLevel': 100, 'nValue': 0, 'sValue': '0'}, IGNORED , no changes ! 2020-06-21 21:24:54.939 (deconz) onMessage called 2020-06-21 21:24:54.939 (deconz) ### WebSocket Data : {'e': 'changed', 'id': '107', 'r': 'sensors', 'state': {'lastupdated': '2020-06-21T19:24:54.879', 'temperature': 2447}, 't': 'event', 'uniqueid': '00:17:88:01:08:64:1f:4d-02-0402'} 2020-06-21 21:24:54.940 (deconz) ### Update device (deconz - BWM Treppe-OG) : {'nValue': 0, 'sValue': '24.47'} 2020-06-21 21:24:55.166 (deconz) onMessage called 2020-06-21 21:24:55.166 (deconz) ### WebSocket Data : {'attr': {'lastannounced': None, 'lastseen': '2020-06-21T19:24:55Z', 'manufacturername': 'IKEA of Sweden', 'modelid': 'TRADFRI bulb GU10 W 400lm', 'name': 'Treppe OG-1-6', 'swversion': '1.2.214', 'type': 'Dimmable light', 'uniqueid': '00:0b:57:ff:fe:c0:5f:ed-01'}, 'e': 'changed', 'id': '39', 'r': 'lights', 't': 'event', 'uniqueid': '00:0b:57:ff:fe:c0:5f:ed-01'} 2020-06-21 21:24:55.567 (deconz) onMessage called 2020-06-21 21:24:55.568 (deconz) ### WebSocket Data : {'attr': {'lastannounced': None, 'lastseen': '2020-06-21T19:24:55Z', 'manufacturername': 'IKEA of Sweden', 'modelid': 'TRADFRI bulb GU10 W 400lm', 'name': 'Treppe OG-1-3', 'swversion': '1.2.214', 'type': 'Dimmable light', 'uniqueid': '00:0d:6f:ff:fe:d2:92:d2-01'}, 'e': 'changed', 'id': '37', 'r': 'lights', 't': 'event', 'uniqueid': '00:0d:6f:ff:fe:d2:92:d2-01'} 2020-06-21 21:24:55.869 (deconz) onMessage called 2020-06-21 21:24:55.869 (deconz) ### WebSocket Data : {'attr': {'lastannounced': None, 'lastseen': '2020-06-21T19:24:55Z', 'manufacturername': 'SZ', 'modelid': 'Lamp_01', 'name': 'Spiegel', 'swversion': '20181107', 'type': 'On/Off light', 'uniqueid': '01:12:4b:00:1b:ae:7b:4f-0b'}, 'e': 'changed', 'id': '61', 'r': 'lights', 't': 'event', 'uniqueid': '01:12:4b:00:1b:ae:7b:4f-0b'} 2020-06-21 21:24:57.924 (deconz) onMessage called 2020-06-21 21:24:57.924 (deconz) ### WebSocket Data : {'attr': {'lastannounced': None, 'lastseen': '2020-06-21T19:24:57Z', 'manufacturername': 'FeiBit', 'modelid': 'FNB56-ZSW01LX2.0', 'name': 'Vali-Bad', 'swversion': '1000-0001', 'type': 'On/Off light', 'uniqueid': '00:15:8d:00:02:92:6e:25-0b'}, 'e': 'changed', 'id': '60', 'r': 'lights', 't': 'event', 'uniqueid': '00:15:8d:00:02:92:6e:25-0b'} 2020-06-21 21:25:02.595 EventSystem: Event triggered: Keller Licht_2 2020-06-21 21:25:04.622 (deconz) onHeartbeat called 2020-06-21 21:25:05.496 (deconz) onMessage called 2020-06-21 21:25:05.497 (deconz) ### WebSocket Data : {'attr': {'lastannounced': None, 'lastseen': '2020-06-21T19:25:05Z', 'manufacturername': 'IKEA of Sweden', 'modelid': 'TRADFRI bulb GU10 W 400lm', 'name': 'Treppe-1-3', 'swversion': '1.2.214', 'type': 'Dimmable light', 'uniqueid': '00:0b:57:ff:fe:d5:00:58-01'}, 'e': 'changed', 'id': '20', 'r': 'lights', 't': 'event', 'uniqueid': '00:0b:57:ff:fe:d5:00:58-01'} 2020-06-21 21:25:06.048 (deconz) onMessage called 2020-06-21 21:25:06.049 (deconz) ### WebSocket Data : {'attr': {'lastannounced': None, 'lastseen': '2020-06-21T19:25:06Z', 'manufacturername': 'dresden elektronik', 'modelid': 'ConBee II', 'name': 'Configuration tool 92', 'swversion': '0x264a0700', 'type': 'Configuration tool', 'uniqueid': '00:21:2e:ff:ff:04:08:01-01'}, 'e': 'changed', 'id': '92', 'r': 'lights', 't': 'event', 'uniqueid': '00:21:2e:ff:ff:04:08:01-01'} 2020-06-21 21:25:06.049 (deconz) Double UniqueID correction : 92 > 1 2020-06-21 21:25:06.049 Error: (deconz) Missing device > 1 (lights) 2020-06-21 21:25:14.637 (deconz) onHeartbeat called

Smanar commented 4 years ago

Lol, thx for tests ^^

So it s because now the sensor daylight have the same UniqueID than the conbee.

I have updated the way to ban device, you can try the new Beta.

Smanar commented 4 years ago

Hello, have you try the last beta ?

salopette commented 4 years ago

Hi, yes I have a couple of days running! Seems to work.

Smanar commented 4 years ago

Ok nice thx, you are not alone with this problem, so I think I will make this version offcial.

salopette commented 4 years ago

i think, it is ok!

2bbe commented 4 years ago

Hi I upgraded plugin.py to the beta version this evening but I still get errors. I think that your fix doesnt work for me because my master(Conbee II) has type:unknown.

2020-07-24 21:46:50.764  Status: (zigbee) Initialized version 1.0.15, author 'Smanar'
2020-07-24 21:46:50.778  (zigbee) Domoticz and deCONZ are on same machine
2020-07-24 21:46:50.779  (zigbee) Adding banned device : 00:15:8d:00:02:36:c2:3f-01-0500
2020-07-24 21:46:50.779  (zigbee) Adding banned device : 68:0a:e2:ff:fe:6a:d8:21-01
2020-07-24 21:47:00.810  (zigbee) ### Request config
2020-07-24 21:47:00.865  Status: (zigbee) Firmware version : 0x26580700
2020-07-24 21:47:00.865  Status: (zigbee) Websocketnotifyall : True
2020-07-24 21:47:00.865  (zigbee) ### Request lights
2020-07-24 21:47:00.900  (zigbee) ### Device > 1 Name:Range extender 1 Type:Range extender Details:{'alert': 'none', 'reachable': True} and 
2020-07-24 21:47:00.900  (zigbee) Skipping Device (Banned) : 68:0a:e2:ff:fe:6a:d8:21-01
2020-07-24 21:47:00.900  (zigbee) ### Device > 2 Name:ZigBeeMaster Type:Unknown Details:{'reachable': True} and 
2020-07-24 21:47:00.900  Error: (zigbee) Unknow device : assume a light 00:21:2e:ff:ff:05:3a:80-01 > ZigBeeMaster (Unknown)
2020-07-24 21:47:00.904  Status: (zigbee) ### Create Device 00:21:2e:ff:ff:05:3a:80-01 > ZigBeeMaster (Unknown) as Unit 1

2020-07-24 21:47:03.075  Error: (zigbee) Websocket error, unknow device > 2 (lights) Asking for information
2020-07-24 21:47:03.124  (zigbee) ### Device > 2 Name:ZigBeeMaster Type:Unknown Details:{'reachable': True} and 
2020-07-24 21:47:03.124  Status: (zigbee) Adding missing device :2 Type:Unknown
2020-07-24 21:37:51.153  (zigbee) onMessage called

I assume that this is the root cause to the following error:

2020-07-24 21:41:23.750  (zigbee) ### WebSocket Data : {'state': {'sunrise': '2020-07-24T02:53:21', 'dark': False, 'daylight': False, 'status': 190, 'sunset': '2020-07-24T19:46:30', 'lastupdated': '2020-07-24T19:41:23.741'}, 'r': 'sensors', 't': 'event', 'e': 'changed', 'id': '1', 'uniqueid': '00:21:2e:ff:ff:05:3a:80-01'}
2020-07-24 21:41:23.751  (zigbee) Double UniqueID correction : 1 > 2
Smanar commented 4 years ago

Ha, which one device have you ? Your coordinator is called "ZigBeeMaster" instead of "Configuration tool" and haven't type. I m using the type to reconize the conbee, so yes the bug is from here, but why you haven't type ?

And another thing strange this bug is possible only if the plugin don't reconize the device using 'id': '1' and 'r': 'sensors', so it mean it haven't memorised the daylight sensor, you have put it in ignore list ? During the startup, there is nothing special when the plugin scan this sensor ?

BTW I have modified again the beta version, so you will not have this bug again (1 device is a light the other a sensor) but you will probably have another about a missing device.

2bbe commented 4 years ago

Hi Im on a RPI with ConbeeII and deconz .78 and Yes its strange that I have type:Unknown... Tested the new beta and attached log

debug-15-2.txt

Smanar commented 4 years ago

Ok so I think it s good now, I have updated the code to reconize the gateway if type = unknow and if there is only reachable as field in state.

But this code prevent the gateway be added in domoticz, so you need to delete it in your device list in domoticz, because you already have it.

2bbe commented 4 years ago

Thanks Ive updated the plugin and will get back to you after some testing.

2bbe commented 4 years ago

Hi Smanar, everything works fine now:) Thanks