Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee) Topic is solved

Xiaomi, Ikea TRÅDFRI, Philips Hue and more.

Moderator: leecollings

Post Reply
Thorgal789
Posts: 849
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

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

Post by Thorgal789 »

I think it's CLIP sensors/switch make by phoscon application (Virtual one I think, I don't use this feature too).
There is an old issue with same device than this one https://github.com/dresden-elektronik/d ... ssues/1024
"manufacturername":"Phoscon"
Thorgal789
Posts: 849
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

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

Post by Thorgal789 »

Ok so new version 1.0.8.

- Adding a tool to delete all useless key created everytime launching Phoscon.
- Setting Websocket port is now useless.
- Change switches icon for button instead of bulb.
- Adding scenes control. All scenes configured in Phoscon will have a button "push to on" in Domoticz.
- Adding some missing bulbs.
- But almost all, prevent the plugin be freezed if the gateway don't answer at a request and using queue list for request to prevent collision. Now the plugin send command one by one using a queue list and with 5s timeout maximum.
User avatar
Minglarn
Posts: 214
Joined: Friday 21 August 2015 19:27
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8153
Location: Stockholm / Sweden
Contact:

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

Post by Minglarn »

git pull and running... :)

Don't see much but it's nice!
Keep up the good work!

Now my
46546.JPG
46546.JPG (15.75 KiB) Viewed 1999 times
works perfect!
When you eliminate the impossible, whatever remains, however improbable, must be the truth.” -Spock in Star Trek VI
marcelbolhuis
Posts: 1
Joined: Tuesday 21 May 2019 21:37
Target OS: -
Domoticz version:
Contact:

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

Post by marcelbolhuis »

Hi there,

I'm trying to install the deCONZ brigde, but something is going wrong.. see a part of the log:

2019-05-21 21:33:43.632 Error: (ZIgbee) Not managed JSON : {'bridgeid': '00212EFFFF02A042', 'factorynew': False, 'apiversion': '1.16.0', 'modelid': 'deCONZ', 'name': 'Phoscon-GW', 'replacesbridgeid': None, 'mac': 'b8:27:eb:10:28:5f', 'datastoreversion': '60', 'starterkitid': '', 'swversion': '2.5.64'}

I got know clue what to do.
Thorgal789
Posts: 849
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

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

Post by Thorgal789 »

Ha, I have spend lot of time to understand ^^.
I think you have find a bug I need to display more information about.

You are using a bad api key, try in a navigator the url ip:port/api/Your_api_key/config, for exemple for me it's

Code: Select all

http://192.168.1.1:80/api/36E138295E/config
You have 2 versions, a light version (without good authentification), it's your JSON and a full one with more informations (with correct api key), I m checking for a field called "websocketnotifyall" that is missing in the light version.

If you have problem to make your API key use the API_KEY utility, just go un the plugin folder and type

Code: Select all

python3 API_KEY.py
You will have all commands to generate a new api key with exemple.
Thorgal789
Posts: 849
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

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

Post by Thorgal789 »

marcelbolhuis wrote: Tuesday 21 May 2019 21:39 Hi there,

I'm trying to install the deCONZ brigde, but something is going wrong.. see a part of the log:

2019-05-21 21:33:43.632 Error: (ZIgbee) Not managed JSON : {'bridgeid': '00212EFFFF02A042', 'factorynew': False, 'apiversion': '1.16.0', 'modelid': 'deCONZ', 'name': 'Phoscon-GW', 'replacesbridgeid': None, 'mac': 'b8:27:eb:10:28:5f', 'datastoreversion': '60', 'starterkitid': '', 'swversion': '2.5.64'}

I got know clue what to do.
Have you finally solved your problem, whith changing your API key ?
salopette
Posts: 187
Joined: Tuesday 07 March 2017 21:03
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Germany
Contact:

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

Post by salopette »

Hi, I have this mistake again and again:

2019-05-28 20:03:04.518 Error: (deconz) Malformed JSON response, can't repair : b'\x81W{"e":"changed","id":"7","r":"groups","state":{"all_on":true,"any_on"'

What can this be?
User avatar
Minglarn
Posts: 214
Joined: Friday 21 August 2015 19:27
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8153
Location: Stockholm / Sweden
Contact:

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

Post by Minglarn »

Have you made any changes in deConz gui?
Restart the plug in Domoticz and it should be fine..

Skickat från min SM-N950F via Tapatalk

When you eliminate the impossible, whatever remains, however improbable, must be the truth.” -Spock in Star Trek VI
Thorgal789
Posts: 849
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

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

Post by Thorgal789 »

Ha ok, you are using the beta version.
But It's strange the JSON seem imcomplete, you miss ":true}}" or it's a copy/paste error ?

You have this bug only on this JSON ?

Can you enable log "All" in plugin configuration and show me the raw data with the malformed JSON pls ? Something like that

Code: Select all

2019-04-02 20:10:47.032 (deconz) Received 182 bytes of data
2019-04-02 20:10:47.032 (deconz) 81 7e 00 b2 7b 22 65 22 3a 22 63 68 61 6e 67 65 64 22 2c 22 �~.�{"e":"changed","
2019-04-02 20:10:47.032 (deconz) 69 64 22 3a 22 31 22 2c 22 72 22 3a 22 73 65 6e 73 6f 72 73 id":"1","r":"sensors
2019-04-02 20:10:47.032 (deconz) 22 2c 22 73 74 61 74 65 22 3a 7b 22 64 61 72 6b 22 3a 74 72 ","state":{"dark":tr
2019-04-02 20:10:47.033 (deconz) 75 65 2c 22 64 61 79 6c 69 67 68 74 22 3a 66 61 6c 73 65 2c ue,"daylight":false,
2019-04-02 20:10:47.033 (deconz) 22 6c 61 73 74 75 70 64 61 74 65 64 22 3a 22 32 30 31 39 2d "lastupdated":"2019-
2019-04-02 20:10:47.033 (deconz) 30 34 2d 30 32 54 31 38 3a 31 30 3a 34 37 22 2c 22 73 74 61 04-02T18:10:47","sta
Wich one Domoticz version are you using ?
Thorgal789
Posts: 849
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

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

Post by Thorgal789 »

salopette wrote: Tuesday 28 May 2019 21:37 Hi, I have this mistake again and again:

2019-05-28 20:03:04.518 Error: (deconz) Malformed JSON response, can't repair : b'\x81W{"e":"changed","id":"7","r":"groups","state":{"all_on":true,"any_on"'

What can this be?
Hello, have you solved the bug by yourself ?
salopette
Posts: 187
Joined: Tuesday 07 March 2017 21:03
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Germany
Contact:

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

Post by salopette »

I have restarted everything now and the error does not come first.
Seems to be OK!
Thank you!
Thorgal789
Posts: 849
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

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

Post by Thorgal789 »

Ha ?
I seriously don't understand how it can happen, the JSON was truncated by deconz or domoticz (and I almost sure it's not deconz). I have changed the way the plugin manage the JSON on the beta version you are trying but I don't see where it can be have a difference neither.
salopette
Posts: 187
Joined: Tuesday 07 March 2017 21:03
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Germany
Contact:

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

Post by salopette »

Hello, I have this mistake again and again.
At least once a day he comes
What could that be,

2019-06-06 06:48:12.426 Error: (deconz) Malformed JSON response, can't repair : b'\x81W{"e":"changed","id":"5","r":"groups","state":{"all_on":true,"any_on"'
Thorgal789
Posts: 849
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

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

Post by Thorgal789 »

Hi, You haven't previous lines ? Or better, the raw data to see if the data are trunkated by domoticz or the plugin ?
It's always trunkated on same bytes, always for group changement, but different groups.

Give me some hours, I will put more debug lines in code.
Last edited by Thorgal789 on Thursday 06 June 2019 19:19, edited 1 time in total.
Thorgal789
Posts: 849
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

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

Post by Thorgal789 »

salopette wrote: Thursday 06 June 2019 15:38 Hello, I have this mistake again and again.
At least once a day he comes
What could that be,

2019-06-06 06:48:12.426 Error: (deconz) Malformed JSON response, can't repair : b'\x81W{"e":"changed","id":"5","r":"groups","state":{"all_on":true,"any_on"'
Ok so I have make some more debug line, you don't need to save all logs, they will be in error log too (in red), check the beta branch (only some lines edited)
You will perhaps have a new message in status log (so memorised too), just after the bug starting with "Websocket Handshake " with the missing data, if it's that I think have find the bug.
salopette
Posts: 187
Joined: Tuesday 07 March 2017 21:03
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Germany
Contact:

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

Post by salopette »

ok, I'll try it!
salopette
Posts: 187
Joined: Tuesday 07 March 2017 21:03
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Germany
Contact:

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

Post by salopette »

salopette wrote: Thursday 06 June 2019 19:34 ok, I'll try it!
It seems to work!
The mistake is not coming!
Many Thanks!
Thorgal789
Posts: 849
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

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

Post by Thorgal789 »

Lol, so not good for me ^^, was not a correctif, but a way to have more information to find bug.
I think the "domoticz connection framework" trunk the JSON, if I m right, you will have the same error message and in status log the missing data.

This bug is realy random, I never see it on my side, not realy critic but for the moment but I keep this version in beta state, waiting to see if you still have the problem.
salopette
Posts: 187
Joined: Tuesday 07 March 2017 21:03
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Germany
Contact:

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

Post by salopette »

since update today, I have constant errors

Version: 4.10915
Build Hash: 32abee2a5
Compile Date: 2019-06-16 09:41:06
dzVents Version: 2.4.23
Python Version: 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516]


2019-06-16 15:36:55.230 (deconz) ### Request config
2019-06-16 15:37:05.253 (deconz) ### Request config
2019-06-16 15:37:05.253 Error: (deconz) More than 5s timeout, Your system seem frezzed, Forcing disconnect for : GET /api/5CCF8FFE49/config/ HTTP/1.1
2019-06-16 15:37:05.253 Host: 192.168.178.93:80
2019-06-16 15:37:05.253 User-Agent: Domoticz/1.0
2019-06-16 15:37:05.253 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
2019-06-16 15:37:05.253 Connection: keep-alive
2019-06-16 15:37:05.253
2019-06-16 15:37:05.253
2019-06-16 15:37:09.426 (Mi WC Gatway) General/kWh (Xiaomi Smart Plug Usage)
2019-06-16 15:37:15.277 (deconz) ### Request config
2019-06-16 15:37:15.277 Error: (deconz) More than 5s timeout, Your system seem frezzed, Forcing disconnect for : GET /api/5CCF8FFE49/config/ HTTP/1.1
2019-06-16 15:37:15.277 Host: 192.168.178.93:80
2019-06-16 15:37:15.277 User-Agent: Domoticz/1.0
2019-06-16 15:37:15.277 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
2019-06-16 15:37:15.277 Connection: keep-alive
2019-06-16 15:37:15.277
2019-06-16 15:37:15.277
2019-06-16 15:37:25.250 (deconz) ### Request config
2019-06-16 15:37:25.250 Error: (deconz) More than 5s timeout, Your system seem frezzed, Forcing disconnect for : GET /api/5CCF8FFE49/config/ HTTP/1.1
2019-06-16 15:37:25.250 Host: 192.168.178.93:80
2019-06-16 15:37:25.250 User-Agent: Domoticz/1.0
2019-06-16 15:37:25.250 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
2019-06-16 15:37:25.250 Connection: keep-alive
2019-06-16 15:37:25.250
2019-06-16 15:37:25.250
2019-06-16 15:37:35.273 (deconz) ### Request config
2019-06-16 15:37:35.274 Error: (deconz) More than 5s timeout, Your system seem frezzed, Forcing disconnect for : GET /api/5CCF8FFE49/config/ HTTP/1.1
2019-06-16 15:37:35.274 Host: 192.168.178.93:80
2019-06-16 15:37:35.274 User-Agent: Domoticz/1.0
2019-06-16 15:37:35.274 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
2019-06-16 15:37:35.274 Connection: keep-alive
Thorgal789
Posts: 849
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

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

Post by Thorgal789 »

I m updating domoticz to last version to make tries too.
Can you connect to deconz config page with browser on your side ? http://deconzip/api/5CCF8FFE49/config/

You are on linux/windows/rapsberry ?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest