Getting Sonoff 3.0 USB dongle plus to work with Zigbee for Domoticz plugin

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

Moderator: leecollings

Post Reply
lostodos
Posts: 35
Joined: Saturday 10 October 2020 1:02
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Getting Sonoff 3.0 USB dongle plus to work with Zigbee for Domoticz plugin

Post by lostodos »

Hello all,

I have purchased the Sonoff 3.0 USB Dongle Plus (TI cc2652p chip) and I am trying to get it to work with my current Domoticz setup. I have a PiZigate+ v2 in my Raspberry Pi and have following versions of software:

- Domoticz Version: 2023.1 (build 15182)
- Zigate-plugin: version 6.3.012

When i check the logs in Domoticz i see following:

--------------------------
2023-04-16 21:24:26.839 Error: TI-Zigbee-dongle: Call to function 'onStart' failed, exception details:
2023-04-16 21:24:26.843 Error: TI-Zigbee-dongle: Traceback (most recent call last):
2023-04-16 21:24:26.843 Error: TI-Zigbee-dongle: File "/home/pi/domoticz/plugins/Domoticz-Zigbee/plugin.py", line 1537, in onStart
2023-04-16 21:24:26.843 Error: TI-Zigbee-dongle: _plugin.onStart()
2023-04-16 21:24:26.843 Error: TI-Zigbee-dongle: File "/home/pi/domoticz/plugins/Domoticz-Zigbee/plugin.py", line 571, in onStart
2023-04-16 21:24:26.843 Error: TI-Zigbee-dongle: import zigpy
2023-04-16 21:24:26.843 Error: TI-Zigbee-dongle: ModuleNotFoundError: No module named 'zigpy'
2023-04-16 21:26:25.089 Error: TI-Zigbee-dongle: [120] I have hard time to get Coordinator Version. Mostlikly there is a communication issue
2023-04-16 21:26:35.062 Error: TI-Zigbee-dongle: [130] I have hard time to get Coordinator Version. Mostlikly there is a communication issue
2023-04-16 21:26:45.084 Error: TI-Zigbee-dongle: [140] I have hard time to get Coordinator Version. Mostlikly there is a communication issue
2023-04-16 21:26:55.104 Error: TI-Zigbee-dongle: [150] I have hard time to get Coordinator Version. Mostlikly there is a communication issue
2023-04-16 21:27:05.092 Error: TI-Zigbee-dongle: [160] I have hard time to get Coordinator Version. Mostlikly there is a communication issue
--------------------------

Could this problem be caused by the PiZigate that is running? My goal is to get the Sonoff working so i can move Zigbee devices from PiZigate to the Sonoff coördinator (and eventually take out the PiZigate).

Thanks for the help!

Regards,

Mark
mce35
Posts: 5
Joined: Monday 17 April 2023 22:15
Target OS: Linux
Domoticz version:
Contact:

Re: Getting Sonoff 3 USB dongle plus to work with Zigbee for Domoticz plugin

Post by mce35 »

Hello,

The issue is that the plugin is not able to find the zigpy module.
From the plugin directory, you can try to run

Code: Select all

git submodule update --init --recursive
It should fetch the different submodules including zigpy.

I guess you are trying to create a second hardware to use the Sonoff dongle, which means it will create new widgets in domoticz.

I switched from an USB Zigate v2 to a Sonoff dongle recently and I just reconfigured the plugin to use it so that the same widgets are used in domoticz, no loss of history data (but of course I had to recreate the zigbee network and pair all objects again to the new coordinator).
lostodos
Posts: 35
Joined: Saturday 10 October 2020 1:02
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Getting Sonoff 3.0 USB dongle plus to work with Zigbee for Domoticz plugin

Post by lostodos »

Hi,

Thank you for the reply! That is very interesting! So if i understand you correctly I should follow these steps:

1. Shutdown Pi and remove the PiZigate module
2. Switch on the Pi and plug in the Sonoff USB dongle
3. Reconfigure the Plugin to use the Sonoff instead of the PiZigate
4. Pair the Zigbee devices with the Sonoff coördinator

And then all the widgets should still be in place with their original ID in Domoticz?

Kind regards,

Mark
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Getting Sonoff 3.0 USB dongle plus to work with Zigbee for Domoticz plugin

Post by waltervl »

lostodos wrote: Tuesday 18 April 2023 17:52 Hi,

Thank you for the reply! That is very interesting! So if i understand you correctly I should follow these steps:

1. Shutdown Pi and remove the PiZigate module
2. Switch on the Pi and plug in the Sonoff USB dongle
3. Reconfigure the Plugin to use the Sonoff instead of the PiZigate
4. Pair the Zigbee devices with the Sonoff coördinator

And then all the widgets should still be in place with their original ID in Domoticz?

Kind regards,

Mark
That is how I moved from Zigate to Sonoff. Yes device widgets and history remain in Domoticz and the devices keep being updated.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
lostodos
Posts: 35
Joined: Saturday 10 October 2020 1:02
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Getting Sonoff 3.0 USB dongle plus to work with Zigbee for Domoticz plugin

Post by lostodos »

Hello everyone,

Finally had some time today to move ahead with this and to try the suggestions. I have only one plugin configured on the pi now (on the PiZigate+) and today i removed the PiZigate+ module and added the Sonoff USB dongle +. I changed the settings in the Zigbee for Domoticz plugin to the USB port of the Sonoff TI USB dongle but still got the error messages below. I cannot get it to work.

-----
Status log:

2023-04-23 15:41:30.076 Status: Zigate-plugin: Plugin Restart command : http://127.0.0.1:8080/json.htm?type=com ... loglevel=7
2023-04-23 15:41:30.124 Status: Zigate-plugin: Stop directive received.
2023-04-23 15:41:30.287 Status: Zigate-plugin: Exiting work loop.
2023-04-23 15:41:30.324 Status: Zigate-plugin: Stopping threads.
2023-04-23 15:41:30.324 Status: Zigate-plugin: Stopped.
2023-04-23 15:41:30.324 Status: Zigate-plugin: Entering work loop.
2023-04-23 15:41:30.324 Status: Zigate-plugin: Started.
2023-04-23 15:41:31.398 Status: Zigate-plugin: Initialized version 6.3, author 'pipiche38'
2023-04-23 15:41:31.408 Status: Zigate-plugin: Zigbee for Domoticz plugin started!
2023-04-23 15:41:31.408 Status: Zigate-plugin: Python3 requires 3.8 or above and you are running 3.9
2023-04-23 15:41:31.408 Status: Zigate-plugin: Checking Python modules /home/pi/domoticz/plugins/Domoticz-Zigbee/requirements.txt
2023-04-23 15:41:31.920 Status: Zigate-plugin: Checking Python modules /home/pi/domoticz/plugins/Domoticz-Zigbee/requirements.txt
2023-04-23 15:41:31.996 Status: Zigate-plugin: enablegroupmanagement set to 1
2023-04-23 15:41:31.996 Status: Zigate-plugin: PluginAnalytics set to 1
2023-04-23 15:41:31.996 Status: Zigate-plugin: GroupOnBattery set to 1
2023-04-23 15:41:31.996 Status: Zigate-plugin: zigatePartOfGroup0000 set to 1
2023-04-23 15:41:31.996 Status: Zigate-plugin: autoServeOTA set to 1
2023-04-23 15:41:31.996 Status: Zigate-plugin: pingDevicesFeq set to 600
2023-04-23 15:41:31.996 Status: Zigate-plugin: channel set to 11
2023-04-23 15:41:31.996 Status: Zigate-plugin: filename set to /home/pi/domoticz/plugins/Domoticz-Zigbee/Conf/PluginConf-21.json
2023-04-23 15:41:31.996 Status: Zigate-plugin: pluginHome set to /home/pi/domoticz/plugins/Domoticz-Zigbee/
2023-04-23 15:41:31.996 Status: Zigate-plugin: homedirectory set to /home/pi/domoticz/plugins/Domoticz-Zigbee/
2023-04-23 15:41:31.996 Status: Zigate-plugin: pluginData set to /home/pi/domoticz/plugins/Domoticz-Zigbee/Data/
2023-04-23 15:41:31.996 Status: Zigate-plugin: pluginConfig set to /home/pi/domoticz/plugins/Domoticz-Zigbee/Conf/
2023-04-23 15:41:31.996 Status: Zigate-plugin: pluginOTAFirmware set to /home/pi/domoticz/plugins/Domoticz-Zigbee/OTAFirmware/
2023-04-23 15:41:31.996 Status: Zigate-plugin: pluginReports set to /home/pi/domoticz/plugins/Domoticz-Zigbee/Reports/
2023-04-23 15:41:31.996 Status: Zigate-plugin: pluginWWW set to /home/pi/domoticz/plugins/Domoticz-Zigbee/www/
2023-04-23 15:41:31.996 Status: Zigate-plugin: pluginLogs set to /home/pi/domoticz/plugins/Domoticz-Zigbee/Logs/
2023-04-23 15:41:31.999 Status: Zigate-plugin: Please watch plugin log into /home/pi/domoticz/plugins/Domoticz-Zigbee/Logs//PluginZigbee_21.log
2023-04-23 15:41:32.008 Status: Zigate-plugin: Zigbee for Domoticz (z4d) plugin stable6-6.3.012 started
2023-04-23 15:41:32.025 Status: Zigate-plugin: DeviceConf loaded - 17 confs loaded
2023-04-23 15:41:32.189 Status: Zigate-plugin: DeviceConf loaded - 439 confs loaded
2023-04-23 15:41:32.189 Status: Zigate-plugin: load ListOfDevice
2023-04-23 15:41:32.381 Status: Zigate-plugin: 24 Entries loaded from /home/pi/domoticz/plugins/Domoticz-Zigbee/Data/DeviceList-21.txt
2023-04-23 15:41:32.419 Status: Zigate-plugin: Transport mode: ZigpyZNP

----
Error log:

2023-04-23 15:41:32.420 Error: Zigate-plugin: Call to function 'onStart' failed, exception details:
2023-04-23 15:41:32.421 Error: Zigate-plugin: Traceback (most recent call last):
2023-04-23 15:41:32.421 Error: Zigate-plugin: File "/home/pi/domoticz/plugins/Domoticz-Zigbee/plugin.py", line 1537, in onStart
2023-04-23 15:41:32.421 Error: Zigate-plugin: _plugin.onStart()
2023-04-23 15:41:32.421 Error: Zigate-plugin: File "/home/pi/domoticz/plugins/Domoticz-Zigbee/plugin.py", line 571, in onStart
2023-04-23 15:41:32.421 Error: Zigate-plugin: import zigpy
2023-04-23 15:41:32.421 Error: Zigate-plugin: ModuleNotFoundError: No module named 'zigpy'
2023-04-23 15:43:31.108 Error: Zigate-plugin: [120] I have hard time to get Coordinator Version. Mostlikly there is a communication issue
2023-04-23 15:43:41.084 Error: Zigate-plugin: [130] I have hard time to get Coordinator Version. Mostlikly there is a communication issue
2023-04-23 15:43:51.100 Error: Zigate-plugin: [140] I have hard time to get Coordinator Version. Mostlikly there is a communication issue
2023-04-23 15:44:01.067 Error: Zigate-plugin: [150] I have hard time to get Coordinator Version. Mostlikly there is a communication issue
2023-04-23 15:44:11.085 Error: Zigate-plugin: [160] I have hard time to get Coordinator Version. Mostlikly there is a communication issue
-----

Does anyone know what this means exactly and where to look to solve it?

Thanks!

Kind regards,

Mark
lostodos
Posts: 35
Joined: Saturday 10 October 2020 1:02
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Getting Sonoff 3.0 USB dongle plus to work with Zigbee for Domoticz plugin

Post by lostodos »

Hi all,

Been testing with a spare Pi 3B that i had laying around and installed Domoticz and plugin from scratch. Used the online installation manuals that can be found (well documented by the way!) and found that the Sonoff is working on the spare Pi. I did notice following instruction on the online documentation:

git submodule update --init --recursive

Since i have been moving from older versions of the pugin I must have skipped that step somewhere along the way. Anyway, performed this step on my production system and now the error is gone and the Sonoff USB device is initializing.

Going to try to migrate from the PiZigate to the Sonoff USB tomorrow!

Regards,

Mark
lostodos
Posts: 35
Joined: Saturday 10 October 2020 1:02
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Getting Sonoff 3.0 USB dongle plus to work with Zigbee for Domoticz plugin

Post by lostodos »

Just a quick update. Removed the PiZigate and using the Sonoff USB dongle now, everything worked as mentioned above (only needed to pair al devices with the Sonoff)!

Thanks for the help!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests