OpenWRT Zigbee for domoticz plugin

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

Moderator: leecollings

innovateinvent
Posts: 20
Joined: Friday 25 February 2022 7:40
Target OS: Linux
Domoticz version: 2021.1
Contact:

OpenWRT Zigbee for domoticz plugin

Post by innovateinvent »

Hi all, I just bought a SONOFF Zigbee 3.0 USB Dongle Plus, TI CC2652P + CP2102N Zigbee USB Stick

I flashed the most recent firmware: CC1352P2_CC2652P_launchpad_coordinator_20211217
using https://github.com/JelmerT/cc2538-bsl

I plugged it into my TP-Link Archer C7 v2 w. OpenWRT
Installed

Code: Select all

opkg install kmod-usb-serial kmod-usb-serial-cp210x python3 python3-pip

Code: Select all

lsusb 
Bus 001 Device 002: ID 10c4:ea60 ITead Sonoff Zigbee 3.0 USB Dongle Plus
...
the device appears as /dev/ttyUSB0

I then installed domoticz 2021.1 and the Zigbee for domoticz plugin beta6

Code: Select all

pip3 install voluptuous pycrypto aiosqlite crccheck pyusb attr attrs aiohttp pyserial-asyncio
wget https://github.com/openwrt/packages/suites/5428148912/artifacts/171981314 -O mips_24kc-packages.zip  # https://github.com/openwrt/packages/actions/runs/1891867403
gzip -d mips_24kc-packages.zip
opkg install minizip_3.0.2-1_mips_24kc.ipk
opkg install domoticz_2021.1-1_mips_24kc.ipk
cd /etc/domoticz/plugins
git clone --depth 1 -b beta6 https://github.com/zigbeefordomoticz/Domoticz-Zigbee.git
cd Domoticz-Zigbee
git config --add submodule.recurse true
git submodule update --init --recursive
chmod +x plugin.py
restarted the router and browsed to http://router:8080
In the Hardware section I added a "Zigbee for domoticz plugin (zigpy enabled)" entry with
Coordinator Model: Texas Instruments ZNP (via zigpy)
Coordinator Type: USB
Serial Port: /dev/ttyUSB0
WebUI port: 9440
Initialize Coordinator: False

I restarted the router.

The entire Domoticz log is:

Code: Select all

2022-02-24 22:26:53.136 Active notification Subsystems: fcm, http (2/13)
2022-02-24 22:26:53.147 Starting shared server on: :::6144
2022-02-24 22:26:55.151 SONOFF hardware started.
2022-02-24 22:27:26.014 SONOFF: (SONOFF) Zigbee for Domoticz plugin started!
2022-02-24 22:27:26.024 SONOFF: (SONOFF) load PluginConf 
Despite all of this, I can not access http://router:9440
running wget locally on the router for http://localhost:9440 also returns nothing
netstat also does not show the plugin listening on the port

Code: Select all

netstat -tulpn | grep LISTEN
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      2065/uhttpd
tcp        0      0 0.0.0.0:53              0.0.0.0:*               LISTEN      3619/dnsmasq
tcp        0      0 10.0.0.1:22             0.0.0.0:*               LISTEN      2572/dropbear
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      2065/uhttpd
tcp        0      0 :::8080                 :::*                    LISTEN      31648/domoticz
tcp        0      0 :::80                   :::*                    LISTEN      2065/uhttpd
tcp        0      0 :::53                   :::*                    LISTEN      3619/dnsmasq
tcp        0      0 fdb0:9ea7:24fc:10::1:22 :::*                    LISTEN      2572/dropbear
tcp        0      0 :::443                  :::*                    LISTEN      2065/uhttpd
tcp        0      0 :::6144                 :::*                    LISTEN      31648/domoticz
Can anyone tell me how to find debugging information or logs for the plugin?

Thanks
pipiche
Posts: 1977
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: OpenWRT Zigbee for domoticz plugin

Post by pipiche »

You might have a firewall and so you need to open 9440 port


Logs are usually on Logs/ folder under the plugin Domoticz-Zigbee


Envoyé de mon iPhone en utilisant Tapatalk
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
innovateinvent
Posts: 20
Joined: Friday 25 February 2022 7:40
Target OS: Linux
Domoticz version: 2021.1
Contact:

Re: OpenWRT Zigbee for domoticz plugin

Post by innovateinvent »

Thanks, I don't think a firewall will block an application from opening a port. The netstat shows that the port isn't even being listened to.
I haven't done anything for port 8080 and 6144 and those were able to be opened by domoticz without issue.

/etc/domoticz/plugins/Domoticz-Zigbee/Logs/ is empty.
pipiche
Posts: 1977
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: OpenWRT Zigbee for domoticz plugin

Post by pipiche »

Good point, sorry I was using a smart phone and didn't find all infos.

1/the first time you need to start the plugin with the "Initialize Coordinator" parameter set to True

I'm also surprise to see the plugin installed on /etc/domoticz, this looks as a non standard installation, so I have no clue where the logs could be
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
innovateinvent
Posts: 20
Joined: Friday 25 February 2022 7:40
Target OS: Linux
Domoticz version: 2021.1
Contact:

Re: OpenWRT Zigbee for domoticz plugin

Post by innovateinvent »

The openwrt package has a funky init.d script that has symlinks set up in various places: https://github.com/openwrt/packages/blo ... oticz.init
/etc/domoticz/plugins actually points to /usr/share/domoticz/plugins/

I actually initially tried "Initialize Coordinator" parameter set to True, changing it to False to see if that would fix the issue.

Can you think of anything I might try to figure out when the plugin is failing?
pipiche
Posts: 1977
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: OpenWRT Zigbee for domoticz plugin

Post by pipiche »

what are the access right of the Log folder in the Domoticz-Zigbee , makes sure that it is writeable

You must have
Domoticz-Zigbee/Conf
Domoticz-Zigbee/Logs
Domoticz-Zigbee/Data
Domoticz-Zigbee/reports

all writable

The fact that you don't have anything in the Logs folder is suspecious
Last edited by pipiche on Friday 25 February 2022 9:08, edited 1 time in total.
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
pipiche
Posts: 1977
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: OpenWRT Zigbee for domoticz plugin

Post by pipiche »

What do you have in the Domoticz-Zigbee/Conf folder ? do you have somethink like PluginConf-xx.json (where xx is the hardware Id )
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
innovateinvent
Posts: 20
Joined: Friday 25 February 2022 7:40
Target OS: Linux
Domoticz version: 2021.1
Contact:

Re: OpenWRT Zigbee for domoticz plugin

Post by innovateinvent »

OK! First issue down, for some reason the default file permissions on the entire plugin repo only permit user write.

chmod -R ugo+rw * fixed that, and now I have more in the log:

Code: Select all

 2022-02-25 00:19:09.090 Active notification Subsystems: fcm, http (2/13)
2022-02-25 00:19:09.104 Starting shared server on: :::6144
2022-02-25 00:19:11.113 SONOFF hardware started.
2022-02-25 00:19:40.877 SONOFF: (SONOFF) Zigbee for Domoticz plugin started!
2022-02-25 00:19:40.893 SONOFF: (SONOFF) load PluginConf
2022-02-25 00:19:40.921 SONOFF: (SONOFF) is_domoticz_db_available: Fashion: True , Major: 2021, Minor: 1
2022-02-25 00:19:40.922 SONOFF: (SONOFF) is_domoticz_db_available: True
2022-02-25 00:19:40.945 SONOFF: (SONOFF) Starting LoggingManagement thread
2022-02-25 00:19:40.949 SONOFF: (SONOFF) start_logging_thread
2022-02-25 00:19:40.954 SONOFF: (SONOFF) logging_thread - listening
2022-02-25 00:19:43.854 SONOFF: (SONOFF) is_domoticz_db_available: Fashion: True , Major: 2021, Minor: 1
2022-02-25 00:19:43.860 SONOFF: (SONOFF) is_domoticz_db_available: True 

Code: Select all

cat Conf/PluginConf-02.json 
{
  "filename": "/var/lib/domoticz/plugins/Domoticz-Zigbee/Conf/PluginConf-02.json",
  "homedirectory": "/var/lib/domoticz/plugins/Domoticz-Zigbee/",
  "pluginConfig": "/var/lib/domoticz/plugins/Domoticz-Zigbee/Conf/",
  "pluginData": "/var/lib/domoticz/plugins/Domoticz-Zigbee/Data/",
  "pluginHome": "/var/lib/domoticz/plugins/Domoticz-Zigbee/",
  "pluginLogs": "/var/lib/domoticz/plugins/Domoticz-Zigbee/Logs/",
  "pluginOTAFirmware": "/var/lib/domoticz/plugins/Domoticz-Zigbee/OTAFirmware/",
  "pluginReports": "/var/lib/domoticz/plugins/Domoticz-Zigbee/Reports/",
  "pluginWWW": "/var/lib/domoticz/plugins/Domoticz-Zigbee/www/"
}
I am also seeing new files in the Log folder:

Code: Select all

cat Logs/PluginZigbee_02.log 
2022-02-25 00:19:41,006 INFO    : [       MainThread] Zigate plugin beta6-6.0.114 started
2022-02-25 00:19:41,384 INFO    : [       MainThread] Plugin Database: DeviceList-2.txt
2022-02-25 00:19:41,466 INFO    : [       MainThread] DeviceConf loaded - 23 confs loaded
2022-02-25 00:19:43,858 INFO    : [       MainThread] DeviceConf loaded - 329 confs loaded
2022-02-25 00:19:43,875 INFO    : [       MainThread] load ListOfDevice
2022-02-25 00:19:43,955 INFO    : [       MainThread] Transport mode: ZigpyZNP
2022-02-25 00:20:45,074 ERROR   : [       MainThread] [ 61] I have hard time to get Coordinator Version. Mostlikly there is a communication issue
2022-02-25 00:20:45,084 ERROR   : [       MainThread] [   ] Stop the plugin and check the Coordinator connectivity.
Still can't access http://router:9440
pipiche
Posts: 1977
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: OpenWRT Zigbee for domoticz plugin

Post by pipiche »

Can you try Initialize Coordinator" parameter set to True ?
What the netstat says ? still no listen on 9440 ?
Is that the all Domoticz log and Plugin log you have ?
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
innovateinvent
Posts: 20
Joined: Friday 25 February 2022 7:40
Target OS: Linux
Domoticz version: 2021.1
Contact:

Re: OpenWRT Zigbee for domoticz plugin

Post by innovateinvent »

Initialize Coordinator is currently set to True
No change to netstat output
Domoticz log is posted completely, plugin log is truncated with the last two lines repeating hundereds of times.
pipiche
Posts: 1977
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: OpenWRT Zigbee for domoticz plugin

Post by pipiche »

Can the WRT environment prevent the plugin to create a Socket ?
This is really strange that they were no error when the access write were not correct, and here nothing more !
In the Domoticz Hardware menu to you have all Log Level enabled ?
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
pipiche
Posts: 1977
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: OpenWRT Zigbee for domoticz plugin

Post by pipiche »

Would it be possible to get a remote access ?
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
innovateinvent
Posts: 20
Joined: Friday 25 February 2022 7:40
Target OS: Linux
Domoticz version: 2021.1
Contact:

Re: OpenWRT Zigbee for domoticz plugin

Post by innovateinvent »

OK again!

chmod o+rw /dev/ttyUSB0 was the issue

Code: Select all

 2022-02-25 00:43:33.431 Active notification Subsystems: fcm, http (2/13)
2022-02-25 00:43:33.443 Starting shared server on: :::6144
2022-02-25 00:43:35.446 SONOFF hardware started.
2022-02-25 00:44:05.289 SONOFF: (SONOFF) Zigbee for Domoticz plugin started!
2022-02-25 00:44:05.299 SONOFF: (SONOFF) load PluginConf
2022-02-25 00:44:05.309 SONOFF: (SONOFF) is_domoticz_db_available: Fashion: True , Major: 2021, Minor: 1
2022-02-25 00:44:05.309 SONOFF: (SONOFF) is_domoticz_db_available: True
2022-02-25 00:44:05.312 SONOFF: (SONOFF) /var/lib/domoticz/plugins/Domoticz-Zigbee/Conf/PluginConf-02.json timestamp is 1645777180.918835
2022-02-25 00:44:05.313 SONOFF: (SONOFF) Dz PluginConf is older than Json Dz: 0 Json: 1645777180.918835
2022-02-25 00:44:05.315 SONOFF: (SONOFF) is_domoticz_db_available: Fashion: True , Major: 2021, Minor: 1
2022-02-25 00:44:05.316 SONOFF: (SONOFF) is_domoticz_db_available: True
2022-02-25 00:44:05.328 SONOFF: (SONOFF) Starting LoggingManagement thread
2022-02-25 00:44:05.332 SONOFF: (SONOFF) start_logging_thread
2022-02-25 00:44:05.336 SONOFF: (SONOFF) logging_thread - listening
2022-02-25 00:44:07.612 SONOFF: (SONOFF) is_domoticz_db_available: Fashion: True , Major: 2021, Minor: 1
2022-02-25 00:44:07.612 SONOFF: (SONOFF) is_domoticz_db_available: True
2022-02-25 00:44:07.732 SONOFF: (SONOFF) is_domoticz_db_available: Fashion: True , Major: 2021, Minor: 1
2022-02-25 00:44:07.733 SONOFF: (SONOFF) is_domoticz_db_available: True 

Code: Select all

cat Logs/PluginZigbee_02.log 
2022-02-25 00:44:05,384 INFO    : [       MainThread] Zigate plugin beta6-6.0.114 started
2022-02-25 00:44:05,583 INFO    : [       MainThread] Plugin Database: DeviceList-2.txt
2022-02-25 00:44:05,666 INFO    : [       MainThread] DeviceConf loaded - 23 confs loaded
2022-02-25 00:44:07,616 INFO    : [       MainThread] DeviceConf loaded - 329 confs loaded
2022-02-25 00:44:07,621 INFO    : [       MainThread] load ListOfDevice
2022-02-25 00:44:07,739 INFO    : [       MainThread] 0 Entries loaded from /var/lib/domoticz/plugins/Domoticz-Zigbee/Data/DeviceList-2.txt
2022-02-25 00:44:07,753 INFO    : [       MainThread] Transport mode: ZigpyZNP
still no change on netcat

Code: Select all

netstat -tulpn | grep LISTEN
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      2065/uhttpd
tcp        0      0 0.0.0.0:53              0.0.0.0:*               LISTEN      3619/dnsmasq
tcp        0      0 10.0.0.1:22             0.0.0.0:*               LISTEN      2572/dropbear
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      2065/uhttpd
tcp        0      0 :::8080                 :::*                    LISTEN      14010/domoticz
tcp        0      0 :::80                   :::*                    LISTEN      2065/uhttpd
tcp        0      0 :::53                   :::*                    LISTEN      3619/dnsmasq
tcp        0      0 fdb0:9ea7:24fc:10::1:22 :::*                    LISTEN      2572/dropbear
tcp        0      0 :::443                  :::*                    LISTEN      2065/uhttpd
tcp        0      0 :::6144                 :::*                    LISTEN      14010/domoticz
Remote access would be difficult, the router is set up to only allow ssh from internal ips.
pipiche
Posts: 1977
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: OpenWRT Zigbee for domoticz plugin

Post by pipiche »

Here are some expected logs (taken on my system). This doesn't looks similar on yours

Code: Select all

Feb 25 08:50:18 pi4 domoticz[16418]: Zigbee SonOff: Please watch plugin log into /home/domoticz/domoticz/plugins/Domoticz-Zigbee/Logs//PluginZigbee_02.log
Feb 25 08:50:18 pi4 domoticz[16418]: Zigbee SonOff: Zigate plugin beta6-6.0.115 started
Feb 25 08:50:18 pi4 domoticz[16418]: Zigbee SonOff: DeviceConf loaded - 23 confs loaded
Feb 25 08:50:18 pi4 domoticz[16418]: Zigbee SonOff: is_domoticz_db_available: Fashion: True , Major: 2022, Minor: 1
Feb 25 08:50:18 pi4 domoticz[16418]: Zigbee SonOff: is_domoticz_db_available: True
Feb 25 08:50:18 pi4 domoticz[16418]: Zigbee SonOff: DeviceConf loaded - 329 confs loaded
Feb 25 08:50:18 pi4 domoticz[16418]: Zigbee SonOff: load ListOfDevice
Feb 25 08:50:18 pi4 domoticz[16418]: Zigbee SonOff: is_domoticz_db_available: Fashion: True , Major: 2022, Minor: 1
Feb 25 08:50:18 pi4 domoticz[16418]: Zigbee SonOff: is_domoticz_db_available: True
Feb 25 08:50:18 pi4 domoticz[16418]: Zigbee SonOff: 19 Entries loaded from /home/domoticz/domoticz/plugins/Domoticz-Zigbee/Data/DeviceList-2.txt
Feb 25 08:50:18 pi4 domoticz[16418]: Zigbee SonOff: Transport mode: ZigpyZNP
Feb 25 08:50:19 pi4 domoticz[16418]: pi4 monitor: Temp (Internal Temperature)
Feb 25 08:50:19 pi4 domoticz[16418]: Zigbee SonOff: Start Zigpy Transport on ZNP
Feb 25 08:50:19 pi4 domoticz[16418]: Zigbee SonOff: ZigpyTransport: thread_processing_and_sending Thread start.
Feb 25 08:50:19 pi4 domoticz[16418]: Zigbee SonOff: Start Web Server connection
Feb 25 08:50:19 pi4 domoticz[16418]: Zigbee SonOff: Web backend for Web User Interface started on port: 9440
Feb 25 08:50:28 pi4 domoticz[16418]: Zigbee SonOff: Accepting new Hardware: Disable (Off)
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
pipiche
Posts: 1977
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: OpenWRT Zigbee for domoticz plugin

Post by pipiche »

you can try to edit Conf/PluginConf-02.json and add the following lines

Code: Select all

  "debugTransportZigpy": 1,
  "debugTransportZigpyZNP": 1,
  "ControllerInRawMode": 1,
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
innovateinvent
Posts: 20
Joined: Friday 25 February 2022 7:40
Target OS: Linux
Domoticz version: 2021.1
Contact:

Re: OpenWRT Zigbee for domoticz plugin

Post by innovateinvent »

I have cleaned up a few things now that I have a sense of what is happening.

Domoticz is being executed under the 'domoticz' user by the init.d script.
So I have chown -R domoticz:domoticz * the plugin folder.
I have also added domoticz to the 'dialout' group that owns /dev/ttyUSB0 via usermod -a -G dialout domoticz

I am back to getting the connection error:

Code: Select all

cat Logs/PluginZigbee_02.log
2022-02-25 00:57:41,075 INFO    : [       MainThread] Zigate plugin beta6-6.0.114 started
2022-02-25 00:57:41,278 INFO    : [       MainThread] Plugin Database: DeviceList-2.txt
2022-02-25 00:57:41,361 INFO    : [       MainThread] DeviceConf loaded - 23 confs loaded
2022-02-25 00:57:43,300 INFO    : [       MainThread] DeviceConf loaded - 329 confs loaded
2022-02-25 00:57:43,312 INFO    : [       MainThread] load ListOfDevice
2022-02-25 00:57:43,425 INFO    : [       MainThread] 0 Entries loaded from /var/lib/domoticz/plugins/Domoticz-Zigbee/Data/DeviceList-2.txt
2022-02-25 00:57:43,439 INFO    : [       MainThread] Transport mode: ZigpyZNP
2022-02-25 00:58:45,074 ERROR   : [       MainThread] [ 61] I have hard time to get Coordinator Version. Mostlikly there is a communication issue
2022-02-25 00:58:45,361 ERROR   : [       MainThread] [   ] Stop the plugin and check the Coordinator connectivity.
...
it is likely that the connection error never was resolved and I just did not wait long enough for it to be printed to the log.
pipiche
Posts: 1977
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: OpenWRT Zigbee for domoticz plugin

Post by pipiche »

Did you try to add the 3 parameters in the Conf json file ?
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
innovateinvent
Posts: 20
Joined: Friday 25 February 2022 7:40
Target OS: Linux
Domoticz version: 2021.1
Contact:

Re: OpenWRT Zigbee for domoticz plugin

Post by innovateinvent »

I just did that now and restarted.

Code: Select all

 2022-02-25 01:11:15.730 Active notification Subsystems: fcm, http (2/13)
2022-02-25 01:11:15.742 Starting shared server on: :::6144
2022-02-25 01:11:17.745 SONOFF hardware started.
2022-02-25 01:11:47.436 SONOFF: (SONOFF) Zigbee for Domoticz plugin started!
2022-02-25 01:11:47.446 SONOFF: (SONOFF) load PluginConf
2022-02-25 01:11:47.455 SONOFF: (SONOFF) is_domoticz_db_available: Fashion: True , Major: 2021, Minor: 1
2022-02-25 01:11:47.456 SONOFF: (SONOFF) is_domoticz_db_available: True
2022-02-25 01:11:47.459 SONOFF: (SONOFF) /var/lib/domoticz/plugins/Domoticz-Zigbee/Conf/PluginConf-02.json timestamp is 1645780010.2074208
2022-02-25 01:11:47.460 SONOFF: (SONOFF) Dz PluginConf is older than Json Dz: 0 Json: 1645780010.2074208
2022-02-25 01:11:47.462 SONOFF: (SONOFF) is_domoticz_db_available: Fashion: True , Major: 2021, Minor: 1
2022-02-25 01:11:47.463 SONOFF: (SONOFF) is_domoticz_db_available: True
2022-02-25 01:11:47.475 SONOFF: (SONOFF) Starting LoggingManagement thread
2022-02-25 01:11:47.478 SONOFF: (SONOFF) start_logging_thread
2022-02-25 01:11:47.483 SONOFF: (SONOFF) logging_thread - listening
2022-02-25 01:11:49.606 SONOFF: (SONOFF) is_domoticz_db_available: Fashion: True , Major: 2021, Minor: 1
2022-02-25 01:11:49.607 SONOFF: (SONOFF) is_domoticz_db_available: True
2022-02-25 01:11:49.722 SONOFF: (SONOFF) is_domoticz_db_available: Fashion: True , Major: 2021, Minor: 1
2022-02-25 01:11:49.723 SONOFF: (SONOFF) is_domoticz_db_available: True 
The connection error takes a second to start showing up, but it is still occuring.

Code: Select all

2022-02-25 01:11:47,535 INFO    : [       MainThread] Zigate plugin beta6-6.0.114 started
2022-02-25 01:11:47,733 INFO    : [       MainThread] Plugin Database: DeviceList-2.txt
2022-02-25 01:11:47,816 INFO    : [       MainThread] DeviceConf loaded - 23 confs loaded
2022-02-25 01:11:49,602 INFO    : [       MainThread] DeviceConf loaded - 329 confs loaded
2022-02-25 01:11:49,611 INFO    : [       MainThread] load ListOfDevice
2022-02-25 01:11:49,728 INFO    : [       MainThread] 0 Entries loaded from /var/lib/domoticz/plugins/Domoticz-Zigbee/Data/DeviceList-2.txt
2022-02-25 01:11:49,746 INFO    : [       MainThread] Transport mode: ZigpyZNP
2022-02-25 01:12:51,090 ERROR   : [       MainThread] [ 61] I have hard time to get Coordinator Version. Mostlikly there is a communication issue
2022-02-25 01:12:51,247 ERROR   : [       MainThread] [   ] Stop the plugin and check the Coordinator connectivity.
I just rebooted the router, but no change..
pipiche
Posts: 1977
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: OpenWRT Zigbee for domoticz plugin

Post by pipiche »

This looks like no communication With the

Code: Select all

  "debugTransportZigpy": 1,
  "debugTransportZigpyZNP": 1,
we should get much more in the Logs/PluginZigbee.log file

Just wonder if this is not a firmware issue

Could you confirm that the firmware is coming from here ?
https://github.com/Koenkk/Z-Stack-firmw ... _3.x.0/bin

Can you test the following
1/ stop domoticz
2/ run those tools

Code: Select all

python -m zigpy_znp.tools.network_scan -a -c 11 /dev/ttyUSB0

Code: Select all

python -m zigpy_znp.tools.energy_scan /dev/ttyUSBO
Here is we are going to test without the plugin. So it will reduce the place where the issue could be .
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
innovateinvent
Posts: 20
Joined: Friday 25 February 2022 7:40
Target OS: Linux
Domoticz version: 2021.1
Contact:

Re: OpenWRT Zigbee for domoticz plugin

Post by innovateinvent »

Thanks, those commands exposed issues with the python dependency install.

Code: Select all

pip3 install voluptuous pycrypto aiosqlite crccheck pyusb attr attrs aiohttp pyserial-asyncio
pycrypto can't be installed to OpenWRT due to required system packages missing and unavailable.

For other dependencies listed, pip actually runs out of RAM (120Mb total) before succeeding. I will need to find a way to load these libraries.

I guess python exceptions are not logged to the Domoticz log? Is there a different log for those?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest