Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee) Topic is solved
Moderator: leecollings
-
- Posts: 815
- Joined: Wednesday 15 August 2018 14:38
- Target OS: -
- Domoticz version:
- Contact:
Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)
If you can see it in the API (so in phoscon and the custom panel), you need to see it too in domoticz.
You haven't disabled the new device addition in the option "Accept new Hardware Devices" ?
Else you can see new device in the "devices" tab.
If you enable logs "debug info only", and restart the plugin hardware/deconz/update, you can see some information that can help you.
You haven't disabled the new device addition in the option "Accept new Hardware Devices" ?
Else you can see new device in the "devices" tab.
If you enable logs "debug info only", and restart the plugin hardware/deconz/update, you can see some information that can help you.
-
- Posts: 108
- Joined: Tuesday 06 February 2018 18:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta rel
- Contact:
Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)
Thanks for the input.Thorgal789 wrote: ↑Thursday 05 August 2021 19:34 If you can see it in the API (so in phoscon and the custom panel), you need to see it too in domoticz.
You haven't disabled the new device addition in the option "Accept new Hardware Devices" ?
Else you can see new device in the "devices" tab.
If you enable logs "debug info only", and restart the plugin hardware/deconz/update, you can see some information that can help you.
I finally figured out that I was using a sensor that had already been registered within Domoticz, it was already in the devices list under another name
-
- Posts: 815
- Joined: Wednesday 15 August 2018 14:38
- Target OS: -
- Domoticz version:
- Contact:
Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)
Hello, just a comment about the new version (somes days ago).
Siren have now a new widget, the old one was a on/off one the new one is a selector with more command. To enable the new one, just delete the actual device in domoticz and restart the plugin > hardware/deconz/update.
If I m right both version are still compatible, but haven't tested on my side, so can explain if you have issue with sirens.
And the front end to config device is repaired again.
Siren have now a new widget, the old one was a on/off one the new one is a selector with more command. To enable the new one, just delete the actual device in domoticz and restart the plugin > hardware/deconz/update.
If I m right both version are still compatible, but haven't tested on my side, so can explain if you have issue with sirens.
And the front end to config device is repaired again.
-
- Posts: 6
- Joined: Friday 26 November 2021 11:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)
Hi, i'm trying to get my Ikea Styrbar set up with domoticz so that i can use all of its functions including long press.
I'm seeing the nValues / sValues which doesn't seem to be usefull in case of longpress.
deCONZ is sending button events which are described here: https://dresden-elektronik.github.io/de ... on_events/
and i can see them in the domoticz log just fine, a long press always starts with a 1 at the end and finishes with a 3 (eg 2001 .... 2003) - a short click is always with a 2 in the end.
but i don't know how i can get the value "buttonevent" in a domoticz script.
after reading a lot here i don't understand how you are doing this. any help appreciated - thx in advance!
(i switched to beta branch as well ... and an also very interesting post was this one, but i don't fully understand the solution: viewtopic.php?p=253983#p253983)
I'm seeing the nValues / sValues which doesn't seem to be usefull in case of longpress.
deCONZ is sending button events which are described here: https://dresden-elektronik.github.io/de ... on_events/
and i can see them in the domoticz log just fine, a long press always starts with a 1 at the end and finishes with a 3 (eg 2001 .... 2003) - a short click is always with a 2 in the end.
but i don't know how i can get the value "buttonevent" in a domoticz script.
after reading a lot here i don't understand how you are doing this. any help appreciated - thx in advance!
(i switched to beta branch as well ... and an also very interesting post was this one, but i don't fully understand the solution: viewtopic.php?p=253983#p253983)
- waltervl
- Posts: 5149
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)
Can you post a screenshot of the edit screen of the domoticz device showing all selector levels (10,20 30 etc).
in dzVents you can use something like
Code: Select all
if domoticz.devices('Ikea Styrbar').levelname == 'long click' then
--- do something
end
.level can also be used, then it are the corresponding level numbers (eg 10, 20 30 etc)
For far more info on dzVents look here: https://www.domoticz.com/wiki/DzVents:_ ... or_etc..29
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 6
- Joined: Friday 26 November 2021 11:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)
so the thing is i added the level values by myself to the switch and for that part it is working.
could that be automatically generated somehow?
but even without setting the level numbers to names i have a problem, i took the values out of the domoticz log:
up short click -> 10
down short click -> 20 .... and so on, left 30, right 40 ...
BUT !!!
if i press up LONG click then it also sends 20 and down long sends 40, so i can't differentiate between right short and down long.
this problem can be reproduced with other zigbee switches as well.
the values in the logs from deconz contain the value "buttonevent" which solve this problem.
2021-11-26 15:23:24.647 deCONZ plugin: onMessage called
2021-11-26 15:23:24.648 deCONZ plugin: ### WebSocket Data : {'attr': {'id': '8', 'lastannounced': None, 'lastseen': '2021-11-26T14:23Z', 'manufacturername': 'IKEA of Sweden', 'modelid': 'Remote Control N2', 'name': 'Styrbar die eine', 'swversion': '1.0.024', 'type': 'ZHASwitch', 'uniqueid': '84:fd:27:ff:fe:07:75:ff-01-1000'}, 'e': 'changed', 'id': '8', 'r': 'sensors', 't': 'event', 'uniqueid': '84:fd:27:ff:fe:07:75:ff-01-1000'}
2021-11-26 15:23:24.648 deCONZ plugin: onMessage called
2021-11-26 15:23:24.648 deCONZ plugin: ### WebSocket Data : {'e': 'changed', 'id': '8', 'r': 'sensors', 'state': {'buttonevent': 4002, 'lastupdated': '2021-11-26T14:23:24.631'}, 't': 'event', 'uniqueid': '84:fd:27:ff:fe:07:75:ff-01-1000'}
2021-11-26 15:23:24.649 deCONZ plugin: ### Update device (Styrbar die eine) : {'nValue': 40, 'sValue': '40'}
i will add .levelname to the log and see if this could work
could that be automatically generated somehow?
but even without setting the level numbers to names i have a problem, i took the values out of the domoticz log:
up short click -> 10
down short click -> 20 .... and so on, left 30, right 40 ...
BUT !!!
if i press up LONG click then it also sends 20 and down long sends 40, so i can't differentiate between right short and down long.
this problem can be reproduced with other zigbee switches as well.
the values in the logs from deconz contain the value "buttonevent" which solve this problem.
2021-11-26 15:23:24.647 deCONZ plugin: onMessage called
2021-11-26 15:23:24.648 deCONZ plugin: ### WebSocket Data : {'attr': {'id': '8', 'lastannounced': None, 'lastseen': '2021-11-26T14:23Z', 'manufacturername': 'IKEA of Sweden', 'modelid': 'Remote Control N2', 'name': 'Styrbar die eine', 'swversion': '1.0.024', 'type': 'ZHASwitch', 'uniqueid': '84:fd:27:ff:fe:07:75:ff-01-1000'}, 'e': 'changed', 'id': '8', 'r': 'sensors', 't': 'event', 'uniqueid': '84:fd:27:ff:fe:07:75:ff-01-1000'}
2021-11-26 15:23:24.648 deCONZ plugin: onMessage called
2021-11-26 15:23:24.648 deCONZ plugin: ### WebSocket Data : {'e': 'changed', 'id': '8', 'r': 'sensors', 'state': {'buttonevent': 4002, 'lastupdated': '2021-11-26T14:23:24.631'}, 't': 'event', 'uniqueid': '84:fd:27:ff:fe:07:75:ff-01-1000'}
2021-11-26 15:23:24.649 deCONZ plugin: ### Update device (Styrbar die eine) : {'nValue': 40, 'sValue': '40'}
i will add .levelname to the log and see if this could work
- waltervl
- Posts: 5149
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)
I do not understand. Do you mean that when you do a long click that would send level 40 it would also first send 20 (being the short click)?
Because that would be a failure in the Ikea device. Else you have to wait for a "maybe to come" long click if you get a short click.
That is of course also possible but how long to wait?
Because that would be a failure in the Ikea device. Else you have to wait for a "maybe to come" long click if you get a short click.
That is of course also possible but how long to wait?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 6
- Joined: Friday 26 November 2021 11:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)
it doesn't send the short click if i do a long click. it sends a nValue 0 (with sValue Off) and then the 40 after i let go.
i have 3 of them - all behaving the same way.
i paired one with a zigbee led panel through phoscon and everything works there, i can short click for on/off and long click for dim.
and: the log from deconz shows the values for buttonevents which are perfect, but i don't know how to reach this value through dzevents or lua
i have 3 of them - all behaving the same way.
i paired one with a zigbee led panel through phoscon and everything works there, i can short click for on/off and long click for dim.
and: the log from deconz shows the values for buttonevents which are perfect, but i don't know how to reach this value through dzevents or lua
-
- Posts: 6
- Joined: Friday 26 November 2021 11:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)
UPDATE:
after switching to beta, deleting the device and adding it new i now have generated levels from 10 to 90. i will check if this fixed my problem.
after switching to beta, deleting the device and adding it new i now have generated levels from 10 to 90. i will check if this fixed my problem.
- waltervl
- Posts: 5149
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)
Ah good. I do not think it has anything to do with beta Domoticz but OK.
Check the log file of the button device in domoticz (click on log button of device, not the main log). There you see the list of selected button levels you have pressed.
In dzVents you can get the current level with the .level or .levelname
Check the log file of the button device in domoticz (click on log button of device, not the main log). There you see the list of selected button levels you have pressed.
In dzVents you can get the current level with the .level or .levelname
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 6
- Joined: Friday 26 November 2021 11:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)
i was talking about the beta from the deconz plugin.
so the levels are named B1 to B9 (from 10 to 90) - but it stays about the same, in the device log: with a long down press i get a B4 after i release the button, and i get the same after a short click.
and yes i can get that levelname in dzvents and react to it.
maybe i'll take a look in the plugin-source code ... thanks so far walter!
so the levels are named B1 to B9 (from 10 to 90) - but it stays about the same, in the device log: with a long down press i get a B4 after i release the button, and i get the same after a short click.
and yes i can get that levelname in dzvents and react to it.
maybe i'll take a look in the plugin-source code ... thanks so far walter!
-
- Posts: 815
- Joined: Wednesday 15 August 2018 14:38
- Target OS: -
- Domoticz version:
- Contact:
Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)
Yep, can be my fault.
On the plugin there is a generic fonction to manage switches, and it s something not reliable, because there is so much combinaison possible according to model.
So there is too special part for some device
If your device have different value on log X00Y, but same value on domoticz 1>100, it s possible to add a specific code for it in the plugin.
I just need the value visible on log you need (not all are usefull) and the device model id.
On the plugin there is a generic fonction to manage switches, and it s something not reliable, because there is so much combinaison possible according to model.
So there is too special part for some device
Code: Select all
Type = 'Tradfri_on/off_switch'
elif 'lumi.remote.b186acn01' in Model:
Type = 'Xiaomi_single_gang'
elif Model.startswith('lumi.remote.b286acn0'):
Type = 'Xiaomi_double_gang'
#Used for all opple switches
elif Model.endswith('86opcn01'):
Type = 'Xiaomi_Opple_6_button_switch'
#Used for all tuya switch
elif Model.startswith('TS004'):
Type = 'Tuya_button_switch'
#Used by philips remote
elif Model == 'RWL021':
Type = 'Philips_button_switch'
else:
Type = 'Switch_Generic'
I just need the value visible on log you need (not all are usefull) and the device model id.
-
- Posts: 6
- Joined: Friday 26 November 2021 11:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)
okay great - i will contact you on your github repository for the plugin.
update: yes since it is a different model name it will not jump to the right function. i will send you the details or make a pr.
update: yes since it is a different model name it will not jump to the right function. i will send you the details or make a pr.
- Sjonnie2017
- Posts: 361
- Joined: Wednesday 02 August 2017 19:43
- Target OS: Linux
- Domoticz version: Latest ß
- Location: The Netherlands
- Contact:
Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)
I am lost! I placed a new router today and now Domoticz can't connect to DeCONZ anymore. I can still operate all devices from deconz. This is the screen I am looking at:
I see this in the log:
2021-11-28 18:51:33.086 Error: ConBee2: (ConBee2) Connection problem (3) with Gateway, check your API key, or Use Request lib > V2.4.2
For the life of me I do not know how to correct this.
I tried to get a new API key but I couldn't make that work
PS. The PI is up to date
I see this in the log:
2021-11-28 18:51:33.086 Error: ConBee2: (ConBee2) Connection problem (3) with Gateway, check your API key, or Use Request lib > V2.4.2
For the life of me I do not know how to correct this.
I tried to get a new API key but I couldn't make that work
PS. The PI is up to date
ConBee II - TRÅDFRI lights + switches, loads of ChingLing dimmers and switches, Heiman and Xiaomi sensors
SolarEdge SE4000H (with active modbus_tcp)
YouLess Energy meter
Shelly 2.5 in roller shutter mode
SolarEdge SE4000H (with active modbus_tcp)
YouLess Energy meter
Shelly 2.5 in roller shutter mode
-
- Posts: 815
- Joined: Wednesday 15 August 2018 14:38
- Target OS: -
- Domoticz version:
- Contact:
Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)
You can use this url to find your IP https://phoscon.de/discover need to use internalipaddress on setting. So for you need to work with 192.168.16.165.
If you use the same url with the same inernal port 8080, in a browser you need to see phoscon.
Deconz and domoticz aren't on the same machine ? If they are on the same mchine better to use 127.0.0.1 as IP.
If they are on different machine, you need too 'authenticate app' when making the API key, but if you don't do that, you are not able to have an api key, so don't think it s the problem.
If you have just added a router, without touching to domoticz or deconz, I think it have modified ip adress on your network. Try the url on a browser (192.168.16.165:8080) , you can perhaps have information about the problem.
If you use the same url with the same inernal port 8080, in a browser you need to see phoscon.
Deconz and domoticz aren't on the same machine ? If they are on the same mchine better to use 127.0.0.1 as IP.
If they are on different machine, you need too 'authenticate app' when making the API key, but if you don't do that, you are not able to have an api key, so don't think it s the problem.
If you have just added a router, without touching to domoticz or deconz, I think it have modified ip adress on your network. Try the url on a browser (192.168.16.165:8080) , you can perhaps have information about the problem.
- Sjonnie2017
- Posts: 361
- Joined: Wednesday 02 August 2017 19:43
- Target OS: Linux
- Domoticz version: Latest ß
- Location: The Netherlands
- Contact:
Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)
Tx, Thorgal. It seems the new setup changed the port number somehow. Or maybe I did it. However when I change the plugin settings from port 8090 (as it was) to 8080 all seems to be working again. Tx again for your support!
ConBee II - TRÅDFRI lights + switches, loads of ChingLing dimmers and switches, Heiman and Xiaomi sensors
SolarEdge SE4000H (with active modbus_tcp)
YouLess Energy meter
Shelly 2.5 in roller shutter mode
SolarEdge SE4000H (with active modbus_tcp)
YouLess Energy meter
Shelly 2.5 in roller shutter mode
-
- Posts: 108
- Joined: Tuesday 06 February 2018 18:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta rel
- Contact:
Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)
Hello,
Just hassled with a Tradfri light bulb I finally associated with Phoscon, works Ok with Phoscon, appears in "Custom ==> DeCONZ" control panel within Domoticz, but does not appears within devices (accept new hardware devices checked! ).
Log displays :
2021-12-05 14:05:48.159 Error: Zigbee Deconz: (Zigbee Deconz) Can't Update Unit > 18 (lights) : {'nValue': 1, 'sValue': '99', 'Color': '{"m":2,"r":0,"g":0,"b":0,"t":199,"ww":199,"cw":56}'}
Does anybody have an idea about this issue?
Thanks
Just hassled with a Tradfri light bulb I finally associated with Phoscon, works Ok with Phoscon, appears in "Custom ==> DeCONZ" control panel within Domoticz, but does not appears within devices (accept new hardware devices checked! ).
Log displays :
2021-12-05 14:05:48.159 Error: Zigbee Deconz: (Zigbee Deconz) Can't Update Unit > 18 (lights) : {'nValue': 1, 'sValue': '99', 'Color': '{"m":2,"r":0,"g":0,"b":0,"t":199,"ww":199,"cw":56}'}
Does anybody have an idea about this issue?
Thanks
- Sjonnie2017
- Posts: 361
- Joined: Wednesday 02 August 2017 19:43
- Target OS: Linux
- Domoticz version: Latest ß
- Location: The Netherlands
- Contact:
Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)
Remove device and re-add to Domoticz. Sometimes that helps. Do not remove from deCONZ/Phoscon
ConBee II - TRÅDFRI lights + switches, loads of ChingLing dimmers and switches, Heiman and Xiaomi sensors
SolarEdge SE4000H (with active modbus_tcp)
YouLess Energy meter
Shelly 2.5 in roller shutter mode
SolarEdge SE4000H (with active modbus_tcp)
YouLess Energy meter
Shelly 2.5 in roller shutter mode
-
- Posts: 108
- Joined: Tuesday 06 February 2018 18:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta rel
- Contact:
Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)
Thanks!!!Sjonnie2017 wrote: ↑Sunday 05 December 2021 17:42 Remove device and re-add to Domoticz. Sometimes that helps. Do not remove from deCONZ/Phoscon
Ughh I forgot resetting Deconz plugin, now it works!
-
- Posts: 815
- Joined: Wednesday 15 August 2018 14:38
- Target OS: -
- Domoticz version:
- Contact:
Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)
Or you can just wait.
This error message is normal, it just mean you have received a request for a device not present in domoticz (a new one), but just after the plugin ask for information about the new device to add it.
Having this message one time is normal, in loop mode no.
This error message is normal, it just mean you have received a request for a device not present in domoticz (a new one), but just after the plugin ask for information about the new device to add it.
Having this message one time is normal, in loop mode no.
Who is online
Users browsing this forum: No registered users and 1 guest