Why can't I start zigbee2mqtt?

Uhm, you want to use 2 coordinators with the same integration?

No, one with z2a (the existing one) and one for z2m which uses the add-on. And I was told so many times this would not be an issue.

If you have 2 identical adapters, both could have the same /dev/serial/by-id

1 Like

Well noticed @francisp :grin:

And you are very right…and by usb_id is not reliable, as they might change after a reboot :thinking:

Better would be 2 different sticks, but i wonder why 2 zigbee controllers??

Question, on what hardware is it running??

From what I’ve seen, I believe you are correct. Serial/by-id is a new concept for me. I did some searching in the shell, looking for /dev/serial/by-id* dmesg | grep USB* and ha hw info | grep USB, and I found that there were two identical serial by id. Being new to the concept, I didn’t understand that, I thought perhaps one wasn’t showing up, I didn’t understand how they could be the same. People kept saying don’t use /tty/USBx or /dev/tty/ACM0, so I went with the advice.

Also not sure if I needed the adapter: deconz, or if my Sonoff needed something different.

So if they have the same ID, is there a solution, or will buying someone else’s adapter be necessary?

The reason i asked is because i used to run my HA on HyperV along with a CC2531 zigbee usb.

The issue there was, HyperV doesn’t support USB, so i looked for a different solution, i used the usb port of the hosting machine, and a ser2net to set up the connection with zigbee2mqtt…

serial:
  port: tcp://10.0.0.250:5656

That worked fine, until my cc2531 broke down, and i replaced it with a ConbeeII, and since it requires decons it didn’t work over tcp anymore😕

So i moved to VMware, which does support usb

Two zigbee controllers because I thought a second one was needed to get z2m up and running. I read that you couldn’t run both z2a and z2m off the same stick, but you could use 2 sticks, and they could be the same brand. What should I have purchased?

It’s running on an Intel NUC, running HAOS, with an external powered USB 2.0 hub for the sticks.

Except for the first line, I didn’t understand a word of the following: :blush:

The reason i asked is because i used to run my HA on HyperV along with a CC2531 zigbee usb.

The issue there was, HyperV doesn’t support USB, so i looked for a different solution, i used the usb port of the hosting machine, and a [ser2net](https://community.home-assistant.io/t/hassos-in-hyper-v-is-it-possible-to-install-usb-rediector-or-something-similar-for-usb-support/212136/2) to set up the connection with zigbee2mqtt…

serial:
port: tcp://10.0.0.250:5656


That worked fine, until my cc2531 broke down, and i replaced it with a ConbeeII, and since it requires decons it didn’t work over tcp anymore😕

So i moved to VMware, which does support usb

never mind… you are not running ha on a virtual machine, so not applicable in your case…

erm, what you said

It should be possible to run serial by usb_id (the first option you had issue’s with), but the ID could change after a reboot…

You could also take a whole other approach (actually my very 1st solution when I still ran under HyperV)

Not really what I was trying to do, wanted to play with z2m and move a couple of devices over, but thank you for trying.

If both serial by ID’s are the same, it’s just going to screw up when z2m writes to that port.

In this case, you have to use these, because serial/by_id does not differentiate between the 2 sticks

And then I’m back to the same issue…why won’t z2m start, where are the errors coming from.

Hi Everyone -

I am migrating to zigbee2mqtt from ZHA. I have disabled ZHA (i’ve triple checked this. However - i cannot get Zigbee2MQTT to start.

My instance is running on a HA Yellow with the Sonoff dongle connected via a USB dongle. A user (not person) was created for MQTT and i’ve confirmed the password/user name match.

Here is my configuration:

data_path: /config/zigbee2mqtt
socat:
enabled: false
master: pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777
slave: tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
options: “-d -d”
log: false
base_topic: zigbee2mqtt
user: mqtt_user
password: mqtt
server: mqtt://core-mosquitto:1883
mqtt:
server: 10.0.4.69:8123
base_topic: zigbee2mqt
serial:
port: >-
/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20231031155018-if00
permit_join: true

Here is my log:

Zigbee2MQTT
[14:18:43] INFO: Preparing to start…
[14:18:43] INFO: Socat not enabled
[14:18:45] INFO: Starting Zigbee2MQTT…
Zigbee2MQTT:info 2024-04-06 14:18:53: Logging to console and directory: ‘/config/zigbee2mqtt/log/2024-04-06.14-18-53’ filename: log.txt
Zigbee2MQTT:info 2024-04-06 14:18:53: Starting Zigbee2MQTT version 1.36.1 (commit #unknown)
Zigbee2MQTT:info 2024-04-06 14:18:53: Starting zigbee-herdsman (0.40.3)
Zigbee2MQTT:error 2024-04-06 14:19:14: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2024-04-06 14:19:14: Failed to start zigbee
Zigbee2MQTT:error 2024-04-06 14:19:14: Check Zigbee2MQTT fails to start | Zigbee2MQTT for possible solutions
Zigbee2MQTT:error 2024-04-06 14:19:14: Exiting…
Zigbee2MQTT:error 2024-04-06 14:19:14: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)
at ZStackAdapter.start (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:103:27)
at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:132:29)
at Zigbee.start (/app/lib/zigbee.ts:62:27)
at Controller.start (/app/lib/controller.ts:109:27)
at start (/app/index.js:107:5)

You are using a Dongle-E, so your configuration is wrong

serial:
  port: >-
    /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20231031155018-if00
  adapter: ezsp
1 Like

Thank you, Francis!

I am one step closer! That did the trick for the hardware side. Now my issue is connecting to the MQTT server.

Here is the log:

Connecting to MQTT server at 10.0.4.69:8123
Zigbee2MQTT:error 2024-04-07 11:11:13: MQTT error: connack timeout
Zigbee2MQTT:error 2024-04-07 11:11:13: MQTT failed to connect, exiting…
Zigbee2MQTT:info 2024-04-07 11:11:13: Stopping zigbee-herdsman…
Zigbee2MQTT:info 2024-04-07 11:11:14: Stopped zigbee-herdsman

I have it pointed at my HA IP address (10.0.4.69:8133). Is this correct? I had read that in my research but unsure if that is correct.

mqtt://core-mosquitto:1883

make sure to create a user/password in HA

1 Like

Thanks, again! I assume if I’m not getting this error:

Connection refused: Not authorized

It means my user and password are wrong?

User: mqtt_user
Pass: MQTT

My config in broker:

logins:
username: mqtt_user
password: mqtt
require_certificate: false
certfile: fullchain.pem
keyfile: privkey.pem
customize:
active: false
folder: mosquitto

I have a user set up under Users in HA. What’s the final piece I’m missing?

passwords are case-sensitive !

and you need password in both (not Pass) (and User needs to be user)

2 Likes

@francisp My phone auto corrected to capitals. I just confirmed all passwords and user names match.

User in users account. Mosquito Broker. And Z2MQTT. All three using “mqtt_user” and “mqtt” for the pass.

Is there something else I am not considering? Is it the use of user vs username?

Broker configuration:

logins:

  • username: mqtt_user
    password: mqtt
    require_certificate: false
    certfile: fullchain.pem
    keyfile: privkey.pem
    customize:
    active: false
    folder: mosquitto

Zigbee2Mqtt configuration:

data_path: /config/zigbee2mqtt
socat:
enabled: false
master: pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777
slave: tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
options: “-d -d”
log: false
base_topic: zigbee2mqtt
user: mqtt_user
password: mqtt
mqtt:
server: mqtt://core-mosquitto:1883
serial:
port: >-
/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20231031155018-if00
adapter: ezsp
permit_join: true