Page 8 of 34

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Posted: Sunday 16 June 2019 15:50
by salopette

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Posted: Sunday 16 June 2019 15:55
by Thorgal789
Same bug after update.

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Posted: Sunday 16 June 2019 16:14
by Minglarn
Something happened...
Got this in the log...

Code: Select all

2019-06-16 16:05:31.006 Status: (ConBee USB) Firmware version : 0x26330500
2019-06-16 16:05:31.006 Status: (ConBee USB) Websocketnotifyall : True
2019-06-16 16:05:31.058 Status: (ConBee USB) Launching websocket on port 443
2019-06-16 16:05:31.647 Status: (ConBee USB) ### deCONZ ready
2019-06-16 16:05:31.647 Status: (ConBee USB) ### Found 2 Operators, 16 Sensors, 5 Groups and 3 others, with 0 Ignored
2019-06-16 16:05:31.748 Error: (ConBee USB) 'onCommand' failed 'TypeError':'Can't convert 'bool' object to str implicitly'.
2019-06-16 16:05:31.748 Error: (ConBee USB) ----> Line 839 in '/home/pi/domoticz/plugins/Domoticz-deCONZ/plugin.py', function onCommand
2019-06-16 16:05:31.748 Error: (ConBee USB) ----> Line 383 in '/home/pi/domoticz/plugins/Domoticz-deCONZ/plugin.py', function onCommand
Bad or?

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Posted: Sunday 16 June 2019 16:35
by Thorgal789
@ Minglarm, you have it only 1 time ? It's because domoticz have tried to send a command to deconz with a device not ready in base (deCONZ_ID = None)
The next beta have already a corrective for that.

Code: Select all

        if not deCONZ_ID:
            Domoticz.Error("Device not ready : " + str(Unit) )
        return

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Posted: Sunday 16 June 2019 17:11
by Minglarn
Have it all the time...
Seems that something has happend to my conbee stick.
We had a electric outage a couple days ago, and now i lost some of my sensors and cant add them back...

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Posted: Sunday 16 June 2019 19:41
by Thorgal789
Ha ?
Take a look on blue command just before , something like

Code: Select all

2019-06-16 19:37:36.675 (deCONZ) onCommand called for Unit 25: Parameter 'On', Level: 50, Hue:
2019-06-16 19:37:36.676 (deCONZ) Send Command /api/36E138295E/groups/4/action with {'bri': 127, 'on': True} (0 in buffer) 
2019-06-16 19:37:36.669 Status: User: Admin initiated a switch command (63/deCONZ - Couloir/On)
So you will see wich one sensor/switch try to send command, it's perhaps in yours scripts. It can come from a device created in domoticz in a previous situation and not present in deconz ATM. You can try the beta, it will tell you wich one device are missing, and avoid this error message.
They don't come back ? You can't repair them ? Have you try a backup ?

@salopette, https://github.com/Smanar/Domoticz-deCONZ/issues/20 for the moment 2 solutions, use previous domoticz version, or the plugin beta version.

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Posted: Monday 17 June 2019 17:39
by Thorgal789
@Minglarn have you finally re added your devices ?

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Posted: Monday 17 June 2019 18:20
by Minglarn
Yepp, did re add all of my sensors... Now its working again... :)

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Posted: Monday 17 June 2019 21:06
by salopette
@Thorgal789

Hi, I'm eyeing that from the switch groups in Domoticz always stay out, but the lights are addressed and switched.

Is it related to the update from yesterday?

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Posted: Monday 17 June 2019 21:40
by Thorgal789
salopette wrote: Monday 17 June 2019 21:06 @Thorgal789

Hi, I'm eyeing that from the switch groups in Domoticz always stay out, but the lights are addressed and switched.

Is it related to the update from yesterday?
Hello,

Idk, I have pull a new version, only somes protections you haven't on the yesterday version, but nothing usefull.

You mean a "group color switch" is off but some devices from this group are "on" ?

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Posted: Monday 17 June 2019 21:42
by salopette
Yes

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Posted: Monday 17 June 2019 21:49
by Thorgal789
Hur, nope, not normal, I have just make a try, if you have at least 1 bulb to "on", the group is "on". You need all bulb to "off" to have the group device to "off".

Code: Select all

2019-06-17 21:45:18.820 (deCONZ) onCommand called for Unit 22: Parameter 'On', Level: 48, Hue:
2019-06-17 21:45:18.820 (deCONZ) Send Command /api/36E138295E/lights/3/state with {'bri': 122, 'on': True} (0 in buffer)
2019-06-17 21:45:18.837 (deCONZ) Classic Data : [{'success': {'/lights/3/state/on': True}}, {'success': {'/lights/3/state/bri': 122}}]
2019-06-17 21:45:18.888 (deCONZ) ### WebSocket Data : {'uniqueid': '00:0d:6f:ff:fe:07:ab:cb-01', 'e': 'changed', 'id': '3', 'state': {'colormode': 'ct', 'alert': None, 'reachable': True, 'bri': 122, 'ct': 535, 'on': True}, 't': 'event', 'r': 'lights'}
2019-06-17 21:45:18.889 (deCONZ) ### Update device (deCONZ - Lum Couloir 1) : {'Color': '{"ct":246,"t":0,"ww":0}', 'nValue': 1, 'sValue': '47'}
2019-06-17 21:45:18.896 (deCONZ) ### WebSocket Data : {'t': 'event', 'e': 'changed', 'state': {'all_on': False, 'any_on': True}, 'r': 'groups', 'id': '4'}
2019-06-17 21:45:18.896 (deCONZ) ### Update device (deCONZ - Couloir) : {'nValue': 1, 'sValue': 'on'}
2019-06-17 21:45:19.156 (deCONZ) ### WebSocket Data : {'uniqueid': '00:0d:6f:ff:fe:07:ab:cb-01', 'e': 'changed', 'id': '3', 'state': {'colormode': 'ct', 'alert': None, 'reachable': True, 'bri': 31, 'ct': 535, 'on': True}, 't': 'event', 'r': 'lights'}
2019-06-17 21:45:19.157 (deCONZ) ### Update device (deCONZ - Lum Couloir 1) : {'Color': '{"ct":246,"t":0,"ww":0}', 'nValue': 1, 'sValue': '12'}
2019-06-17 21:45:20.119 (deCONZ) ### WebSocket Data : {'uniqueid': '00:0d:6f:ff:fe:07:ab:cb-01', 'e': 'changed', 'id': '3', 'state': {'colormode': 'ct', 'alert': None, 'reachable': True, 'bri': 122, 'ct': 535, 'on': True}, 't': 'event', 'r': 'lights'}
2019-06-17 21:45:20.120 (deCONZ) ### Update device (deCONZ - Lum Couloir 1) : {'Color': '{"ct":246,"t":0,"ww":0}', 'nValue': 1, 'sValue': '47'}
On my try (all was "off" before test), I have set "on" the light 3, and automaticaly I have as return
2019-06-17 21:45:18.889 (deCONZ) ### Update device (deCONZ - Lum Couloir 1) : {'Color': '{"ct":246,"t":0,"ww":0}', 'nValue': 1, 'sValue': '47'}
019-06-17 21:45:18.896 (deCONZ) ### Update device (deCONZ - Couloir) : {'nValue': 1, 'sValue': 'on'}
Light (Couloir 1) + group (couloir) , you haven't same thing on logs ? (Couloir 1 was in log 3 time, because of transistion values)

Have you tried in phoscon ?

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Posted: Tuesday 18 June 2019 21:31
by Thorgal789
salopette wrote: Monday 17 June 2019 21:42Yes
Do you still have problems ? If yes Can I have the same log than mine ?
Else I will pull the beta to the stable.

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Posted: Wednesday 19 June 2019 17:17
by salopette
Everything OK! Was again a mistake in my system.

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Posted: Thursday 20 June 2019 18:30
by salopette
Today I got this here?


2019-06-20 17:36:20.617 Error: (deconz) Malformed JSON response, can't repair : b'\x81~\x00\x95{"e":"changed","id":"18","r":"lights","state":{"alert":null,"bri":3,"on'
2019-06-20 17:36:20.617 Error: (deconz) More info : b'\x81~\x00\x91{"e":"changed","id":"18","r":"sensors","state":{"lastupdated":"2019-06-20T15:36:20","status":2},"t":"event","uniqueid":"fsm-state-1556651126097"}\x81~\x00\x95{"e":"changed","id":"34","r":"lights","state":{"alert":null,"bri":13,"on":true,"reachable":true},"t":"event","uniqueid":"00:0b:57:ff:fe:b7:9e:86-01"}\x81~\x00\x95{"e":"changed","id":"36","r":"lights","state":{"alert":null,"bri":13,"on":true,"reachable":true},"t":"event","uniqueid":"d0:cf:5e:ff:fe:da:2b:b6-01"}\x81~\x00\x95{"e":"changed","id":"35","r":"lights","state":{"alert":null,"bri":13,"on":true,"reachable":true},"t":"event","uniqueid":"00:0d:6f:ff:fe:e8:57:52-01"}\x81~\x00\x95{"e":"changed","id":"37","r":"lights","state":{"alert":null,"bri":13,"on":true,"reachable":true},"t":"event","uniqueid":"00:0d:6f:ff:fe:d2:92:d2-01"}\x81~\x00\x95{"e":"changed","id":"38","r":"lights","state":{"alert":null,"bri":13,"on":true,"reachable":true},"t":"event","uniqueid":"00:0b:57:ff:fe:d5:1a:c0-01"}\x81~\x00\x95{"e":"changed","id":"39","r":"lights","state":{"alert":null,"bri":13,"on":true,"reachable":true},"t":"event","uniqueid":"00:0b:57:ff:fe:c0:5f:ed-01"}\x81~\x00\x91{"e":"changed","id":"34","r":"sensors","state":{"lastupdated":"2019-06-20T15:36:20","status":0},"t":"event","uniqueid":"fsm-state-1558378133835"}\x81~\x00\x95{"e":"changed","id":"19","r":"lights","state":{"alert":null,"bri":3,"on":false,"reachable":true},"t":"event","uniqueid":"90:fd:9f:ff:fe:0f:cd:0e-01"}\x81~\x00\x95{"e":"changed","id":"16","r":"lights","state":{"alert":null,"bri":3,"on":false,"reachable":true},"t":"event","uniqueid":"90:fd:9f:ff:fe:16:4f:e7-01"}\x81~\x00\x95{"e":"changed","id":"18","r":"lights","state":{"alert":null,"bri":3,"on'
2019-06-20 17:36:20.617 Error: (deconz) More info : 1597
2019-06-20 17:36:20.621 Error: (deconz) PyDomoticz_Log failed to parse parameters: string expected.
2019-06-20 17:36:20.621 Error: (deconz) 'PyDomoticz_Log' failed 'ValueError':'embedded null character'.

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Posted: Thursday 20 June 2019 18:51
by Thorgal789
Nice, thx a lot.
You haven't line number for the 2 last error ? (Not realy important)
I have just push the new beta, some minut ago, lol, give me somes hours, I think I have find the bug.

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Posted: Thursday 20 June 2019 19:22
by Thorgal789
salopette wrote: Thursday 20 June 2019 18:30 Today I got this here?
Ok, I have make change directly on master (not on beta yet)

So now (if I m right), you will have the error message
"Incomplete Json keep it for later : " with the incomplete Json
And the next one will be good
If it's still broken you will have like usualy
"Malformed JSON response, can't repair"

In fact, I m storing in memory the incomplete json (the last one) and add it at the start of the next one (and hoping it will be the rest, 1597 is not enought for a buffer excess), If I m right it's the domotics framework that trunkate it ( and mix 10 others weksoket in one in same time ...)

Edit:
And you have nothing in status log starting with "Websocket Handshake" ?

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Posted: Thursday 20 June 2019 20:08
by salopette
Cool, I keep watching!
Have now taken the last master.

This is my start log

https://pastebin.com/cfjiqQwm

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Posted: Thursday 20 June 2019 21:18
by Thorgal789
Your start log is fine, it's a bug from domoticz framework, deCONZ don't use 100% standard protocol, but they are right.
On domoticz you have 3 tabs in log All/status/error, next time you have a bug, pls take a look in status tab, not logic you don't have a log in status (starting with "Websocket Handshake", you have one at start, this one is normal, not the future one) , it mean your websocket data is totally lost, if it's that, will be hard for me to repair it.
I need to search if i can make a websocket connexion without domoticz framework, but not sure it will be possible.

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Posted: Friday 21 June 2019 4:54
by salopette
2019-06-20 22:31:21.674 Error: (deconz) Incomplete Json keep it for later : b'\x81W{"e":"changed","id":"5","r":"groups","state":{"all_on":true,"any_on"'