Page 3 of 4

Re: Zigbee in Domoticz (win10)

Posted: Monday 19 December 2022 22:32
by pipiche
sound good. thanks for your support

Re: Zigbee in Domoticz (win10)

Posted: Friday 24 March 2023 21:56
by olleman
Hello again :)

I've finally moved to the new house and started installing the moes dimmer switches. Both gangs seems to be working.

Now for a new question :) I bought a Girier 4 way switch and got it to pair with the plugin and got the widgets into domotics. However, I can't seem to control it but it reports its current status to Domoticz (on/off) for all 4 switches. This is what I get when I press the yellow "X" at the paired device:

EDIT: hm... after a hard reset it rather seems that all relays in the switch turn on/off at once when I try to control either of them from Domoticz.

{"Version":"3","ZDeviceName":"Garage","Status":"inDB","SQN":"77","Ep":{"01":{"e000":{"d003":"AAAAAgAABAAABgAA","d001":"06","d002":"0a"},"0006":{"4001":"0","4002":"0","8002":"1","0000":"01"},"e001":{"d030":0,"d000":0,"d001":"00000000","d002":"0","d003":"0","d004":"0","d005":"0"},"0000":{"0004":"_TZ3000_ltt60asa","0005":"TS0004","0000":"3","0001":"72","0002":"0","0003":"1","0006":"","0007":"1"},"ClusterType":{"22339":"Switch"}},"02":{"0006":{"4001":"0","4002":"0","0000":"00"},"ClusterType":{"22340":"Switch"}},"03":{"0006":{"4001":"0","4002":"0","0000":"01"},"ClusterType":{"22341":"Switch"}},"04":{"0006":{"4001":"0","4002":"0","0000":"00"},"ClusterType":{"22342":"Switch"}},"f2":{}},"Heartbeat":"57","RIA":"4","LQI":25,"Battery":{},"Model":"TS0004","ForceAckCommands":[],"MacCapa":"8e","IEEE":"a4c13878bb79118e","Type":"Switch","ProfileID":{},"ZDeviceID":{},"App Version":"72","Attributes List":{},"DeviceType":"FFD","HW Version":"1","Last Cmds":[],"LogicalType":"Router","Manufacturer":"1141","Manufacturer Name":"_TZ3000_ltt60asa","NbEp":"5","PowerSource":"Main","ReadAttributes":{"Ep":{"01":{"e000":{"TimeStamp":1679680527,"iSQN":{},"Attributes":{"d003":"00","d001":"00","d002":"00"},"ZigateRequest":{}},"0006":{"TimeStamp":1679681112,"iSQN":{"4001":"08","4002":"08","0000":"33"},"Attributes":{"4001":"00","4002":"00","8002":"00","0000":"00"},"ZigateRequest":{}},"e001":{"TimeStamp":1679680528,"iSQN":{},"Attributes":{"d030":"00","d000":"00","d001":"00","d002":"00","d003":"00","d004":"00","d005":"00"},"ZigateRequest":{}},"0000":{"TimeStamp":1679680531,"iSQN":{"4000":"0e","0004":"0c","0005":"0c","0000":"37","0001":"0c","0002":"0c","0003":"0d","0006":"0d","0007":"0d","000a":"0d","000f":"0d","0010":"0e","0015":"0e","f000":"0e"},"Attributes":{"4000":"86","0004":"00","0005":"00","0000":"00","0001":"00","0002":"00","0003":"00","0006":"00","0007":"00","000a":"86","0010":"86","0015":"86"},"ZigateRequest":{}}},"02":{"0006":{"TimeStamp":1679680823,"iSQN":{"4001":"09","4002":"09","0000":"34"},"Attributes":{"4001":"00","4002":"00"},"ZigateRequest":{}},"0000":{"TimeStamp":1679680500,"iSQN":{"0004":"01","0005":"01"},"Attributes":{},"ZigateRequest":{}}},"03":{"0006":{"TimeStamp":1679681113,"iSQN":{"4001":"0a","4002":"0a","0000":"35"},"Attributes":{"4001":"00","4002":"00","0000":"00"},"ZigateRequest":{}},"0000":{"TimeStamp":1679680500,"iSQN":{"0004":"02","0005":"02"},"Attributes":{},"ZigateRequest":{}}},"04":{"0006":{"TimeStamp":1679680902,"iSQN":{"4001":"0b","4002":"0b","0000":"36"},"Attributes":{"4001":"00","4002":"00","0000":"00"},"ZigateRequest":{}},"0000":{"TimeStamp":1679680500,"iSQN":{"0004":"03","0005":"03"},"Attributes":{},"ZigateRequest":{}}},"f2":{"0000":{"TimeStamp":0,"iSQN":{},"Attributes":{},"ZigateRequest":{}}}}},"ReceiveOnIdle":"","Stack Version":"0","Stamp":{"time":1679688095.8460808,"Time":"2023-03-24 21:01:35","MsgType":" 100","LastSeen":1679688095,"LastPing":1679687913},"ZCL Version":"3","Health":"Not Reachable","Capability":["Full-Function Device","Main Powered","Receiver during Idle","Standard security","NwkAddr should be allocated"],"ZDPSQN":"04","PairingInProgress":false,"ZCL-IN-SQN":{"e000":"3c","0006":"75","e001":"3e","000a":"77"},"RollingLQI":[21,18,21,21,21,25,18,21,25,25,25],"SQN_000a":"77","Epv2":{"01":{"ClusterIn":{},"ClusterOut":{},"ProfileID":{},"ZDeviceID":{}},"02":{"ClusterIn":{},"ClusterOut":{},"ProfileID":{},"ZDeviceID":{}},"03":{"ClusterIn":{},"ClusterOut":{},"ProfileID":{},"ZDeviceID":{}},"04":{"ClusterIn":{},"ClusterOut":{},"ProfileID":{},"ZDeviceID":{}},"f2":{"ClusterIn":{},"ClusterOut":{},"ProfileID":{},"ZDeviceID":{}}},"ZCLSQN":"3b","PairingTime":1679680508.1048062,"BindingTable":{"SQN":0,"Status":"Success","TimeStamp":1679680512.4878643,"BindingTableSize":0,"Devices":[]},"ConfigureReporting":{"Ep":{"01":{"0006":{"TimeStamp":1679680508.1205404,"iSQN":{"0000":"04"},"Attributes":{"0000":"00"},"ZigateRequest":{}}},"02":{"0006":{"TimeStamp":1679680508.1205404,"iSQN":{"0000":"05"},"Attributes":{"0000":"00"},"ZigateRequest":{}}},"03":{"0006":{"TimeStamp":1679680508.1205404,"iSQN":{"0000":"06"},"Attributes":{"0000":"00"},"ZigateRequest":{}}},"04":{"0006":{"TimeStamp":1679680508.1205404,"iSQN":{"0000":"07"},"Attributes":{"0000":"00"},"ZigateRequest":{}}}}},"Max Buffer Size":"42","Max Rx":"0042","Max Tx":"0042","macapa":"8e","bitfield":"4001","server_mask":"2a00","descriptor_capability":"00","PreviousStatus":"inDB","ReadConfigureReporting":{"Ep":{"01":{"0006":{"0000":{"TimeStamp":1679680537.7875085,"Status":"00","DataType":"10","MinInterval":"0001","MaxInterval":"012c"}}},"02":{"0006":{"0000":{"TimeStamp":1679680538.1920266,"Status":"00","DataType":"10","MinInterval":"0001","MaxInterval":"012c"}}},"03":{"0006":{"0000":{"TimeStamp":1679680538.6280997,"Status":"00","DataType":"10","MinInterval":"0001","MaxInterval":"012c"}}},"04":{"0006":{"0000":{"TimeStamp":1679680539.0275893,"Status":"00","DataType":"10","MinInterval":"0001","MaxInterval":"012c"}}}},"TimeStamp":1679680539.0275893},"SWBUILD_1":"","Param":{},"CheckParam":false,"WriteAttributes":{"Ep":{"01":{"e000":{"TimeStamp":0,"iSQN":{},"Attributes":{},"ZigateRequest":{}},"0006":{"TimeStamp":0,"iSQN":{},"Attributes":{},"ZigateRequest":{}},"e001":{"TimeStamp":0,"iSQN":{},"Attributes":{},"ZigateRequest":{}},"0000":{"TimeStamp":0,"iSQN":{},"Attributes":{},"ZigateRequest":{}}},"02":{"0006":{"TimeStamp":0,"iSQN":{},"Attributes":{},"ZigateRequest":{}}},"03":{"0006":{"TimeStamp":0,"iSQN":{},"Attributes":{},"ZigateRequest":{}}},"04":{"0006":{"TimeStamp":0,"iSQN":{},"Attributes":{},"ZigateRequest":{}}}}}}

Re: Zigbee in Domoticz (win10)

Posted: Sunday 26 March 2023 10:12
by pipiche
Please kindly switch to the develop branch

you must have python3.8 at minimum (with bullseye) - buster do not work

from the plugin z4d folder

Code: Select all

git checkout develop
git pull
sudo python3 -m pip install requirements.txt --upgrade
remove the related widgets from Domoticz
restart the plugin
check that the device do not exist anymore in the pliugin

then redo the pairing

Re: Zigbee in Domoticz (win10)

Posted: Sunday 26 March 2023 11:34
by olleman
Thankyou for your quick action and reply!

I tried omitting the python upgrade since I'm a bit afraid that I'll break something python-related in windows. But after doing the first two commands tha plugin seems to fail to load because I can't access the Web GUI anymore and no Zigbee switches work anymore. Trying to run the python upgrade gives me a warning about python not existing. I tried running

Code: Select all

python -m pip install requirements.txt --upgrade


But that gives me an error about no distribution found matching the requirements...

It's been a while since I did all this and this is not second nature to me so any help possible is most appreciated :)

Current Python version: 3.8.9

I have tried the develop branch earlier on to get the moes dimmer switches to work and the upgrade has always worked before...

Re: Zigbee in Domoticz (win10)

Posted: Sunday 26 March 2023 13:33
by pipiche
Is the current Python version what Domoticz see ? In other words are you on Buster ? If you are on Buster despite that

Code: Select all

python3 --version
shows 3.8, Domoticz will use 3.7, so you need to move to bullseye.

BTW 3.7 is End of Life this summer

Re: Zigbee in Domoticz (win10)

Posted: Sunday 26 March 2023 14:07
by olleman
Yes, Domoticz reports Python version 3.8.9. Buster is a Debian release, right? I'm not sure how I can be on buster/bullseye if I'm running windows...?

I can't even issue the command "python3 --version" I can however run the command "python --version" in Git Bash and that reports 3.8.9 as well as Domoticz.

Are you saying that despite this I still need to run a higher version of python?

Re: Zigbee in Domoticz (win10)

Posted: Sunday 26 March 2023 19:46
by pipiche
I'm starting to be lost.
The subject is talking about Windows 10 and here we are talking about Buster ?

Re: Zigbee in Domoticz (win10)

Posted: Sunday 26 March 2023 20:08
by olleman
pipiche wrote: Sunday 26 March 2023 19:46 I'm starting to be lost.
The subject is talking about Windows 10 and here we are talking about Buster ?
hehe, you and me both then :)

I'm really not trying to be rude but I believe it was you who brought buster/bullseye into the conversation, I'm just trying to understand what I need to do to get the latest develop branch running under my windows installation again. Please help :)

Re: Zigbee in Domoticz (win10)

Posted: Sunday 26 March 2023 20:20
by olleman
I'm really trying to sort this out myself but the question is if I'm just making it worse...

I tried upgrading pip. Installed the latest pip and then issued this command:

Code: Select all

python -m pip install -r requirements.txt --upgrade
This downloaded a bunch of stuff but Domoticz is now giving me this error log:

Code: Select all

Error: Zigbee: (Zigate) failed to load 'plugin.py', Python Path used was 'C:\Program Files (x86)\Domoticz\plugins\Domoticz-Zigbee\;C:\Program Files (x86)\Python38-32\python38.zip;C:\Program Files (x86)\Python38-32\Lib\;C:\Program Files (x86)\Python38-32\DLLs\;C:\Program Files (x86)\Domoticz;C:\Program Files (x86)\Python38-32;C:\Program Files (x86)\Python38-32\lib\site-packages'.
2023-03-26 20:14:52.734 Error: Zigbee: Traceback (most recent call last):
2023-03-26 20:14:52.734 Error: Zigbee: File "C:\Program Files (x86)\Domoticz\plugins\Domoticz-Zigbee\plugin.py", line 98, in <module>
2023-03-26 20:14:52.735 Error: Zigbee: import z4d_certified_devices
2023-03-26 20:14:52.735 Error: Zigbee: ModuleNotFoundError: No module named 'z4d_certified_devices'

Re: Zigbee in Domoticz (win10)

Posted: Sunday 26 March 2023 22:34
by pipiche
As you are on Windows you must run the

Code: Select all

python -m pip install -r requirements.txt --upgrade
under a command/terminal which is Administrator

Re: Zigbee in Domoticz (win10)

Posted: Sunday 26 March 2023 23:06
by olleman
pipiche wrote: Sunday 26 March 2023 22:34 As you are on Windows you must run the

Code: Select all

python -m pip install -r requirements.txt --upgrade
under a command/terminal which is Administrator
Thank you for bearing with me. I ran the command under Windows cmd started with administrator privileges and it skips all steps since it says that all requirements are already met. Domoticz starts with the same error message regarding the zigbee plugin as before.

Re: Zigbee in Domoticz (win10)

Posted: Monday 27 March 2023 18:51
by olleman
I'm continuing by trial and error here....I just tried the following command in Git bash under administrator rights

Code: Select all

git pull
python -m pip install -r requirements.txt --upgrade --force-reinstall
python -m pip install -r requirements.txt --upgrade (which says that everything allready meets requirements)
My thinking was that the first time around I did this without administrator rights and somehow the installation got messed up. I think I'm moving forward but I really can't tell since I'm not sure what I'm doing really...

I get the following from the log in Domoticz now.

Code: Select all

2023-03-27 18:44:49.681 Status: Incoming connection from: 192.168.0.47
2023-03-27 18:44:52.499 Status: Zigbee: Initialized version 6.4, author 'pipiche38'
2023-03-27 18:44:52.499 Status: Zigbee: Zigbee for Domoticz plugin started!
2023-03-27 18:44:52.499 Status: Zigbee: Python3 requires 3.8 or above and you are running 3.8
2023-03-27 18:44:52.499 Status: Zigbee: Checking Python modules C:\Program Files (x86)\Domoticz\plugins\Domoticz-Zigbee\requirements.txt
2023-03-27 18:44:52.783 Error: Zigbee: Call to function 'onStart' failed, exception details:
2023-03-27 18:44:52.783 Error: Zigbee: Traceback (most recent call last):
2023-03-27 18:44:52.783 Error: Zigbee: File "C:\Program Files (x86)\Domoticz\plugins\Domoticz-Zigbee\plugin.py", line 1537, in onStart
2023-03-27 18:44:52.783 Error: Zigbee: _plugin.onStart()
2023-03-27 18:44:52.783 Error: Zigbee: File "C:\Program Files (x86)\Domoticz\plugins\Domoticz-Zigbee\plugin.py", line 285, in onStart
2023-03-27 18:44:52.783 Error: Zigbee: if check_requirements( self ):
2023-03-27 18:44:52.783 Error: Zigbee: File "C:\Program Files (x86)\Domoticz\plugins\Domoticz-Zigbee\plugin.py", line 1504, in check_requirements
2023-03-27 18:44:52.783 Error: Zigbee: pkg_resources.require(req)
2023-03-27 18:44:52.783 Error: Zigbee: File "C:\Program Files (x86)\Python38-32\lib\site-packages\pkg_resources\__init__.py", line 966, in require
2023-03-27 18:44:52.783 Error: Zigbee: needed = self.resolve(parse_requirements(requirements))
2023-03-27 18:44:52.783 Error: Zigbee: File "C:\Program Files (x86)\Python38-32\lib\site-packages\pkg_resources\__init__.py", line 827, in resolve
2023-03-27 18:44:52.783 Error: Zigbee: dist = self._resolve_dist(
2023-03-27 18:44:52.783 Error: Zigbee: File "C:\Program Files (x86)\Python38-32\lib\site-packages\pkg_resources\__init__.py", line 873, in _resolve_dist
2023-03-27 18:44:52.783 Error: Zigbee: raise VersionConflict(dist, req).with_context(dependent_req)
2023-03-27 18:44:52.799 Error: Zigbee: pkg_resources.VersionConflict: (dnspython 2.2.1 (c:\program files (x86)\python38-32\lib\site-packages), Requirement.parse('dnspython==2.3.0'))
I would be so happy to get the plugin working again, I'm missing all my devices I had set up which are now "dead in the water".

Re: Zigbee in Domoticz (win10)

Posted: Wednesday 29 March 2023 11:36
by olleman
Well I'm continuing answering myself in hope that someone will know the solution :)

I now have removed the Domoticz-Zigbee folder in Plugins and reinstalled the plugin under administrator. I had to set the coordinator to a full reset witgh the "False/True" flag in Domoicz hardware settings and then reinstall the whole Zigbee network. I'm now running the latest develop version. All moes dimmers including one IKEA tradfri pairs nicely but I just can't get the Girier switch to pair anymore or it gets a bad pariring. This switch is located furthest away from the coordinator but only about 5 meters from the nearetst moes dimmer that also works as a router.

When I initially paired the Girier switch it took literally 1 seconds to get all information from it and create the widgets in Domoticz but now it's just not possible anymore or it gets just some information about the switch and it reports it as "UNKNOWN" and the log says "Bad pairing".

This is what he device info now looks like:

Code: Select all

{"PluginInfos":{"HardwareID":15,"HomeFolder":"C:\\Program Files (x86)\\Domoticz\\plugins\\Domoticz-Zigbee\\","StartupFolder":"C:\\Program Files (x86)\\Domoticz\\","UserDataFolder":"C:\\Program Files (x86)\\Domoticz\\","WebRoot":"","Database":"C:\\Program Files (x86)\\Domoticz\\domoticz.db","Language":"en","Version":"6.4","Author":"pipiche38","Name":"Zigbee","Address":"0.0.0.0","Port":"9999","SerialPort":"COM4","Key":"Zigate","Mode1":"ZigpyZNP","Mode2":"USB","Mode3":"False","Mode4":"9440","Mode6":"2","DomoticzVersion":"2022.2","DomoticzHash":"eea9db734","DomoticzBuildTime":"2022-11-05 13:05:35","PluginBranch":"beta6","PluginVersion":"6.4.325","CertifiedDbVersion":"1.30","TimeStamp":1680106112,"available":"6.4.321","available-firmMajor":0,"available-firmMinor":0,"FirmwareVersion":"Z-Stack 3.30+ (build 20220219)","FirmwareUpdate":false,"PluginUpdate":false,"LogLevel":7,"Zigpy":true,"CoordinatorModel":"CC1352/CC2652, Z-Stack 3.30+ (znp)","CoordinatorFirmwareVersion":"Z-Stack 3.30+ (build 20220219)","DisplayFirmwareVersion":"Znp - Z-Stack 3.30+ (build 20220219)","CoordinatorIEEE":"00124b0025e14d52","NetworkSize":"Total: 7 | Routers: 7 | End Devices: 0","NetworkDevices":{"1002":{"_TZE200_e3oitdyu":["TS0601-2Gangs-dimmer"]},"117c":{"IKEA of Sweden":["TRADFRIbulbE27WSglobeopal1055lm"]}}},"Analytics":1,"Device":{"Version":"3","ZDeviceName":"","Status":"UNKNOW","SQN":"a1","Ep":{},"Heartbeat":"379","RIA":"6","LQI":40,"Battery":{},"Model":"","ForceAckCommands":[],"MacCapa":"8e","IEEE":"a4c13878bb79118e","Type":{},"ProfileID":{},"ZDeviceID":{},"App Version":"","Attributes List":{},"DeviceType":"FFD","HW Version":"","Last Cmds":[],"LogicalType":"Router","Manufacturer":"1141","Manufacturer Name":"","NbEp":"","PowerSource":"Main","ReadAttributes":{"Ep":{"01":{"0000":{"TimeStamp":1680104162,"iSQN":{"0004":"01","0000":"01","0001":"01","0005":"01","0007":"01","fffe":"01"},"Attributes":{},"ZigateRequest":{}}}}},"ReceiveOnIdle":"On","Stack Version":"","Stamp":{"time":1680104231.6411927,"Time":"2023-03-29 17:37:11","MsgType":" 100","LastSeen":1680104231},"ZCL Version":"","Health":"Not Reachable","Capability":["Full-Function Device","Main Powered","Receiver during Idle","Standard security","NwkAddr should be allocated"],"ZCLSQN":"01","ZDPSQN":"06","PairingInProgress":true,"ConsistencyCheck":"Bad Pairing","_rawNodeDescriptor":"1141004200422a00008e424001","Max Buffer Size":"42","Max Rx":"0042","Max Tx":"0042","macapa":"8e","bitfield":"4001","server_mask":"2a00","descriptor_capability":"00","ZCL-IN-SQN":{"e000":"9b","0006":"a0","e001":"9d","000a":"a1"},"RollingLQI":[10,40,36,36,40,40,36,40,40,40],"SQN_000a":"a1"}}
I also get this error from Domoticz log during startup:

Code: Select all

2023-03-29 18:04:57.140 Error: (JSONtoPython) Parse Error on '{ "PluginConf":{ "TimeStamp":1680078311.341207,"b64Settings":{ "filename":"C:\Program Files (x86)\Domoticz\plugins\Domoticz-Zigbee\Conf/PluginConf-15.json","pluginHome":"C:\Program Files (x86)\Domoticz\plugins\Domoticz-Zigbee\","homedirectory":"C:\Program Files (x86)\Domoticz\plugins\Domoticz-Zigbee\","pluginData":"C:\Program Files (x86)\Domoticz\plugins\Domoticz-Zigbee\Data/","pluginConfig":"C:\Program Files (x86)\Domoticz\plugins\Domoticz-Zigbee\Conf/","pluginOTAFirmware":"C:\Program Files (x86)\Domoticz\plugins\Domoticz-Zigbee\OTAFirmware/","pluginReports":"C:\Program Files (x86)\Domoticz\plugins\Domoticz-Zigbee\Reports/","pluginWWW":"C:\Program Files (x86)\Domoticz\plugins\Domoticz-Zigbee\www/","pluginLogs":"C:\Program Files (x86)\Domoticz\plugins\Domoticz-Zigbee\Logs/","expJsonDatabase":0},"Version":1}}'
2023-03-29 18:04:57.140 Error: Zigbee: setConfigItem - Domoticz.Configuration operation failed: ''NoneType' object does not support item assignment'
Any thougts?

Re: Zigbee in Domoticz (win10)

Posted: Thursday 30 March 2023 11:41
by olleman
hehe talk about my own monolougue but hopefully I'm entertaining someone at least :)

I finally got the Girier switch to pair. It seems that just resetting the switch isn't enough. It must have been powerless for at least 10 seconds before resetting and then the paring works. The new addiotion to the plugin also works like a charm and all 4 switches work as expected. Thanks!

However, I still have these error codes in Domoticz, probobly related to my many installations and reinstallations. I'm afraid that those will give me a real life problem sooner or later so any input on these is still much appreciated.

Re: Zigbee in Domoticz (win10)

Posted: Thursday 30 March 2023 13:58
by pipiche
I’ll have a look to the errors, and see what can be done.
Just to summarise you are on Windows and with the develop branche

Ça. You drop the PluginConf-xx.json file here ?

Re: Zigbee in Domoticz (win10)

Posted: Thursday 30 March 2023 14:17
by olleman
pipiche wrote: Thursday 30 March 2023 13:58 I’ll have a look to the errors, and see what can be done.
Just to summarise you are on Windows and with the develop branche

Ça. You drop the PluginConf-xx.json file here ?
Windows 10 with develop branch and python 3.8.9.

The PluginConf_15.json is attached.

Re: Zigbee in Domoticz (win10)

Posted: Thursday 30 March 2023 19:05
by pipiche
In fact this error is coming from Domoticz Python Framework when storing Plugin related data into the Domoticz Database.

Please retrieve the latest plugin version, this is a feature I was starting to enable on develop for test purposes. I disabled it for now, will require more time of investigations.

Re: Zigbee in Domoticz (win10)

Posted: Thursday 30 March 2023 20:08
by olleman
Ok, thanks I will update the plugin.

Re: Zigbee in Domoticz (win10)

Posted: Thursday 30 March 2023 21:43
by pipiche
I think I just found the issue which is due to \ of windows
Will keep you posted ... in between with the latest plugin develop branch you should not have the issue

Re: Zigbee in Domoticz (win10)

Posted: Thursday 30 March 2023 22:07
by olleman
Ok, thanks for keeping me updated.