Page 1 of 1
Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E
Posted: Wednesday 29 January 2025 16:17
by jack100
Hi,
I connected an Sonoff ZigBee 3.0 USB-Dongle Plus-E ZBDongle-E at my raspberry pi with Domoticz.
Install the plugin zigbee2mqtt.
In Domoticz at the zigbee2mqtt plugin the next fields:
MQTT server address: localhost
Poort: 1883
Zigbee2Mqtt Topic: zigbee2mqtt
In the configuration.yaml the next:
base_topic: zigbee2mqtt
server: 'mqtt://localhost'
In the Zigbee2MQTT API Transport I see this:
2025-01-29 16:13:52 {"type": "response", "requestId": 5, "isError": false, "payload": []} Zigbee2MQTT
2025-01-29 16:13:52 {"type":"request","requestId":5,"command":"groups_get","params":{}} my username of domoticz (IP: 192.168.178.26)
2025-01-29 16:13:52 {"type": "response", "requestId": 4, "isError": false, "payload": []} Zigbee2MQTT
2025-01-29 16:13:52 {"type":"request","requestId":4,"command":"devices_get","params":{}} my username of domoticz (IP: 192.168.178.26)
In the log of Domoticz I see this:
2025-01-29 16:11:18.115 Error: Zigbee2MQTT: Failed to connect to: localhost:1883, Description: Connection refused
2025-01-29 16:11:18.115 Error: Zigbee2MQTT: Disconnected from MQTT Server: localhost:1883
2025-01-29 16:11:28.131 Error: Zigbee2MQTT: Failed to connect to: localhost:1883, Description: Connection refused
What going wrong here?
Who can help me?
Jack
Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E
Posted: Wednesday 29 January 2025 16:36
by azonneveld
Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E
Posted: Wednesday 29 January 2025 16:58
by waltervl
If you start with Zigbee2MQTT it is better to directly move to the Domoticz MQTT AutoDiscover hardware gateway instead of the python plugin. I dont think there is a lot of maintenance on the plugin recently.
See wiki
https://wiki.domoticz.com/Zigbee2MQTT
Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E
Posted: Wednesday 29 January 2025 17:02
by jack100
Fine!
The mosquitto errors in the log are solved.
I again installed mosquitto.
Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E
Posted: Wednesday 29 January 2025 18:08
by jack100
With the zigbee2mqtt plugin no zigbee sensors wil disappear. Pairing will not happen.
I will now try with the "MQTT Auto Discovery Client Gateway with LAN interface".
In the I copy:
homeassistant:
# Enable the integration (default: false)
enabled: true
What is the right configuration.yaml?
In domoticz in the "MQTT Auto Discovery Client Gateway with LAN interface".
Remote address: localhost
Poort: 1883
Gebruikersnaam: empty
Wachtwoord:empty
Automatische ontdekking voorvoegsel: homeassistant
Now how I get this screen under Alternative 1: Use Domoticz MQTT Autodiscover??
https://wiki.domoticz.com/Zigbee2MQTT
Enter the MQTT broker details real IP address (do not use localhost or 127.0.0.1) and port (eg 1883).
What IP address and port number then?
How can I control if domoticz see my sonoff dongle? Port number?
Jack
Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E
Posted: Wednesday 29 January 2025 18:38
by waltervl
Zigbee pairing has nothing to do with mqtt or Domoticz!!
Check the zigbee2mqtt settings and options as that application is connecting with the zigbee2mqtt usb stick.
https://www.zigbee2mqtt.io/
If zigbee2mqtt user interface shows nodes/ devices but in Domoticz no devices then check MQTT if zigbee2mqtt is sending data.
Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E
Posted: Wednesday 29 January 2025 20:53
by jack100
I start with a fresh installation of zigbee2mqtt.
https://www.zigbee2mqtt.io/guide/instal ... installing
# Set up Node.js repository, install Node.js, pnpm and required dependencies
# NOTE 1: Older i386 hardware can work with [unofficial-builds.nodejs.org](
https://unofficial-builds.nodejs.org/do ... e/v20.9.0/ e.g. Version 20.9.0 should work.
# NOTE 2: For Ubuntu see tip below
# NOTE 3: Curl might have to be installed first via apt update && apt install curl
sudo curl -fsSL
https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs git make g++ gcc libsystemd-dev
npm install -g pnpm
After copy/past and run in putty of "nmp install -g pnpm" i get errors. (o.a. access denied).
Will not accept: npm install -g pnpm
After "pnpm --version", -bash: pnpm: command not found.
After "node --version", I see V20.18.2
After "pnpm i --frozen-lockfile", -bash: pnpm: command not found.
What going wrong here?
Jack
Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E
Posted: Wednesday 29 January 2025 21:15
by waltervl
Alternative is the docker way of installing zigbee2mqtt.
Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E
Posted: Wednesday 29 January 2025 21:21
by jack100
No an another solution?
Is npm and pnpm both necessary?
And when it install seperately?
Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E
Posted: Wednesday 29 January 2025 21:30
by wim57
I think you need to use: sudo npm install -g pnpm
Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E
Posted: Wednesday 29 January 2025 21:35
by jack100
Wim, you are an angel!!
https://www.zigbee2mqtt.io/guide/instal ... linux.html
# Set up Node.js repository, install Node.js, pnpm and required dependencies
# NOTE 1: Older i386 hardware can work with [unofficial-builds.nodejs.org](
https://unofficial-builds.nodejs.org/do ... e/v20.9.0/ e.g. Version 20.9.0 should work.
# NOTE 2: For Ubuntu see tip below
# NOTE 3: Curl might have to be installed first via apt update && apt install curl
sudo curl -fsSL
https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs git make g++ gcc libsystemd-dev
npm install -g pnpm
# Verify that the correct nodejs and pnpm version has been installed
node --version # Should output V18.x, V20.x, V22.X
pnpm --version # Should output 9.X
# Create a directory for zigbee2mqtt and set your user as owner of it
sudo mkdir /opt/zigbee2mqtt
sudo chown -R ${USER}: /opt/zigbee2mqtt
# Clone Zigbee2MQTT repository
git clone --depth 1
https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt
# Install dependencies (as user "pi")
cd /opt/zigbee2mqtt
pnpm i --frozen-lockfile
# Build Zigbee2MQTT
pnpm run build
No errors now!
Tomorrow the next step
Jack
Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E
Posted: Thursday 30 January 2025 15:25
by jack100
Hi,
We continue
After:
cd /opt/zigbee2mqtt
pnpm start
I see in putty the next:
Starting Zigbee2MQTT without watchdog.
After several seconds:
Error: listen EADDRINUSE: address already in use :::8080
DELIFECYCLED Command failed with exit code 1. (in red text)
p1@raspberrypi: /opt/zigbee2mqtt $
which settings are not correct??
In domoticz I use: MQTT Auto Discovery Client Gateway with LAN interface
Remote address: localhost
Poort: 1883
Automatische ontdekking voorvoegsel: homeassistant
Add this in the configuration.yaml
# Optional: Home Assistant integration (MQTT discovery)
homeassistant:
# Enable the integration (default: false)
enabled: true
Jack
Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E
Posted: Thursday 30 January 2025 16:27
by wim57
You probably have set port 8080 for Domoticz web-interface as well as for Z2M frontend. So you have to change the Z2M frontend port in configuration.yaml.
Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E
Posted: Thursday 30 January 2025 16:40
by jack100
which port number can I choose?
Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E
Posted: Thursday 30 January 2025 17:06
by jack100
Zigbee2mqtt see my Sonoff Dongle.
When I type in putty: $ ls -l /dev/ttyUSB0
I see: crw-rw----1 root dialout 188, 0 Jan 30 16:52 /dev/ttyUSB0
When I type in putty: ls -l /dev/serial/by-id
I see: lrwxrwxrwx 1 root root 13 Jan 30 16:52 usb-ITead_Sonoff_Zigbee_3.0. and more
After:
cd /opt/zigbee2mqtt
pnpm start
I see some errors about the adapter.
-Configuration is not consistent with adapter state/backup!
-Please update configuration to prevent further issues.
-And more.
When in de configuration.yaml "homeassistant" change from false to true and save.
After reboot it change again in false.
Whats happens here?
Jack
Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E
Posted: Thursday 30 January 2025 17:40
by waltervl
Also check the zigbee2mqtt forum for the errors you see:
https://github.com/Koenkk/zigbee2mqtt/discussions
Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E
Posted: Thursday 30 January 2025 18:06
by jack100
For the Sonoff Dongle Plus-E I add the next in the configuration.yaml
serial:
adapter: ember # (is the right? Or zstack?)
port: /dev/ttyUSB0
After:
cd /opt/zigbee2mqtt
pnpm start
The following errors disappear:
-z2m Error while starting zigbee-herdsman
-z2m Failed to start zigbee-hersman
Jack
Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E
Posted: Thursday 06 February 2025 14:18
by azonneveld
Use adapter type: zstack.
Next: specify the right adapterport:
here