OpenWRT Zigbee for domoticz plugin

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

Moderator: leecollings

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 »

The Python exception are usually logged to the Domoticz log.
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 would have expected that these import exceptions would be logged somewhere. Perhaps the exceptions are happening too early in the stack to make it in 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 »

Have you been able to sorted out your issue ? Anything we can do to help you ?
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 still haven't figured out how to get around not enough ram to install anything via pip. I was looking at moving this project to an old laptop but it needs a lot of love before I can use it.
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 »

I have put the request here https://github.com/zigpy/zigpy/discussions/931 , as we rely on the zigpy library, may be the guys will get some ideas to help you in the direction to take.
Having OpenWRT supported would be great
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 got it!

The magic sauce was installing the following:

Code: Select all

opkg install python3 python3-pip python3-voluptuous python3-cryptodome python3-attrs python3-aiohttp python3-jsonschema
pip install aiosqlite crccheck pyusb pyserial-asyncio coloredlogs
It now works, I just need to muck around with trying to pair my ikea devices. They are struggling...
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 »

That is cool. congratulations.

If by chance you would be willing to document the setup for OpenWRT, we would be really pleased to make it available on our Wiki
https://github.com/zigbeefordomoticz/wiki
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 »

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 am having issues with pairing any device, I am not sure if this is still related:

Code: Select all

"Module":"Input","nwkid":"9959","PluginHealth":"Ready","message":"Something wrong on Device 9959 97da43feff27fd84 pairing process. (aborting)","PermitToJoin":{"Duration":0,"Starttime":1647119112},"Thread":"ZigpyForwarder_2"},"LastLog":0,"StartTime":"12/03/2022 12:58:36","FirmwareVersion":"1217","FirmwareMajorVersion":"21","PluginVersion":"beta6-6.0.114"}

Code: Select all

 2022-03-12 13:04:49.605 SONOFF: (SONOFF) Assisted Pairing: Polling: ['61e0']
2022-03-12 13:04:49.612 SONOFF: (SONOFF) --> New device: 61e0
2022-03-12 13:04:49.612 SONOFF: (SONOFF) --> UNKNOW , removed 61e0 from List
2022-03-12 13:04:49.614 SONOFF: (SONOFF) --> New Device: {'NwkId': '61e0', 'ProvisionStatus': 'Failed', 'ProvisionStatusDesc': 'Failed', 'IEEE': '97da43feff27fd84', 'ProfileId': '', 'ProfileIdDesc': 'Unknow', 'ZDeviceID': '', 'ZDeviceIDDesc': 'Unknow', 'Model': '', 'PluginCertified': 'Unknow', 'Ep': []}
2022-03-12 13:04:59.573 SONOFF: (SONOFF) Assisted Pairing: Polling: []
2022-03-12 13:04:59.579 SONOFF: (SONOFF) --> Empty queue 
Do you know what this could be due to?
I tried pairing a Tradfri plug and switch.
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 type/brand ?


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 »

I have tried both a IKEA Tradfri E1743 switch and a IKEA Tradfri E1706 plug

I also tried enabling groups and creating group0000 in the settings, no effect.

https://www-twoenter-nl.translate.goog/ ... r_pto=wapp
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 »

No need for group at first.
Is the sonoff key closed to the system ? Can you try to put a usb cable ?

Can you try to enable

debugPairing
debugInput
debugZigpyZNP

Try pairing. And then drop me the logs here


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 »

Code: Select all

{
  "ControllerInRawMode": true,
  "PluginAnalytics": 1,
  "channel": "15",
  "debugInput": 1,
  "debugPairing": 1,
  "debugTransportZigpy": 1,
  "debugTransportZigpyZNP": 1,
  "enablegroupmanagement": 1,
  "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/",
  "zigatePartOfGroup0000": 1
}
https://gist.github.com/innovate-invent ... -log-L6108

The dongle is on a usb cable away from the router and the plug/switch is beside the dongle.
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 »

From what I quickly see in the logs is that the Device Announced itself, the pairing process started, and then few seconds later the device send a Leave message and leave the network.

Can you tell me how you do the pairing ? and especially the device reset ( switch or plug ) ?
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 again for all this help.

I click on "Pairing" under "Pairing a new device with the assitant" and then a moment later I tap the reset button on the switch 4 times. The LED starts pulsing and then I leave it beside the SONOFF until I see the error on the popup window.

For the plug I do the same thing but press and hold the reset until the LED pulses. I also have it on an extension cord sitting beside the SONOFF.
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 »

so the all pairing looks good, and really don't understand what is going on.

Would you have any mean to sniff the zigbee traffic to undersstand what is happening ?
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 don't have anything other than the SONOFF for sniffing. I actually just noticed that there are other devices in my neighbourhood that are being picked up when I scan.
There is even this random RGB dimmer that I now have the option to add in the main Domoticz devices menu.

The issue must be limited to IKEA Tradfri devices. I'll see if I can dig around some more about others who have worked with this brand.
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 »

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 »

I'm not sure I really understood the issue there, as from your setup, the SonOff key is already on the USB cable (just avoid USB 3.0) port.

Then in your case the extendedPANID seems to be correct (basically random number at initialisation) from the log extendedPANID=00:12:4b:00:24:c9:17:11
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 »

How are you doing ? Did you solve your issue ?

Just had a user having a similar issue, it was due to the fact that the Coordinator was plugged on a USB HUB. He just move it to a direct USB port with a USB cable and all works fine
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
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests