Zigbee2MQTT will not start

Short: Zigbee2MQTT won’t start on HASS

I have done a search, nothing that seems to help but I may have missed something.

Hi folks, I’m trying to get ZigBee2MQTT working with an Ethernet GW (HMG-01). I can’t seem to get HASS to start Zigbee2MQTT

Config:

data_path: /config/zigbee2mqtt
socat:
  enabled: true
  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: true
  frontend: true
mqtt:
  serial:
    port: tcp://192.168.A.B:6638
    baudrate: 115200
    disable_led: false
  advanced:
    transmit_power: 20
serial: {}

HASS running on an HP EliteDesk
Core
2024.9.3
Supervisor
2024.09.1
Operating System
13.1
Frontend
20240909.1

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:
    port: tcp://192.168.A.B:6638
    baudrate: 115200
    disable_led: false
  advanced:
    transmit_power: 20
serial: {}
config # docker logs a147c08c861a
[21:55:58] INFO: Preparing to start...
[21:55:58] INFO: Socat enabled
[21:55:58] INFO: Starting socat
Socat startup parameters:
Options:     -d -d
Master:      pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777
Slave:       tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
[21:55:58] INFO: Starting socat process ...
2024/09/24 21:55:58 socat[47] N PTY is /dev/pts/2
2024/09/24 21:55:58 socat[47] N listening on AF=2 0.0.0.0:8485
config # docker ps -a
CONTAINER ID   IMAGE                                                          COMMAND                  CREATED          STATUS                      PORTS                                                                                                                          NAMES
a147c08c861a   zigbee2mqtt/zigbee2mqtt-amd64:1.40.1-1                         "/sbin/tini -- /dock…"   7 minutes ago    Exited (1) 7 minutes ago                                                                                                                                   addon_45df7312_zigbee2mqtt

I can ping and access the web interface on
192.168.A.B (it is a real valid address).

Socat startup parameters:
Options:     -d -d
Master:      pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777
Slave:       tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
[21:38:33] INFO: Starting socat process ...
2024/09/24 21:38:33 socat[47] N PTY is /dev/pts/2
2024/09/24 21:38:33 socat[47] N listening on AF=2 0.0.0.0:8485
[21:55:58] INFO: Preparing to start...
[21:55:58] INFO: Socat enabled
[21:55:58] INFO: Starting socat
Socat startup parameters:
Options:     -d -d
Master:      pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777
Slave:       tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
[21:55:58] INFO: Starting socat process ...
2024/09/24 21:55:58 socat[47] N PTY is /dev/pts/2
2024/09/24 21:55:58 socat[47] N listening on AF=2 0.0.0.0:8485

you should publish the log from HT to see where is the matter.

The last section is the log.log file.

But I’m getting confused. Seems at some point the config editor ate my data_path. I’ve added it back in and now I’m seeing (log.log):

[2024-09-25 06:21:50] info:     z2m: Logging to console, file (filename: log.log)
[2024-09-25 06:21:50] info:     z2m: Starting Zigbee2MQTT version 1.40.1 (commit #unknown)
[2024-09-25 06:21:50] info:     z2m: Starting zigbee-herdsman (0.57.3)
[2024-09-25 06:21:50] error:    z2m: Error while starting zigbee-herdsman
[2024-09-25 06:21:50] error:    z2m: Failed to start zigbee
[2024-09-25 06:21:50] error:    z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
[2024-09-25 06:21:50] error:    z2m: Exiting...
[2024-09-25 06:21:50] 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)

A quick google and I see threads about ZHA. But all of them are using the serial dongle and I’m using an Ethernet GW. There is a suggestion to disable ZHA and I’ll try that next.

I don’t see a way to disable ZHA.

Your configuration is wrong, there may have been a problem when you pasted the configuration, so you will have to check it.
For example, you have two “serial” and one is inside the mqtt.

It should be like this:

data_path: /config/zigbee2mqtt
socat:
  enabled: true
  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: true
  frontend: true
mqtt:
serial: 
  port: tcp://192.168.A.B:6638
advanced:
  transmit_power: 20

Check the HA integrations to see if ZHA is enabled, if it is, disable it.

That’s it! Needed to put the serial under serial (top level) and not under MQTT. It’s running now.

Thanks :smiley: