Zigbee2MQTT Fails to Connect to MQTT Server

I’m working on migrating from ZHA to Z2M and I’m running into some road blocks.
Every time I try to start Z2M I get the following log:

[21:38:53] INFO: Preparing to start...
[21:38:54] INFO: Socat not enabled
[21:38:56] INFO: Starting Zigbee2MQTT...
Zigbee2MQTT:info  2024-01-16 21:39:04: Logging to console and directory: '/config/zigbee2mqtt/log/2024-01-16.21-39-04' filename: log.txt
Zigbee2MQTT:info  2024-01-16 21:39:04: Starting Zigbee2MQTT version 1.35.1 (commit #unknown)
Zigbee2MQTT:info  2024-01-16 21:39:04: Starting zigbee-herdsman (0.30.0)
Assertion failed: Command (setConfigurationValue) returned unexpected state: [object Object]
Zigbee2MQTT:info  2024-01-16 21:39:07: zigbee-herdsman started (resumed)
Zigbee2MQTT:info  2024-01-16 21:39:07: Coordinator firmware version: '{"meta":{"maintrel":"1 ","majorrel":"7","minorrel":"3","product":12,"revision":"7.3.1.0 build 176"},"type":"EZSP v12"}'
Zigbee2MQTT:info  2024-01-16 21:39:07: Currently 0 devices are joined:
Zigbee2MQTT:info  2024-01-16 21:39:07: Zigbee: disabling joining new devices.
Zigbee2MQTT:info  2024-01-16 21:39:08: Connecting to MQTT server at mqtt://10.0.0.46:1883
Zigbee2MQTT:error 2024-01-16 21:39:08: MQTT failed to connect, exiting...
Zigbee2MQTT:info  2024-01-16 21:39:08: Stopping zigbee-herdsman...
Zigbee2MQTT:info  2024-01-16 21:39:08: Stopped zigbee-herdsman

I’m using Mosquitto as my MQTT server and it appears to be working fine. I tested it by using MQTT explorer and connected to it from a different computer with no problems.

I’m currently using version 1.35.1-1 of Z2M and version 6.4.0 of Mosquitto. My configuration for Z2M looks like this:

server: mqtt://10.0.0.46:1883
base_topic: zigbee2mqtt
user: username
password: password
client_id: Z2M
reject_unauthorized: true
include_device_information: true
keepalive: 60
version: 4
force_disable_retain: false

(Username and password are set to default values for this example.) I’m using the exact IP and username/password that I was using on MQTT explorer

My serial config looks like this:

port: /dev/ttyUSB0
disable_led: false
adapter: ezsp
baudrate: 115200
rtscts: false

Please let me know if you have any ideas on how this can be solved. Thank you!

After digging further it appears as if the mqtt configuration in the add-on configuration tab does not reflect the configuration saved in homeassistant/zigbe2mqtt/configuration.yaml. After changing the yaml file to have the correct settings everything worked!

1 Like