Page 1 of 1

Deconz and xiaomi switch problem

Posted: Tuesday 12 November 2019 17:25
by czasas
Hello, yesterday I try to use my switch from xiaomi in domoticz and I noticed following error:

2019-11-12 16:23:02.274 Error: (Conbee) 'onHeartbeat' failed 'UnboundLocalError'.
2019-11-12 16:23:02.274 Error: (Conbee) ----> Line 841 in '/home/pi/domoticz/plugins/Domoticz-deCONZ/plugin.py'
2019-11-12 16:23:02.274 Error: (Conbee) ----> Line 337 in '/home/pi/domoticz/plugins/Domoticz-deCONZ/plugin.py'
2019-11-12 16:23:02.274 Error: (Conbee) ----> Line 394 in '/home/pi/domoticz/plugins/Domoticz-deCONZ/plugin.py'
2019-11-12 16:23:02.274 Error: (Conbee) ----> Line 737 in '/home/pi/domoticz/plugins/Domoticz-deCONZ/plugin.py'
2019-11-12 16:23:02.274 Error: (Conbee) ----> Line 755 in '/home/pi/domoticz/plugins/Domoticz-deCONZ/plugin.py'
2019-11-12 16:23:02.274 Error: (Conbee) ----> Line 894 in '/home/pi/domoticz/plugins/Domoticz-deCONZ/plugin.py'

Somethink changed in plugin?

Re: Deconz and xiaomi switch problem

Posted: Tuesday 12 November 2019 18:28
by Thorgal789
Hello, IDK, I don't see something special at line 894, I don't think you have the same version than me.
But I have push the new version some days ago, if you have the plugin manager ?
Wich one version have you ?

Re: Deconz and xiaomi switch problem

Posted: Thursday 21 May 2020 7:38
by Plantje
At times, I have a similar error:
2020-05-20 10:42:16.436 Error: (deConz) 'onHeartbeat' failed 'UnboundLocalError'.
2020-05-20 10:42:16.436 Error: (deConz) ----> Line 841 in 'C:\Program Files\Domoticz\plugins\deCONZ\plugin.py'
2020-05-20 10:42:16.436 Error: (deConz) ----> Line 337 in 'C:\Program Files\Domoticz\plugins\deCONZ\plugin.py'
2020-05-20 10:42:16.436 Error: (deConz) ----> Line 394 in 'C:\Program Files\Domoticz\plugins\deCONZ\plugin.py'
2020-05-20 10:42:16.436 Error: (deConz) ----> Line 737 in 'C:\Program Files\Domoticz\plugins\deCONZ\plugin.py'
2020-05-20 10:42:16.436 Error: (deConz) ----> Line 755 in 'C:\Program Files\Domoticz\plugins\deCONZ\plugin.py'
2020-05-20 10:42:16.436 Error: (deConz) ----> Line 894 in 'C:\Program Files\Domoticz\plugins\deCONZ\plugin.py'

Where can I see which version of the plugin manager I am using?

Edit: In my case, it might have happened because I have two Trädfri light bulbs that can be switched by both Zigbee and two light switches. Perhaps yesterday someone used the switch again and one light bulb was not getting any power and thus was not found by the phoscon nor the plugin.

Re: Deconz and xiaomi switch problem

Posted: Thursday 21 May 2020 10:09
by Thorgal789
Hello, the easy way is looking in the plugin.py file.
You can see it if you restart the plugin too, in log

But you can be sure you haven't the last version, line 894 is a comment ATM, so it can' be have an error here

If you switch off a device the error message will be

Code: Select all

(deCONZ) deCONZ error :{'error': {'description': 'resource, /lights/4, not available', 'type': 3, 'address': '/lights/4'}}
But this one is not blocking.

Re: Deconz and xiaomi switch problem

Posted: Thursday 21 May 2020 11:16
by Plantje
Thanks for the quick feedback! So, nothing to worry here. I will look into updating the version to the most recent version. Any tips and tricks on how to do that on Windows?

Re: Deconz and xiaomi switch problem

Posted: Thursday 21 May 2020 12:11
by Thorgal789
Yep, not sure you have github instaled on windows, so just go on https://github.com/Smanar/Domoticz-deCONZ
You have a big green button to download, just extract the files (not the folder) in your plugin folder to overwrite old file.

Just copy files and not folder, because you will probalby don't use this name.

Then restart the plugin, Hardware/deconz/update.

Re: Deconz and xiaomi switch problem

Posted: Friday 22 May 2020 23:16
by Plantje
No need to do anything with the API_KEY? Just copy-paste all the files in the zip file? Because, currently everything is working. Perhaps, I should not change something that is working fine.

Re: Deconz and xiaomi switch problem

Posted: Saturday 23 May 2020 13:45
by Thorgal789
Yep, only copy/paste files.
The configuration (like api_key) is stored in domoticz database.
And when you reload the plugin, the plugin will resynchronise all the devices.

There is no danger.
Some devices are updated sometime in new plugin version, so you can have "difference" in your script, for exemple button value on switch can change, but nothing blocking.

Re: Deconz and xiaomi switch problem

Posted: Sunday 24 May 2020 22:00
by Plantje
Done. Everything seems ok. Thanks for the support