Problem starting zigbee2mqtt

Hi i am having problems starting zigbee2mqtt.
I am using a conbee/deconz stick, from a youtube video i found i needed to add adapter: deconz for that.
When i try to start it the log looks like this

[11:13:58] INFO: Preparing to start...
[11:14:00] INFO: Socat not enabled
[11:14:07] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[2024-08-17 11:14:26] info: 	z2m: Logging to console, file (filename: log.log)
[2024-08-17 11:14:26] info: 	z2m: Starting Zigbee2MQTT version 1.39.1 (commit #unknown)
[2024-08-17 11:14:26] info: 	z2m: Starting zigbee-herdsman (0.55.3)
[2024-08-17 11:14:27] error: 	z2m: Error while starting zigbee-herdsman
[2024-08-17 11:14:27] error: 	z2m: Failed to start zigbee
[2024-08-17 11:14:27] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
[2024-08-17 11:14:27] error: 	z2m: Exiting...
[2024-08-17 11:14:27] error: 	z2m: Error: spawn udevadm ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:284:19)
    at onErrorNT (node:internal/child_process:477:16)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)

My zigbee2mqtt config is looking like this

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
mqtt: {}
serial:
  port: /dev/ttyACM0
  adapter: deconz

I am using mosquitto broker and its running and configured. It has a local user with admin rights just to see if that made any difference.
The log looks like this

2024-08-17 11:19:05: New connection from 172.30.32.2:48578 on port 1883.
2024-08-17 11:19:05: Client <unknown> closed its connection.

I have some hue lights i cant get access too without it since they are connected to a bridge that no longer exists and they dont seems to reset even when power toggling them.

the installation guide on zigbee2mqtt doesnt provide any answers to this problem. No video i have watched how to do it on youtube covers this.

I am at my wits end…
Any ideas how to get it working?

-Try to fill in the mqtt details

server: mqtt://core-mosquitto:1883
user: USER
password: PASSWORD

-Make sure your USB extension cable works
-use /dev/serial/by-id/… instead of /dev/ttyACM0
-make sure ZHA or phoscon is not enabled.

phoscon is not installed so that shouldnt be a problem.
I have disabled ZHA now.

Config is looking like this:

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
mqtt:
  server: mqtt://core-mosquitto:1883
  user: mqtt-user
  password: "password"
serial:
  port: >-
    /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2401586-if00
  adapter: deconz

“password” is of course replaced by the actual password.
looks to be the same error still. Log below

[12:06:34] INFO: Preparing to start...
[12:06:36] INFO: Socat not enabled
[12:06:41] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[2024-08-17 12:06:56] info: 	z2m: Logging to console, file (filename: log.log)
[2024-08-17 12:06:56] info: 	z2m: Starting Zigbee2MQTT version 1.39.1 (commit #unknown)
[2024-08-17 12:06:56] info: 	z2m: Starting zigbee-herdsman (0.55.3)
[2024-08-17 12:06:57] error: 	z2m: Error while starting zigbee-herdsman
[2024-08-17 12:06:57] error: 	z2m: Failed to start zigbee
[2024-08-17 12:06:57] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
[2024-08-17 12:06:57] error: 	z2m: Exiting...
[2024-08-17 12:06:57] error: 	z2m: Error: spawn udevadm ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:284:19)
    at onErrorNT (node:internal/child_process:477:16)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)

The zigbee stick is not connected via USB-extension but directly in the USB port of the rpi.

Use an USB extension cable, and make sure it is connected to USB2, not USB3

its a rpi 3b+ so all usb ports are 2.0.
the zigbee stick is now connected via USB extension. Function of the extension has been tested with my PC and the mouse.

z2m is still not starting. Log below

[12:42:38] INFO: Preparing to start...
[12:42:39] INFO: Socat not enabled
[12:42:45] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[2024-08-17 12:42:59] info: 	z2m: Logging to console, file (filename: log.log)
[2024-08-17 12:42:59] info: 	z2m: Starting Zigbee2MQTT version 1.39.1 (commit #unknown)
[2024-08-17 12:42:59] info: 	z2m: Starting zigbee-herdsman (0.55.3)
[2024-08-17 12:43:00] error: 	z2m: Error while starting zigbee-herdsman
[2024-08-17 12:43:00] error: 	z2m: Failed to start zigbee
[2024-08-17 12:43:00] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
[2024-08-17 12:43:00] error: 	z2m: Exiting...
[2024-08-17 12:43:00] error: 	z2m: Error: spawn udevadm ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:284:19)
    at onErrorNT (node:internal/child_process:477:16)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)

ah, rpi 3b+, only has 1 Gb memory. How many add-ons are your running ?

mosuitto broker and zigbee2mqtt.

My memory usage looks like this
image

This is a working config for Z2M under HAOS with a Conbee II

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
mqtt: {}
serial:
  adapter: deconz

It’s advised to remove the unique ID of your zigbee controller when posting online!

when i copypasted your config it was turned into this when i saved.

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
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
mqtt: {}
serial:
  adapter: deconz

When i try to add my serial it wont allow me to save and gives me this error. config:

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
mqtt: {}
serial: "my-serial"
  adapter: deconz
Failed to save add-on configuration, Missing option 'socat' in root in Zigbee2MQTT (45df7312_zigbee2mqtt). Got {'data_path': '/config/zigbee2mqtt', 'mqtt': {}, 'serial': {}}

It did not start when i tried without filling in serial. log below:

[23:31:06] INFO: Preparing to start...
[23:31:08] INFO: Socat not enabled
[23:31:15] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[2024-08-17 23:31:29] info: 	z2m: Logging to console, file (filename: log.log)
[2024-08-17 23:31:29] info: 	z2m: Starting Zigbee2MQTT version 1.39.1 (commit #unknown)
[2024-08-17 23:31:29] info: 	z2m: Starting zigbee-herdsman (0.55.3)
[2024-08-17 23:31:30] error: 	z2m: Error while starting zigbee-herdsman
[2024-08-17 23:31:30] error: 	z2m: Failed to start zigbee
[2024-08-17 23:31:30] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
[2024-08-17 23:31:30] error: 	z2m: Exiting...
[2024-08-17 23:31:30] error: 	z2m: Error: spawn udevadm ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:284:19)
    at onErrorNT (node:internal/child_process:477:16)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)

any idea?

What can someone do with the serial/by-id ?

:blush: don’t remember, is long ago when I started with zigbee but have gotten this advise and have seen it again afterwards.

Long shot, but did you restart Ha after disabling ZHA? The conbee stick might still be claimed by ZHA even if it’s disabled.

Try this:

  • Unplug your conbee
  • Restart HA (full reboot, not a reload)
  • Plug in your conbee
  • Check ZHA is still disabled
  • Make sure you’re using @Nick4’s config and start Z2M (double check your config because one of your latest examples had duplicate entries for enabled, master, slave, options and log. You only need them listed under socat:)
1 Like

When i try to save the config it automatically adds the duplicate entries over socat. And i still cant save the cofig with my config looking like this

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
mqtt: {}
serial: "my ID"
  adapter: deconz

it gives me this error

Failed to save add-on configuration, Missing option 'socat' in root in Zigbee2MQTT (45df7312_zigbee2mqtt). Got {'data_path': '/config/zigbee2mqtt', 'mqtt': {}, 'serial': {}}

Remove data_path Inthe socat section

& remove “my ID” behind serial:

1 Like

Like Nick said, the above is wrong. That line only needs to contain serial:

Edit: I spot other issues with your UI config. You’re pasting everything in the socat section. No wonder it’s complaining.

Can you switch to yaml mode, paste Nick’s config exactly like he told you, then switch back to UI? You should see each section populated with only the data required for that specific section.

1 Like

i edited it in the yaml editor instead, there it didnt add the duplicates.
Its looking like this now.

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
mqtt: {}
serial:
  adapter: deconz

Still getting this error in the log:

[12:02:51] INFO: Preparing to start...
[12:02:53] INFO: Socat not enabled
[12:03:00] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[2024-08-18 12:03:16] info: 	z2m: Logging to console, file (filename: log.log)
[2024-08-18 12:03:16] info: 	z2m: Starting Zigbee2MQTT version 1.39.1 (commit #unknown)
[2024-08-18 12:03:16] info: 	z2m: Starting zigbee-herdsman (0.55.3)
[2024-08-18 12:03:18] error: 	z2m: Error while starting zigbee-herdsman
[2024-08-18 12:03:18] error: 	z2m: Failed to start zigbee
[2024-08-18 12:03:18] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
[2024-08-18 12:03:18] error: 	z2m: Exiting...
[2024-08-18 12:03:18] error: 	z2m: Error: spawn udevadm ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:284:19)
    at onErrorNT (node:internal/child_process:477:16)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)

Ok, did you reboot HA & check ZHA is still disabled as per my instructions a couple of posts up?

yes followed the instructions fully. Tried it again after getting the config correct and still no luck. Error seems the same still

[12:15:01] INFO: Preparing to start...
[12:15:03] INFO: Socat not enabled
[12:15:10] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[2024-08-18 12:15:25] info: 	z2m: Logging to console, file (filename: log.log)
[2024-08-18 12:15:26] info: 	z2m: Starting Zigbee2MQTT version 1.39.1 (commit #unknown)
[2024-08-18 12:15:26] info: 	z2m: Starting zigbee-herdsman (0.55.3)
[2024-08-18 12:15:27] error: 	z2m: Error while starting zigbee-herdsman
[2024-08-18 12:15:27] error: 	z2m: Failed to start zigbee
[2024-08-18 12:15:27] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
[2024-08-18 12:15:27] error: 	z2m: Exiting...
[2024-08-18 12:15:27] error: 	z2m: Error: spawn udevadm ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:284:19)
    at onErrorNT (node:internal/child_process:477:16)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)

Which model of Conbee stick do you have?