How? - Sonoff Zigbee 3.0 USB Dongle Plus

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

Moderator: leecollings

Furry
Posts: 31
Joined: Sunday 19 February 2017 15:03
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: UK
Contact:

How? - Sonoff Zigbee 3.0 USB Dongle Plus

Post by Furry »

Hi,

I am trying to use this dongle, but after trawling threads on here, and lots of alternative methods on the Internet, I have become confused about what I actually need to do.

I am running Domoticz 2022.2 on RPi3, and for Zwave I have installed:

Mosquitto MQTT broker v2.0.11
MQTT Auto Discovery Client Gateway with LAN Interface
MQTT Client Gateway with LAN Interface
ZwaveJS2MQTT
Zwave-JS-UI

For Zigbee, I have installed:
Zigbee2MQTT v3.2.0-beta

I am also using MQTT Explorer.

The Domoticz log says "Zigbee2MQTT: Connected to MQTT service: localhost 1883"
In Setup/Devices, I see the Zigbee2MQTT api_transport ..., which I have also added using Add Device.

All is working well with zwave, but what more do I need to do to use the Sonoff Zigbee dongle?

Also, I've seen reference to a Zigbee2MQTT 'front end', but I can't work out how any of the configuration for that relates to my installation - does my installation have it? How to set the port number? (to something other than 8080?).

TIA
Raspberry Pi 3; Domoticz 2022.2
Philips Hue, Logitech Harmony Elite, LMS, Drayton Wiser
Rfxtrx433e and Owl CM11x
Aeon Z-Stick Gen 5
Dark Skies
pipiche
Posts: 1977
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: How? - Sonoff Zigbee 3.0 USB Dongle Plus

Post by pipiche »

You can use the Zigbee for Domoticz plugin which doesn't bring any additional layer


https://github.com/zigbeefordomoticz/Domoticz-Zigbee

and you can check the Wiki for installation here: https://zigbeefordomoticz.github.io/wik ... ation.html
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
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: How? - Sonoff Zigbee 3.0 USB Dongle Plus

Post by waltervl »

In your environment the zigbee Sonoff USB should connect to Zigbee2MQTT (see the zigbee2mqtt documentation how to) and Zigbee2MQTT should connect to Domoticz MQTT Autodiscover. You can setup a second MQTT Autodiscover gateway to differ from the ZWave-JS-UI.
If you want that you have to change in Zigbee2MQTT HomeAssistant_discovery_topic to something like "Zigbee" (instead of homeassistant) and use the same topic name as discovery topic in your Domoticz MQTT Autodiscover gateway.

Or do not use MQTT for Zigbee, remove zigbee2MQTT and use the ZigbeeforDomoticz python plugin.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Furry
Posts: 31
Joined: Sunday 19 February 2017 15:03
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: UK
Contact:

Re: How? - Sonoff Zigbee 3.0 USB Dongle Plus

Post by Furry »

pipiche wrote: Wednesday 18 January 2023 15:24 You can use the Zigbee for Domoticz plugin which doesn't bring any additional layer

https://github.com/zigbeefordomoticz/Domoticz-Zigbee

and you can check the Wiki for installation here: https://zigbeefordomoticz.github.io/wik ... ation.html
Thanks, but unfortunately this didn't go well (even after installing pip3, which apparently I didn't have):

Building wheels for collected packages: cryptography
Building wheel for cryptography (PEP 517) ... error
ERROR: Command errored out with exit status 1:

Also something about Rust compiler not being installed.
Raspberry Pi 3; Domoticz 2022.2
Philips Hue, Logitech Harmony Elite, LMS, Drayton Wiser
Rfxtrx433e and Owl CM11x
Aeon Z-Stick Gen 5
Dark Skies
Furry
Posts: 31
Joined: Sunday 19 February 2017 15:03
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: UK
Contact:

Re: How? - Sonoff Zigbee 3.0 USB Dongle Plus

Post by Furry »

waltervl wrote: Wednesday 18 January 2023 15:32 You can setup a second MQTT Autodiscover gateway to differ from the ZWave-JS-UI.
If you want that you have to change in Zigbee2MQTT HomeAssistant_discovery_topic to something like "Zigbee" (instead of homeassistant) and use the same topic name as discovery topic in your Domoticz MQTT Autodiscover gateway.
Yes, I tried this, with a second instance of "MQTT Auto Discovery Client Gateway with LAN Interface", with the Prefix set to (as you say) "zigbee", and I get "zigbee ... status online" in MQTT Explorer, but nothing more.
Raspberry Pi 3; Domoticz 2022.2
Philips Hue, Logitech Harmony Elite, LMS, Drayton Wiser
Rfxtrx433e and Owl CM11x
Aeon Z-Stick Gen 5
Dark Skies
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: How? - Sonoff Zigbee 3.0 USB Dongle Plus

Post by waltervl »

Then something is wrong in Zigbee2MQTT
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Furry
Posts: 31
Joined: Sunday 19 February 2017 15:03
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: UK
Contact:

Re: How? - Sonoff Zigbee 3.0 USB Dongle Plus

Post by Furry »

waltervl wrote: Wednesday 18 January 2023 16:23 Then something is wrong in Zigbee2MQTT
Any idea what? Could there be some more configuration to do, that I haven't done?
Or something more I should do to configure the dongle?
Raspberry Pi 3; Domoticz 2022.2
Philips Hue, Logitech Harmony Elite, LMS, Drayton Wiser
Rfxtrx433e and Owl CM11x
Aeon Z-Stick Gen 5
Dark Skies
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: How? - Sonoff Zigbee 3.0 USB Dongle Plus

Post by waltervl »

I am sorry I do not use Zigbee2MQTT but check the documentation and logging of it : https://www.zigbee2mqtt.io/guide/gettin ... stallation
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Furry
Posts: 31
Joined: Sunday 19 February 2017 15:03
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: UK
Contact:

Re: How? - Sonoff Zigbee 3.0 USB Dongle Plus

Post by Furry »

waltervl wrote: Wednesday 18 January 2023 17:35 I am sorry I do not use Zigbee2MQTT but check the documentation and logging of it : https://www.zigbee2mqtt.io/guide/gettin ... stallation
Thanks but, unfortunately, my installation/configuration does not resemble that described in the link, e.g. I do not have a configuration.yaml.
Raspberry Pi 3; Domoticz 2022.2
Philips Hue, Logitech Harmony Elite, LMS, Drayton Wiser
Rfxtrx433e and Owl CM11x
Aeon Z-Stick Gen 5
Dark Skies
Furry
Posts: 31
Joined: Sunday 19 February 2017 15:03
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: UK
Contact:

Re: How? - Sonoff Zigbee 3.0 USB Dongle Plus

Post by Furry »

This is some debug info. from the log:

2023-01-19 09:04:29.191 Zigbee2MQTT: [API] Request: [1] config_get({})
2023-01-19 09:04:29.191 Zigbee2MQTT: [API] Response: [1]
2023-01-19 09:04:29.307 Zigbee2MQTT: [API] Request: [2] bridge_getstatus({})
2023-01-19 09:04:29.307 Zigbee2MQTT: [API] Response: [2]
2023-01-19 09:04:29.373 Zigbee2MQTT: [API] Request: [3] plugin_info({})
2023-01-19 09:04:29.373 Zigbee2MQTT: [API] Response: [3]
2023-01-19 09:04:29.440 Zigbee2MQTT: [API] Request: [4] devices_get({})
2023-01-19 09:04:29.440 Zigbee2MQTT: [API] Response: [4]
2023-01-19 09:04:29.506 Zigbee2MQTT: [API] Request: [5] groups_get({})
2023-01-19 09:04:29.506 Zigbee2MQTT: [API] Response: [5]

This seems to be indicating that the dongle isn't responding; if I unplug it, there is no hint of this being noticed, in the log; it's as though Zigbee2MQTT/Mosquitto cannot talk to the dongle. However, I can see that it's on /ttyUSB1 when plugged in.This seems to be suggesting that nothing is coming back from the dongle.

How can I check that Zigbee2MQTT/Mosquitto are even aware of the Dongle? As I've said, it's as though some configuration is missing somewhere.

Also: I have the Zigbee2MQTT custom page. Should I be able to see existing Zigbee devices there, which are neither paired nor in pairing mode? (e.g. those associated with Philips Hue?).

I have also seen stuff about re-flashing the dongle with different firmware, as well as other information that suggests that this is unnecessary for this particular version of the dongle. Do I need to reflash it?
Raspberry Pi 3; Domoticz 2022.2
Philips Hue, Logitech Harmony Elite, LMS, Drayton Wiser
Rfxtrx433e and Owl CM11x
Aeon Z-Stick Gen 5
Dark Skies
Furry
Posts: 31
Joined: Sunday 19 February 2017 15:03
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: UK
Contact:

Re: How? - Sonoff Zigbee 3.0 USB Dongle Plus

Post by Furry »

Furry wrote: Wednesday 18 January 2023 16:11
waltervl wrote: Wednesday 18 January 2023 15:32 You can setup a second MQTT Autodiscover gateway to differ from the ZWave-JS-UI.
If you want that you have to change in Zigbee2MQTT HomeAssistant_discovery_topic to something like "Zigbee" (instead of homeassistant) and use the same topic name as discovery topic in your Domoticz MQTT Autodiscover gateway.
Yes, I tried this, with a second instance of "MQTT Auto Discovery Client Gateway with LAN Interface", with the Prefix set to (as you say) "zigbee", and I get "zigbee ... status online" in MQTT Explorer, but nothing more.
In Hardware/Zigbee2MQTT, I have:

Zigbee2MQTT Topic: zigbee
Auto Discovery Prefix: zigbee

I Hardware/MQTT Auto Discovery Client Gateway with LAN Interface, I have:

Auto Discovery Prefix: zigbee

Log:
2023-01-19 09:49:15.674 Zigbee2MQTT: Debug logging mask set to: PYTHON
2023-01-19 09:49:15.674 Zigbee2MQTT: Installing plugin custom page...
2023-01-19 09:49:15.674 Zigbee2MQTT: Copying files from /home/pi/domoticz/plugins/zigbee2mqtt/frontend to /home/pi/domoticz/www/templates
2023-01-19 09:49:15.699 Zigbee2MQTT: Installing plugin custom page completed.
2023-01-19 09:49:15.699 Zigbee2MQTT: MqttClient::__init__
2023-01-19 09:49:15.699 Zigbee2MQTT: MqttClient::open
2023-01-19 09:49:15.750 Zigbee2MQTT: onConnect called
2023-01-19 09:49:15.750 Zigbee2MQTT: Connected to MQTT Server: 127.0.0.1:1883
2023-01-19 09:49:15.750 Zigbee2MQTT: MQTT CLIENT ID: 'Domoticz_1674121755_2923'
2023-01-19 09:49:15.800 Zigbee2MQTT: MqttClient::subscribe
2023-01-19 09:49:15.851 Zigbee2MQTT: Subscribed to "zigbee/#" topic
Raspberry Pi 3; Domoticz 2022.2
Philips Hue, Logitech Harmony Elite, LMS, Drayton Wiser
Rfxtrx433e and Owl CM11x
Aeon Z-Stick Gen 5
Dark Skies
Dave21w
Posts: 361
Joined: Sunday 29 November 2015 21:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: UK
Contact:

Re: How? - Sonoff Zigbee 3.0 USB Dongle Plus

Post by Dave21w »

Have you followed the full install instructions and have node and npm installed too ?
Furry
Posts: 31
Joined: Sunday 19 February 2017 15:03
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: UK
Contact:

Re: How? - Sonoff Zigbee 3.0 USB Dongle Plus

Post by Furry »

Dave21w wrote: Thursday 19 January 2023 13:12 Have you followed the full install instructions and have node and npm installed too ?
I did this:

"Alternative 2: Install the Domoticz Zigbee2MQTT Python plugin
Clone repository into your domoticz plugins folder

cd domoticz/plugins
git clone https://github.com/stas-demydiuk/domoti ... plugin.git zigbee2mqtt
Restart Domoticz Go to “Hardware” page and add new item with type “Zigbee2MQTT” Set your MQTT server address and port to plugin settings

Once plugin receive any message from zigbee2mqtt server it will try to create appropriate device."

I do not have node.js or npm installed.
Raspberry Pi 3; Domoticz 2022.2
Philips Hue, Logitech Harmony Elite, LMS, Drayton Wiser
Rfxtrx433e and Owl CM11x
Aeon Z-Stick Gen 5
Dark Skies
Dave21w
Posts: 361
Joined: Sunday 29 November 2015 21:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: UK
Contact:

Re: How? - Sonoff Zigbee 3.0 USB Dongle Plus

Post by Dave21w »

Well this is probably part of your problem, if you follow the instructions for installing zigbee2mqtt they are required, go back to this page

https://www.zigbee2mqtt.io/guide/instal ... linux.html

And follow the instructions to the letter, your reference to installing the zigbee2mqtt plugin only relates to how domoticz gets the data from your mqtt broker, you could also use the built in option in Domoticz by using MQTT Auto Discovery Client Gateway with LAN interface, I'm not sure which one provides better options (i use auto discovery) however before you even get that far after installing z2m you should be able to see the front end for z2m if it's running, I can tell you even if everything is installed correctly it won't start if it can't detect the coordinator.
Furry
Posts: 31
Joined: Sunday 19 February 2017 15:03
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: UK
Contact:

Re: How? - Sonoff Zigbee 3.0 USB Dongle Plus

Post by Furry »

Dave21w wrote: Thursday 19 January 2023 17:27 Well this is probably part of your problem, if you follow the instructions for installing zigbee2mqtt they are required, go back to this page

https://www.zigbee2mqtt.io/guide/instal ... linux.html

And follow the instructions to the letter, your reference to installing the zigbee2mqtt plugin only relates to how domoticz gets the data from your mqtt broker, you could also use the built in option in Domoticz by using MQTT Auto Discovery Client Gateway with LAN interface, I'm not sure which one provides better options (i use auto discovery) however before you even get that far after installing z2m you should be able to see the front end for z2m if it's running, I can tell you even if everything is installed correctly it won't start if it can't detect the coordinator.
So this (above) is *additional* to installing Zigbee2MQTT plugin, and MQTT Auto Discovery Client Gateway with LAN Interface?
Is this (above) the 'layer' I've been missing?

So can/should I do as you suggest, without removing anything I've already installed?
Raspberry Pi 3; Domoticz 2022.2
Philips Hue, Logitech Harmony Elite, LMS, Drayton Wiser
Rfxtrx433e and Owl CM11x
Aeon Z-Stick Gen 5
Dark Skies
Furry
Posts: 31
Joined: Sunday 19 February 2017 15:03
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: UK
Contact:

Re: How? - Sonoff Zigbee 3.0 USB Dongle Plus

Post by Furry »

Furry wrote: Thursday 19 January 2023 18:09
Dave21w wrote: Thursday 19 January 2023 17:27 Well this is probably part of your problem, if you follow the instructions for installing zigbee2mqtt they are required, go back to this page

https://www.zigbee2mqtt.io/guide/instal ... linux.html

And follow the instructions to the letter, your reference to installing the zigbee2mqtt plugin only relates to how domoticz gets the data from your mqtt broker, you could also use the built in option in Domoticz by using MQTT Auto Discovery Client Gateway with LAN interface, I'm not sure which one provides better options (i use auto discovery) however before you even get that far after installing z2m you should be able to see the front end for z2m if it's running, I can tell you even if everything is installed correctly it won't start if it can't detect the coordinator.
So this (above) is *additional* to installing Zigbee2MQTT plugin, and MQTT Auto Discovery Client Gateway with LAN Interface?
Is this (above) the 'layer' I've been missing?

So can/should I do as you suggest, without removing anything I've already installed?
I did this, and followed the instructions exactly.

However, when doing 'npm start', I get:
'Error while starting zigbee-herdsman'
'Failed to start zigbee'
'Error: failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)

I definitely put the correct port (/dev/ttyUSB0) in the configuration.yaml

I've checked "Zigbee2MQTT fails to start", and there's nothing there about zigbee-herdsman failing to start.
Last edited by Furry on Thursday 19 January 2023 19:35, edited 1 time in total.
Raspberry Pi 3; Domoticz 2022.2
Philips Hue, Logitech Harmony Elite, LMS, Drayton Wiser
Rfxtrx433e and Owl CM11x
Aeon Z-Stick Gen 5
Dark Skies
Furry
Posts: 31
Joined: Sunday 19 February 2017 15:03
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: UK
Contact:

Re: How? - Sonoff Zigbee 3.0 USB Dongle Plus

Post by Furry »

Further to above: I have checked the Dongle, and I do have:
Zigbee 3.0 USB Dongle Plus / Model ZB dongle-P, with TI C2652P+CP2102N, and Coordinator firmware.
Raspberry Pi 3; Domoticz 2022.2
Philips Hue, Logitech Harmony Elite, LMS, Drayton Wiser
Rfxtrx433e and Owl CM11x
Aeon Z-Stick Gen 5
Dark Skies
Dave21w
Posts: 361
Joined: Sunday 29 November 2015 21:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: UK
Contact:

Re: How? - Sonoff Zigbee 3.0 USB Dongle Plus

Post by Dave21w »

from the cmd line on the pi type dmesg, you'l probably have to search a bit in the list you'll get but check to make sure the dongle is using USB0, mine shows like this

usb 1-1.3.1: ch341-uart converter now attached to ttyUSB0

start of your yaml should look some thing like this

homeassistant:
discovery_topic: domoticz
frontend:
port: 8099
host: 192.168.*.*
permit_join: false
mqtt:
base_topic: zigbe2mqtt
server: mqtt://localhost
serial:
port: /dev/ttyUSB0
Furry
Posts: 31
Joined: Sunday 19 February 2017 15:03
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: UK
Contact:

Re: How? - Sonoff Zigbee 3.0 USB Dongle Plus

Post by Furry »

Dave21w wrote: Thursday 19 January 2023 20:06 from the cmd line on the pi type dmesg, you'l probably have to search a bit in the list you'll get but check to make sure the dongle is using USB0, mine shows like this

usb 1-1.3.1: ch341-uart converter now attached to ttyUSB0

start of your yaml should look some thing like this

homeassistant:
discovery_topic: domoticz
frontend:
port: 8099
host: 192.168.*.*
permit_join: false
mqtt:
base_topic: zigbe2mqtt
server: mqtt://localhost
serial:
port: /dev/ttyUSB0
I have:

cp210x 1-1.4:1.0: cp210x converter detected
.
usb 1-1.4: cp210x converter now attached to ttyUSB0
.
usb 1-1.4: New USB device found, idVendor=10c4, idProduct=ea60, bcdDevice= 1.00
usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1.4: Product: Sonoff Zigbee 3.0 USB Dongle Plus
usb 1-1.4: Manufacturer: Silicon Labs
usb 1-1.4: SerialNumber: 0001
.
usb 1-1.4: cp210x converter now attached to ttyUSB0

Odd, perhaps, that the serial number should be '0001', though.

My configuration.yaml looks much like yours, except I have:

homeassistant: false

and do not have:

discovery_topic: ...
host: ...
permit_join: false
Raspberry Pi 3; Domoticz 2022.2
Philips Hue, Logitech Harmony Elite, LMS, Drayton Wiser
Rfxtrx433e and Owl CM11x
Aeon Z-Stick Gen 5
Dark Skies
Dave21w
Posts: 361
Joined: Sunday 29 November 2015 21:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: UK
Contact:

Re: How? - Sonoff Zigbee 3.0 USB Dongle Plus

Post by Dave21w »

Well without this bit
frontend:
port: 8099
host: 192.168.*.*

where the host has to be your IP you will not get the z2m front end anyway
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest