Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E

On various Hardware and OS systems: pi / windows / routers / nas, etc

Moderator: leecollings

Post Reply
jack100
Posts: 28
Joined: Wednesday 08 March 2017 21:59
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E

Post 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
azonneveld
Posts: 159
Joined: Wednesday 02 October 2019 7:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands
Contact:

Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E

Post by azonneveld »

MQTT not (correct) installed/configured:

https://randomnerdtutorials.com/how-to- ... pberry-pi/
rpi4 - zigbee2mqtt - roborock - espeasy - rfxcom - homewizard p1 - otgw - homebridge - surveillance station - egardia - goodwe - open weather map - wol - BBQ detection - rsync backup
User avatar
waltervl
Posts: 5724
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E

Post 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
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
jack100
Posts: 28
Joined: Wednesday 08 March 2017 21:59
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E

Post by jack100 »

Fine!
The mosquitto errors in the log are solved.
I again installed mosquitto.
jack100
Posts: 28
Joined: Wednesday 08 March 2017 21:59
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E

Post 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
Last edited by jack100 on Wednesday 29 January 2025 21:47, edited 1 time in total.
User avatar
waltervl
Posts: 5724
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
jack100
Posts: 28
Joined: Wednesday 08 March 2017 21:59
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E

Post 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
Last edited by jack100 on Wednesday 29 January 2025 21:31, edited 1 time in total.
User avatar
waltervl
Posts: 5724
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E

Post by waltervl »

Alternative is the docker way of installing zigbee2mqtt.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
jack100
Posts: 28
Joined: Wednesday 08 March 2017 21:59
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E

Post by jack100 »

No an another solution?
Is npm and pnpm both necessary?
And when it install seperately?
wim57
Posts: 27
Joined: Monday 25 September 2017 12:58
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E

Post by wim57 »

I think you need to use: sudo npm install -g pnpm
jack100
Posts: 28
Joined: Wednesday 08 March 2017 21:59
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E

Post 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
jack100
Posts: 28
Joined: Wednesday 08 March 2017 21:59
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E

Post 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
wim57
Posts: 27
Joined: Monday 25 September 2017 12:58
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E

Post 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.
jack100
Posts: 28
Joined: Wednesday 08 March 2017 21:59
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E

Post by jack100 »

which port number can I choose?
jack100
Posts: 28
Joined: Wednesday 08 March 2017 21:59
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E

Post 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
User avatar
waltervl
Posts: 5724
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E

Post by waltervl »

Also check the zigbee2mqtt forum for the errors you see: https://github.com/Koenkk/zigbee2mqtt/discussions
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
jack100
Posts: 28
Joined: Wednesday 08 March 2017 21:59
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E

Post 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
azonneveld
Posts: 159
Joined: Wednesday 02 October 2019 7:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands
Contact:

Re: Problems with installing Sonoff ZigBee 3.0 USB-Dongle Plus-E

Post by azonneveld »

Use adapter type: zstack.

Next: specify the right adapterport: here
rpi4 - zigbee2mqtt - roborock - espeasy - rfxcom - homewizard p1 - otgw - homebridge - surveillance station - egardia - goodwe - open weather map - wol - BBQ detection - rsync backup
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest