Z2M: zh:zstack:znp: Socket error Error: connect ETIMEDOUT

I am running two instances of Z2M. First one is using a SLZB-06 as the coordinator and is running fine. The second one uses a UZG-01. I’m having connection issues.

Here is the log:

[2025-04-01 09:16:41] info: 	z2m: Starting zigbee-herdsman (3.2.7)
[2025-04-01 09:16:41] info: 	zh:zstack:znp: Opening TCP socket with 192.168.0.16:6638
[2025-04-01 09:18:59] error: 	zh:zstack:znp: Socket error Error: connect ETIMEDOUT 192.168.0.16:6638
[2025-04-01 09:18:59] error: 	z2m: Error while starting zigbee-herdsman
[2025-04-01 09:18:59] error: 	z2m: Failed to start zigbee-herdsman

Here is the config screen:

Here is my configuration.yaml:

homeassistant:
  enabled: true
advanced:
  homeassistant_legacy_entity_attributes: false
  homeassistant_legacy_triggers: false
  legacy_api: false
  legacy_availability_payload: false
  network_key:
    - 39
    - 129
    - 22
    - 196
    - 37
    - 194
    - 204
    - 159
    - 163
    - 244
    - 169
    - 136
    - 150
    - 86
    - 86
    - 123
  pan_id: 29771
  ext_pan_id:
    - 38
    - 231
    - 244
    - 215
    - 88
    - 150
    - 2
    - 197
transmit_power: 20
mqtt:
  base_topic: zigbee2mqtt2
  server: mqtt://core-mosquitto:1883
  user: addons
  password: []
serial:
  port: tcp://192.168.0.16:6638
  adapter: zstack
  baudrate: 115200
frontend:
  enabled: true
  port: 8099
device_options: {}
legacy: false
devices:
  '0x00158d000af21790':
    friendly_name: Environment Sensor Gate
    temperature_precision: 1
    humidity_precision: 1
  '0x00158d008afd7392':
    friendly_name: Door Sensor Gate
availability:
  enabled: true
  active:
    timeout: 10
  passive:
    timeout: 1500
version: 4


I am able to login to the UZG-01 at the IP address stated above. It is running firmware 20240914.

This is probably an easy fix but I’m been spinning my wheels for several hours and can’t figure it out. Any help appreciated.

You are missing the adapter: zstack entry (and baudrate) under port on the Z2M GUI (don’t ask me why it ignores the actual settings in the configuration.yaml).

Thanks for the quick response, Neil.
I have amended the Z2M configuration as you suggested.

The connection error remains.

[2025-04-01 10:13:04] info: 	z2m: Logging to console, file (filename: log.log)
[2025-04-01 10:13:04] info: 	z2m: Starting Zigbee2MQTT version 2.1.3 (commit #unknown)
[2025-04-01 10:13:04] info: 	z2m: Starting zigbee-herdsman (3.2.7)
[2025-04-01 10:13:05] info: 	zh:zstack:znp: Opening TCP socket with 192.168.0.16:6638
[2025-04-01 10:15:18] error: 	zh:zstack:znp: Socket error Error: connect ETIMEDOUT 192.168.0.16:6638
[2025-04-01 10:15:18] error: 	z2m: Error while starting zigbee-herdsman
[2025-04-01 10:15:18] error: 	z2m: Failed to start zigbee-herdsman

Can you post a photo of the general status page of the UZG - if the zigbee coordinator version is in italics it hasn’t updated the firmware correctly.

As requested

“Mode: Zigbee-USB” :thinking:

1 Like

Damn! That was it. I switched it to network mode.
TYVM!
:man_facepalming: