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

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

Moderator: leecollings

Hencor
Posts: 48
Joined: Sunday 01 September 2019 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: DE
Contact:

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

Post by Hencor »

Thorgal789 wrote: Saturday 25 March 2023 11:51 But making a small PR with only 1 field have more chance to be valided, if I have understand you need "state/LoadEstimateOnThisRadiator" ?
Yes, this would be the one which I now catch with the PM2.5. But currently I also use
- config/duration, which could be config/LoadRadiatorRoomMean and
- config/usertest, which could be config/LoadBalancingEnable.

To get the problems with the plugin solved sustainable for me all three should be implemented into deconz API / DDF enviroment.
Thorgal789 wrote: Saturday 25 March 2023 11:51 It's realy usefull for you ? because on my side I don't see what to do with this value.
This is part of a feature that prevents that only one radiator in a room with more than one taking the whole heating load. This means, it could happen that one radiator turns could but the other heats with 99%. From my point of view this is very inefficient.
With LoadEstimateOnThisRadiator value from each radiator a mean load is calculated and played back to each radiator with LoadRadiatorRoomMean.
Thorgal789 wrote: Saturday 25 March 2023 11:51 Honnestly I think we can try the third solution and if they don't validate the PR, I will make the second.
You can make the second solution waiting for something official to have good temperature.
As a quick solution I just picked the fifth option and went back to plugin version 1.0.26 :lol:

And yes, I would be very happy if you can make a official PR for the three items above. :)


As we are in dicussion anyway. It would be also pretty usefull, if the state/valve attribute would be implemeted into the plugin to get a domoticz device and this may also contains the solution for the current problem anyway. :roll: :lol:
Thorgal789
Posts: 850
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 »

For the PR we can try but now it's 3 fields to add ^^, but can try. Can you check the code https://github.com/Smanar/deconz-rest-p ... 7022a8e8b2
I don't think you are able to test the state one, but the config ones can be tested without editing c++ code.
I haven't set refresh.interval, IDK if it's a good idea, I don't want deconz spam the device for nothing, I can to set a 24h reports, what are you using on your side for test ? (And need to add them to the DDF too, idk how look your DDF ATM)

BTW, the beta branch of the domoticz plugin was updated, I think it will solve your issue, just need to switch to beta branch.

For the state/valve, it will make one more widget, and IDK what you can do with it ? Users generaly set a heatpoint and take a look on temperature return, if the valve is open or not .....
Hencor
Posts: 48
Joined: Sunday 01 September 2019 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: DE
Contact:

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

Post by Hencor »

I will see if I can test the code as soon as possible, but I need some time I think.

If I‘m not wrong I haven’t set a refresh interval. It is then the default if there is a default. I can share my DDF when I tested the code.

Why always asking what to do with such value? :lol: I‘m a little bit nerdy and want to see what’s going on with the radiator. For example I see the possibility to optimize the heating system temperature when I know how much the valves are open. With your argument it could also said that we don‘t need the temperature reading because we will notice if it’s too cold or too hot :roll: :lol:
But yes, it’s easy to just get the data with a little script and put them into devices.
Thorgal789
Posts: 850
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 »

If I‘m not wrong I haven’t set a refresh interval
Not relay need, have modified the file with a 24h interval, like that you will have 1 request at start to have the first value, and we can be sure the device will never be spammed.
You need to put one for the "state/loadestimateonthisradiator" (pm2.5 for you) but this one need be in the DDF so not specific to this PR.

Just tell me if the 2 "config item" seem good for you for I make the PR and we can cross finger.
Why always asking what to do with such value? :lol: I‘m a little bit nerdy and want to see what’s going on with the radiator. For example I see the possibility to optimize the heating system temperature when I know how much the valves are open. With your argument it could also said that we don‘t need the temperature reading because we will notice if it’s too cold or too hot :roll: :lol:
Yeah but the problem is the defaut working mode is for all users, so it mean if I add the state/valve, all users will have it, an it will make lot of devices. For state/tension, after a long negotiation I have finnaly created a special setting to enable or disable them, but state/valve you have the first one that are asking for it ^^
Hencor
Posts: 48
Joined: Sunday 01 September 2019 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: DE
Contact:

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

Post by Hencor »

I checked your PR without testing it. Sorry no time atm. :roll:

But I think with the config/loadradiatorroommean you did a copy paste mistake.
It is not Boolean, it should be a int16 and the description doesn’t fit properly. But all addresses seems to be good.
In addition it seems that this value has only write access according to the Danfoss firmware documentation. With my „duration-item“- solution I often get values -8000, only just after writing the value I get the correct value back.
This my needs further testing. I don‘t understand the logic behind writing but could not reading.
Thorgal789
Posts: 850
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 »

Have corrected the PR https://github.com/Smanar/deconz-rest-p ... 94475b3e22

>I don‘t understand the logic behind writing but could not reading.

Yeah, same for me, so you can set the value but not possible to know the previous one ???

>With my „duration-item“

Can you share your "custom DDF" ? to compare.
Hencor
Posts: 48
Joined: Sunday 01 September 2019 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: DE
Contact:

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

Post by Hencor »

Here is my DDF currently in use. Please not that this is for the POPP - Ally Clone.
D5X84YU_thermostat.txt
(13.27 KiB) Downloaded 69 times
I needed to rename as .txt to upload here.
Thorgal789
Posts: 850
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 »

We are doing same for "state/loadestimateonthisradiator" and "config/loadbalancingenable" but I m realy lighter than you for "config/loadradiatorroommean" ^^

BTW as you want, I can make the PR as it ?
Hencor
Posts: 48
Joined: Sunday 01 September 2019 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: DE
Contact:

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

Post by Hencor »

Thorgal789 wrote: Thursday 06 April 2023 17:52 We are doing same for "state/loadestimateonthisradiator" and "config/loadbalancingenable" but I m realy lighter than you for "config/loadradiatorroommean" ^^
What do you mean with that? How your DDF looks like?
It was just a quick `n` dirty try and error to build this DDF so I never really understood what all this parameters do. :roll: :D

Yes from my side PR looks good. Fingers crossed.
Thorgal789
Posts: 850
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 »

Code: Select all

{
  "schema": "resourceitem1.schema.json",
  "id": "config/loadradiatorroommean",
  "datatype": "Int16",
  "access": "W",
  "public": true,
  "description": "Load Radiator Room Mean.",
  "refresh.interval": 86400,
  "write": {
    "at": "0x4040",
    "cl": "0x0201",
    "dt": "0x29",
    "ep": 1,
    "mf": "0x1246",
    "eval": "Item.val",
    "fn": "zcl"
  }
}
On my side I m just using the write, as the device is write only.

PR done https://github.com/dresden-elektronik/d ... /pull/6872 now need to wait.
User avatar
DewGew
Posts: 581
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10618
Location: Sweden
Contact:

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

Post by DewGew »

I have this issue:

Code: Select all

2023-07-22 19:51:34.068 Conbee II: onHeartbeat called
2023-07-22 19:51:34.068 Conbee II: ### Initialisation > alarmsystems
2023-07-22 19:51:34.068 Conbee II: ### Request alarmsystems
2023-07-22 19:51:34.069 Conbee II: Send Command /api/4D5EFE8F49/alarmsystems/ with None (0 in buffer)
2023-07-22 19:51:34.069 Conbee II: Making Request: http://192.168.1.10:80/api/6898HHGTY/alarmsystems/ with params None
2023-07-22 19:51:34.103 Error: Conbee II: Connection problem (1) with Gateway : 404
How do I get rid of this?
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
Thorgal789
Posts: 850
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 »

Hello, what is your deconz version ?
If all the rest is working (it's the startup part, so I think you are stucked, but the plugin ask previously for config/light/sensor), it's probably because your version don't support yet the alarmsystem. You can try this url in a browser you will have this error "method, GET, not available for resource, /alarmsystems".

As solution you can update your deconz version, or if you want to keep an old one, I can give you a modification to done on the python script but this exist since july 2021.
User avatar
DewGew
Posts: 581
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10618
Location: Sweden
Contact:

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

Post by DewGew »

Thorgal789 wrote: Sunday 23 July 2023 9:26 Hello, what is your deconz version ?
If all the rest is working (it's the startup part, so I think you are stucked, but the plugin ask previously for config/light/sensor), it's probably because your version don't support yet the alarmsystem. You can try this url in a browser you will have this error "method, GET, not available for resource, /alarmsystems".

As solution you can update your deconz version, or if you want to keep an old one, I can give you a modification to done on the python script but this exist since july 2021.
I updated deconz, now its working. Thanks!
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
Thorgal789
Posts: 850
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 hope you will not have issue, after a 1 year jump version ^^.
If you have made a backup and want to use an old version, there is no problem, you can too use old plugin version if you don't need last feature, or if you know a little python the plugin is easy to customise.

I m shy to use last version too, don't want to break something, but recents versions have some usefull stuff, like the support for zigbee keypad using the alarmsystems endpoint for exemple and for the moment few bad return for the last deconz official one (except for sonoff sensor, corrective WIP).
geschriever
Posts: 8
Joined: Tuesday 18 July 2017 0:06
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

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

Post by geschriever »

Hi all, I cannot find a solution in this tread or other fora and would like to know how I can solve this?
I'm using RapsberryPI 3B with bookworm and Conbee-II.
Phoscon and Conbee are working correctly and even I can use the information in Domoticz with a old version of the Deconz plugin.
Version: Deconz/Phoscon 2.29.2-beta, Python3.11, Domoticz 2025.1 (build 16576),

I just created a fully new install but still the same errors in the log:


2025-03-16 12:53:33.095 Deconz: ### Request sensors
2025-03-16 12:53:33.120 Deconz: ### Device > 1 Name:Daylight Type:Daylight Details:{'dark': False, 'daylight': True, 'lastupdated': '2025-03-16T11:47:12.656', 'status': 170, 'sunrise': '2025-03-16T05:50:14', 'sunset': '2025-03-16T17:44:02'} and {'configured': True, 'on': True, 'sunriseoffset': 30, 'sunsetoffset': -30}
2025-03-16 12:53:33.121 Deconz: ### Device > 2 Name:TS0044 Type:ZHASwitch Details:{'buttonevent': None, 'lastupdated': 'none'} and {'battery': 73, 'on': True, 'reachable': True}
2025-03-16 12:53:33.122 Deconz: ### Device > 3 Name:Consumption 3 Type:ZHAConsumption Details:{'consumption': 1245070, 'lastupdated': '2025-03-14T13:46:15.497'} and {'on': True, 'reachable': True}
2025-03-16 12:53:33.124 Deconz: ### Device > 4 Name:Power 4 Type:ZHAPower Details:{'current': 0, 'lastupdated': '2025-03-14T13:46:48.846', 'power': 0, 'voltage': 232} and {'on': True, 'reachable': True}
2025-03-16 12:53:33.125 Deconz: ### Device > 5 Name:Presence 5 Type:ZHAPresence Details:{'lastupdated': '2025-03-16T11:50:30.084', 'presence': False} and {'alert': 'none', 'battery': 100, 'delay': 0, 'ledindication': False, 'on': True, 'reachable': True, 'sensitivity': 0, 'sensitivitymax': 4, 'usertest': False}
2025-03-16 12:53:33.127 Deconz: ### Device > 6 Name:LightLevel 6 Type:ZHALightLevel Details:{'dark': False, 'daylight': True, 'lastupdated': '2025-03-16T11:52:55.616', 'lightlevel': 37957, 'lux': 6246} and {'alert': 'none', 'battery': 100, 'on': True, 'reachable': True, 'tholddark': 12000, 'tholdoffset': 7000}
2025-03-16 12:53:33.128 Deconz: ### Device > 7 Name:Temperature 7 Type:ZHATemperature Details:{'lastupdated': '2025-03-16T11:50:03.022', 'measured_value': 13.47, 'temperature': 1347} and {'alert': 'none', 'battery': 100, 'offset': 0, 'on': True, 'reachable': True}
2025-03-16 12:53:33.129 Error: Deconz: Call to function 'onHeartbeat' failed, exception details:
2025-03-16 12:53:33.144 Error: Deconz: Traceback (most recent call last):
2025-03-16 12:53:33.144 Error: Deconz: File "/home/pi/domoticz/plugins/Domoticz-deCONZ/plugin.py", line 1245, in onHeartbeat
2025-03-16 12:53:33.144 Error: Deconz: _plugin.onHeartbeat()
2025-03-16 12:53:33.145 Error: Deconz: File "/home/pi/domoticz/plugins/Domoticz-deCONZ/plugin.py", line 538, in onHeartbeat
2025-03-16 12:53:33.145 Error: Deconz: self.ManageInit()
2025-03-16 12:53:33.145 Error: Deconz: File "/home/pi/domoticz/plugins/Domoticz-deCONZ/plugin.py", line 601, in ManageInit
2025-03-16 12:53:33.145 Error: Deconz: self.SendCommand("/api/" + Parameters["Mode2"] + "/" + self.INIT_STEP[0] + "/")
2025-03-16 12:53:33.145 Error: Deconz: File "/home/pi/domoticz/plugins/Domoticz-deCONZ/plugin.py", line 1132, in SendCommand
2025-03-16 12:53:33.145 Error: Deconz: self.UpdateBuffer()
2025-03-16 12:53:33.145 Error: Deconz: File "/home/pi/domoticz/plugins/Domoticz-deCONZ/plugin.py", line 1173, in UpdateBuffer
2025-03-16 12:53:33.145 Error: Deconz: self.NormalConnexion(_Data)
2025-03-16 12:53:33.145 Error: Deconz: File "/home/pi/domoticz/plugins/Domoticz-deCONZ/plugin.py", line 882, in NormalConnexion
2025-03-16 12:53:33.146 Error: Deconz: self.InitDomoticzDB(i,_Data,self.INIT_STEP[0])
2025-03-16 12:53:33.146 Error: Deconz: File "/home/pi/domoticz/plugins/Domoticz-deCONZ/plugin.py", line 645, in InitDomoticzDB
2025-03-16 12:53:33.146 Error: Deconz: kwarg.update(ProcessAllState(StateList,Model,0))
2025-03-16 12:53:33.146 Error: Deconz: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-03-16 12:53:33.146 Error: Deconz: File "/home/pi/domoticz/plugins/Domoticz-deCONZ/fonctions.py", line 379, in ProcessAllState
2025-03-16 12:53:33.146 Error: Deconz: kwarg.update(ReturnUpdateValue('airqualityppb', data['measured_value'], option))
2025-03-16 12:53:33.146 Error: Deconz: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-03-16 12:53:33.146 Error: Deconz: File "/home/pi/domoticz/plugins/Domoticz-deCONZ/fonctions.py", line 703, in ReturnUpdateValue
2025-03-16 12:53:33.146 Error: Deconz: kwarg['nValue'] = int(val)
2025-03-16 12:53:33.147 Error: Deconz: ^^^^^^^^
2025-03-16 12:53:33.147 Error: Deconz: ValueError: invalid literal for int() with base 10: '13.47'
2025-03-16 12:53:33.999 Error: Deconz: deCONZ not ready
2025-03-16 12:53:41.415 Error: Deconz: deCONZ not ready
2025-03-16 12:53:43.069 Deconz: ### Request sensors


How to solve this?

Thanks in advance!
User avatar
jvdz
Posts: 2328
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

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

Post by jvdz »

Sounds like this issue and solution: https://syntaxscenarios.com/python/fix- ... mal-points
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
geschriever
Posts: 8
Joined: Tuesday 18 July 2017 0:06
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

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

Post by geschriever »

JVDZ, thanks for your reply.

Your solution is in the code. If this is the case, many users should have the same problem because I use the original code.
So if it should be corrected, I assume Smanar or somebody from the develop team would like to fix it.

jvdz wrote: Sunday 16 March 2025 14:20 Sounds like this issue and solution: https://syntaxscenarios.com/python/fix- ... mal-points
User avatar
jvdz
Posts: 2328
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

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

Post by jvdz »

geschriever wrote: Sunday 16 March 2025 14:29 So if it should be corrected, I assume Smanar or somebody from the develop team would like to fix it.
Yep, so did you test it and when it fixes it, propose the fix in the github? ;-)
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
geschriever
Posts: 8
Joined: Tuesday 18 July 2017 0:06
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

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

Post by geschriever »

No I did not, I'm not a programmer. So the issue is not solved yet.

jvdz wrote: Sunday 16 March 2025 17:08
geschriever wrote: Sunday 16 March 2025 14:29 So if it should be corrected, I assume Smanar or somebody from the develop team would like to fix it.
Yep, so did you test it and when it fixes it, propose the fix in the github? ;-)
Thorgal789
Posts: 850
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 »

geschriever wrote: Sunday 16 March 2025 13:53
Hello, have just corrected the code on the beta branch, can you make a try ?

On the plugin folder

Code: Select all

git pull
git checkout beta
git pull
Then reload the plugin > Hardware/deconz/update.

And I m seing the custom sensor use only svalue and not nvalue https://wiki.domoticz.com/Domoticz_API/ ... tom_Sensor
So I think this line is useless finaly.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest