I can´t seem to get the Zigbee2MQTT and Mosquitto MQTT docker containers to work

Hey people.

I really wanted to figure this out myself, but I need some progress soon. I have been trying a while now to get Zigbee2MQTT (Z2M) to work but cant seem to figure it out. I’m pretty new to Home Assistant and I’m trying to run the different services in their respective Docker containers managed by Portainer running on a Raspberry Pi 4 in an Argon One M.2 case with Raspberry Pi OS Lite (64-bit). I am using a Conbee II Zigbee stick.

I’m able to get the Portainer, Home Assistant and Plex containers to work fine. And even the Mosquitto MQTT broker and the Z2M containers are running seemingly fine. However, I can’t seem to access the Z2M web interface to connect the devices I want.

I would very much appreciate if you could help me figure out what I’m doing wrong in my config files.

This is my docker-compose.yaml file (excluding the Plex part):

version: '3.8'

services:
###### PORTAINER ######
  portainer:
    container_name: portainer
    image: portainer/portainer-ce:latest
    restart: always
    tty: true
    network_mode: host
    ports:
      - "9000:9000/tcp"
    environment:
      - TZ=Europe/Oslo
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /home/pi/portainer:/data

###### HOMEASSISTANT ######
  homeassistant:
    container_name: homeassistant
    image: "homeassistant/home-assistant:latest"
    volumes:
      - /home/pi/homeassistant/config:/config
      - /etc/localtime:/etc/localtime:ro
    restart: unless-stopped
    privileged: true
    network_mode: host
    ports:
      - "8123:8123"
    devices:
      - "/dev/ttyACM0:/dev/ttyACM0"
    environment:
      - TZ=Europe/Oslo

###### MOSQUITTO MQTT ######
  mqtt:
    container_name: mosquitto-mqtt
    image: eclipse-mosquitto:latest
    restart: unless-stopped
    volumes:
      - "/home/pi/mosquitto:/mosquitto"
    ports:
      - "1883:1883"
      - "9001:9001"

###### ZIGBEE2MQTT ######
  zigbee2mqtt:
    container_name: zigbee2mqtt
    image: koenkk/zigbee2mqtt:latest
    restart: unless-stopped
    volumes:
      - /home/pi/zigbee2mqtt/data:/app/data
      - /run/udev:/run/udev:ro
    ports:
      # Frontend port
      - 8080:8080
    environment:
      - TZ=Europe/Oslo
    devices:
      - "/dev/ttyACM0:/dev/ttyACM0"

This is my zigbee2mqtt/data/configuration.yaml config:

# Home Assistant integration (MQTT discovery)
homeassistant: true

# allow new devices to join
permit_join: false

# MQTT settings
mqtt:
  # MQTT base topic for zigbee2mqtt MQTT messages
  base_topic: zigbee2mqtt
  # MQTT server URL
  server: 'mqtt://192.168.50.69:1883'
  # MQTT server authentication, uncomment if required:
  user: <mqtt_user>
  password: <mqtt_pass>

# Serial settings
serial:
  # Location of CC2531 USB sniffer
  port: /dev/ttyACM0
  adapter: deconz

frontend:
  port: 8099

This is my mosquitto.conf file:

persistence true
persistence_location /mosquitto/data
log_dest file /mosquitto/log/mosquitto.log
listener 1883

## Authentication ##
allow_anonymous false
password_file /mosquitto/config/password.txt

At this point i thought I should find the nice web client to the Z2M interface by visiting http://192.168.50.69:8080/. However, that is not the case…
In my web browser I get a message saying that the page is not available.

Does anybody know what I am doing wrong?

Do you have something else stepping on port 8099, which is where it appears that you are telling zigbee2mqtt to display its gui? I used docker run rather than docker compose method to initially install my images to containers. If portainer is successfully running, can you view the tail of the other docker container logs, such as zigbee2mqtt? You should see Portainer on port 9000. I did not think you could mix the ‘host’ and ‘port’ setting when setting up a container, but perhaps this is only a problem when setting up a container with my docker run method, I think you can also get a containers log at the command line with:

 docker logs  zigbee2mqtt-1.27.2
docker run -i -t -d \
   --name="zigbee2mqtt-1.27.2" \
   -v /home/user/zigbee2mqtt/zigbee2mqtt-data:/app/data \
   -v /run/udev:/run/udev:ro \
   --device=/dev/ttyUSB0 \
   --user 1000:1000 \
   --group-add dialout \
   --net=host \
   -e TZ=America/Los_Angeles \
   koenkk/zigbee2mqtt:1.27.2

Do you have something else stepping on port 8099, which is where it appears that you are telling zigbee2mqtt to display its gui?

No, nothing on port 8099 either. Not quite sure why I have that in the config file, but I get the same negative results when I try to access that port.

I did not think you could mix the ‘host’ and ‘port’ setting when setting up a container…

I’m sorry, I’m not sure what you mean by that.

I’m able to get the log output of the Z2M yes. Here is a tail of it when I restart the container in Portainer:

Zigbee2MQTT:debug 2022-10-13 19:17:12: Saving state to file /app/data/state.json
Zigbee2MQTT:debug 2022-10-13 19:22:12: Saving state to file /app/data/state.json
Zigbee2MQTT:debug 2022-10-13 19:27:12: Saving state to file /app/data/state.json
Zigbee2MQTT:debug 2022-10-13 19:32:12: Saving state to file /app/data/state.json
Zigbee2MQTT:debug 2022-10-13 19:34:25: Saving state to file /app/data/state.json
Zigbee2MQTT:info  2022-10-13 19:34:25: MQTT publish: topic 'zigbee2mqtt/bridge/state', payload 'offline'
Zigbee2MQTT:info  2022-10-13 19:34:25: Disconnecting from MQTT server
Zigbee2MQTT:info  2022-10-13 19:34:25: Stopping zigbee-herdsman...
Zigbee2MQTT:info  2022-10-13 19:34:25: Stopped zigbee-herdsman
Zigbee2MQTT:info  2022-10-13 19:34:25: Stopped Zigbee2MQTT
Using '/app/data' as data directory
Zigbee2MQTT:info  2022-10-13 19:34:30: Logging to console and directory: '/app/data/log/2022-10-13.19-34-30' filename: log.txt
Zigbee2MQTT:info  2022-10-13 19:34:30: Starting Zigbee2MQTT version 1.28.0 (commit #03ba647)
Zigbee2MQTT:info  2022-10-13 19:34:30: Starting zigbee-herdsman (0.14.62)
Zigbee2MQTT:info  2022-10-13 19:34:31: zigbee-herdsman started (resumed)
Zigbee2MQTT:info  2022-10-13 19:34:31: Coordinator firmware version: '{"meta":{"maintrel":0,"majorrel":38,"minorrel":114,"product":0,"revision":"0x26720700","transportrev":0},"type":"ConBee2/RaspBee2"}'
Zigbee2MQTT:info  2022-10-13 19:34:37: Currently 0 devices are joined:
Zigbee2MQTT:info  2022-10-13 19:34:37: Zigbee: disabling joining new devices.
Zigbee2MQTT:error 2022-10-13 19:37:10: Failed to call 'Frontend' 'stop' (TypeError: Cannot read properties of null (reading 'clients')
    at Frontend.stop (/app/lib/extension/frontend.ts:59:39)
    at Controller.callExtensions (/app/lib/controller.ts:314:40)
    at Controller.stop (/app/lib/controller.ts:191:9)
    at stop (/app/index.js:113:5)
    at process.handleQuit (/app/index.js:119:9))
Zigbee2MQTT:error 2022-10-13 19:37:10: Not connected to MQTT server!
Zigbee2MQTT:error 2022-10-13 19:37:10: Cannot send message: topic: 'zigbee2mqtt/bridge/state', payload: 'offline
Zigbee2MQTT:info  2022-10-13 19:37:10: Disconnecting from MQTT server
TypeError: Cannot read properties of undefined (reading 'end')
    at MQTT.disconnect (/app/lib/mqtt.ts:129:21)
    at Controller.stop (/app/lib/controller.ts:196:9)
    at stop (/app/index.js:113:5)
    at process.handleQuit (/app/index.js:119:9)
Using '/app/data' as data directory
Zigbee2MQTT:info  2022-10-13 19:37:15: Logging to console and directory: '/app/data/log/2022-10-13.19-37-15' filename: log.txt
Zigbee2MQTT:info  2022-10-13 19:37:15: Starting Zigbee2MQTT version 1.28.0 (commit #03ba647)
Zigbee2MQTT:info  2022-10-13 19:37:15: Starting zigbee-herdsman (0.14.62)
Zigbee2MQTT:info  2022-10-13 19:37:16: zigbee-herdsman started (resumed)
Zigbee2MQTT:info  2022-10-13 19:37:16: Coordinator firmware version: '{"meta":{"maintrel":0,"majorrel":38,"minorrel":114,"product":0,"revision":"0x26720700","transportrev":0},"type":"ConBee2/RaspBee2"}'
Zigbee2MQTT:info  2022-10-13 19:37:19: Currently 0 devices are joined:
Zigbee2MQTT:info  2022-10-13 19:37:19: Zigbee: disabling joining new devices.
Zigbee2MQTT:info  2022-10-13 19:39:36: Connecting to MQTT server at mqtt://192.168.50.69:1883
Zigbee2MQTT:info  2022-10-13 19:39:36: Connected to MQTT server
Zigbee2MQTT:info  2022-10-13 19:39:36: MQTT publish: topic 'zigbee2mqtt/bridge/state', payload 'online'
Zigbee2MQTT:info  2022-10-13 19:39:36: Started frontend on port 0.0.0.0:8080
Zigbee2MQTT:info  2022-10-13 19:39:36: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"commit":"03ba647","coordinator":{"meta":{"maintrel":0,"majorrel":38,"minorrel":114,"product":0,"revision":"0x26720700","transportrev":0},"type":"ConBee2/RaspBee2"},"log_level":"info","network":{"channel":15,"extendedPanID":"0xdddddddddddddddd","panID":6754},"permit_join":false,"version":"1.28.0"}'
Zigbee2MQTT:info  2022-10-13 19:39:36: MQTT publish: topic 'zigbee2mqtt/bridge/state', payload 'online'

Okei, so after changing the frontend port to 8080 in the Z2M config file I got the web interface to show. That’s a bit embarrassing, but thank you for notifying it @dproffer. It got me one step further.
However, nothing seems to connect when I put my devices into pair mode and press the “Permit Join (All)” button. I have gotten to this point with another configuration earlier. I don’t have those configurations unfortunately. This almost leads me to believe that there is something wrong either with the MQTT broker or the hardware (i.e. the Conbee II itself)…

I have tried several times, as I have heard one might have to do, but still no connections. I am trying to pair an IKEA TRADFRI remote control. This is the log output from the Z2M container:

Zigbee2MQTT:info  2022-10-13 19:39:36: Connecting to MQTT server at mqtt://192.168.50.69:1883
Zigbee2MQTT:info  2022-10-13 19:39:36: Connected to MQTT server
Zigbee2MQTT:info  2022-10-13 19:39:36: MQTT publish: topic 'zigbee2mqtt/bridge/state', payload 'online'
Zigbee2MQTT:info  2022-10-13 19:39:36: Started frontend on port 0.0.0.0:8080
Zigbee2MQTT:info  2022-10-13 19:39:36: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"commit":"03ba647","coordinator":{"meta":{"maintrel":0,"majorrel":38,"minorrel":114,"product":0,"revision":"0x26720700","transportrev":0},"type":"ConBee2/RaspBee2"},"log_level":"info","network":{"channel":15,"extendedPanID":"0xdddddddddddddddd","panID":6754},"permit_join":false,"version":"1.28.0"}'
Zigbee2MQTT:info  2022-10-13 19:39:36: MQTT publish: topic 'zigbee2mqtt/bridge/state', payload 'online'
Zigbee2MQTT:info  2022-10-13 20:10:31: Zigbee: allowing new devices to join.
Zigbee2MQTT:info  2022-10-13 20:10:31: MQTT publish: topic 'zigbee2mqtt/bridge/response/permit_join', payload '{"data":{"time":254,"value":true},"status":"ok","transaction":"bbax5-1"}'
Zigbee2MQTT:info  2022-10-13 20:15:28: Zigbee: allowing new devices to join.
Zigbee2MQTT:info  2022-10-13 20:15:29: MQTT publish: topic 'zigbee2mqtt/bridge/response/permit_join', payload '{"data":{"time":254,"value":true},"status":"ok","transaction":"stekl-1"}'
Zigbee2MQTT:info  2022-10-13 20:22:36: Zigbee: allowing new devices to join.
Zigbee2MQTT:info  2022-10-13 20:22:37: MQTT publish: topic 'zigbee2mqtt/bridge/response/permit_join', payload '{"data":{"time":254,"value":true},"status":"ok","transaction":"stekl-2"}'
Zigbee2MQTT:info  2022-10-13 20:26:57: Zigbee: allowing new devices to join.
Zigbee2MQTT:info  2022-10-13 20:26:58: MQTT publish: topic 'zigbee2mqtt/bridge/response/permit_join', payload '{"data":{"time":254,"value":true},"status":"ok","transaction":"stekl-3"}'

The Mosquitto MQTT container has the following log output in Portainer

No log line matching the '' filter

But when I open a terminal inside it and run the command cat mosquitto/log/mosquitto.log I get the following output:

1665594587: mosquitto version 2.0.15 starting
1665594587: Config loaded from /mosquitto/config/mosquitto.conf.
1665594587: Opening ipv4 listen socket on port 1883.
1665594587: Opening ipv6 listen socket on port 1883.
1665594587: mosquitto version 2.0.15 running
1665594781: mosquitto version 2.0.15 terminating
1665594781: Saving in-memory database to /mosquitto/data//mosquitto.db.
1665594782: mosquitto version 2.0.15 starting
1665594782: Config loaded from /mosquitto/config/mosquitto.conf.
1665594782: Opening ipv4 listen socket on port 1883.
1665594782: Opening ipv6 listen socket on port 1883.
1665594782: mosquitto version 2.0.15 running
1665594856: New connection from 192.168.50.69:36987 on port 1883.
1665594856: New client connected from 192.168.50.69:36987 as 1EkPK19gAwxCtjYDVmF7cx (p1, c1, k60, u'hass').
1665594856: Client 1EkPK19gAwxCtjYDVmF7cx disconnected.
1665594856: New connection from 192.168.50.69:47061 on port 1883.
1665594856: New client connected from 192.168.50.69:47061 as 2CxFc1O28jxxYLxxKveu69 (p2, c1, k60, u'hass').
1665595278: New connection from 172.18.0.1:47740 on port 1883.
1665595278: New client connected from 172.18.0.1:47740 as mqttjs_25e7ab33 (p2, c1, k60, u'hass').
1665595336: Client 2CxFc1O28jxxYLxxKveu69 closed its connection.
1665595349: New connection from 192.168.50.69:57441 on port 1883.
1665595349: New client connected from 192.168.50.69:57441 as 4pWozNmsCGV54ihVYb4Wdb (p2, c1, k60, u'hass').
1665595465: Client mqttjs_25e7ab33 disconnected.
1665595512: New connection from 172.18.0.1:57042 on port 1883.
1665595512: New client connected from 172.18.0.1:57042 as mqttjs_eb7318e0 (p2, c1, k60, u'hass').
1665595526: Client mqttjs_eb7318e0 disconnected.
1665595532: New connection from 172.18.0.1:54012 on port 1883.
1665595532: New client connected from 172.18.0.1:54012 as mqttjs_919f3267 (p2, c1, k60, u'hass').
1665595567: New connection from 192.168.50.123:53975 on port 1883.
1665595567: New connection from 192.168.50.123:53976 on port 1883.
1665595567: Client <unknown> disconnected due to malformed packet.
1665595568: Client <unknown> disconnected due to malformed packet.
1665595568: New connection from 192.168.50.123:53977 on port 1883.
1665595568: Client <unknown> disconnected due to malformed packet.
1665595573: New connection from 192.168.50.123:53978 on port 1883.
1665595573: New connection from 192.168.50.123:53979 on port 1883.
1665595573: Client <unknown> disconnected due to malformed packet.
1665595634: Client <unknown> closed its connection.
1665595863: Client mqttjs_919f3267 disconnected.
1665596494: mosquitto version 2.0.15 terminating
1665596494: Saving in-memory database to /mosquitto/data//mosquitto.db.
1665596495: mosquitto version 2.0.15 starting
1665596495: Config loaded from /mosquitto/config/mosquitto.conf.
1665596495: Opening ipv4 listen socket on port 1883.
1665596495: Opening ipv6 listen socket on port 1883.
1665596495: mosquitto version 2.0.15 running
1665596497: New connection from 192.168.50.69:60757 on port 1883.
1665596497: New client connected from 192.168.50.69:60757 as 4pWozNmsCGV54ihVYb4Wdb (p2, c1, k60, u'hass').
1665596978: New connection from 172.18.0.1:40622 on port 1883.
1665596978: New client connected from 172.18.0.1:40622 as mqttjs_81968336 (p2, c1, k60, u'hass').
1665597274: mosquitto version 2.0.15 terminating
1665597274: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665598509: mosquitto version 2.0.15 starting
1665598509: Config loaded from /mosquitto/config/mosquitto.conf.
1665598509: Opening ipv4 listen socket on port 1883.
1665598509: Opening ipv6 listen socket on port 1883.
1665598509: mosquitto version 2.0.15 running
1665598516: New connection from 192.168.50.69:38647 on port 1883.
1665598516: New client connected from 192.168.50.69:38647 as 7GUpbpDXAGHUXFk2bL6OaZ (p2, c1, k60, u'hass').
1665598588: New connection from 172.18.0.1:35698 on port 1883.
1665598588: New client connected from 172.18.0.1:35698 as mqttjs_65199989 (p2, c1, k60, u'hass').
1665598627: Client mqttjs_65199989 disconnected.
1665598633: New connection from 172.18.0.1:38592 on port 1883.
1665598633: New client connected from 172.18.0.1:38592 as mqttjs_15fdc22d (p2, c1, k60, u'hass').
1665600310: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665602111: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665603912: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665605713: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665607514: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665609315: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665611116: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665612917: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665614718: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665616519: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665618320: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665620121: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665621922: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665623723: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665625524: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665627325: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665629126: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665630927: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665632728: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665634529: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665636330: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665638131: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665639932: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665641733: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665643534: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665645335: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665647136: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665648937: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665650738: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665652539: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665654340: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665656141: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665657942: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665659743: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665661544: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665663345: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665665146: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665666947: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665668748: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665670549: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665672350: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665674151: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665675952: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665677753: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665679554: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665681355: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665682465: Client mqttjs_15fdc22d disconnected.
1665682629: mosquitto version 2.0.15 terminating
1665682629: Saving in-memory database to /mosquitto/data/mosquitto.db.
1665682630: mosquitto version 2.0.15 starting
1665682630: Config loaded from /mosquitto/config/mosquitto.conf.
1665682630: Opening ipv4 listen socket on port 1883.
1665682630: Opening ipv6 listen socket on port 1883.
1665682630: mosquitto version 2.0.15 running
1665682631: New connection from 192.168.50.69:37733 on port 1883.
1665682631: New client connected from 192.168.50.69:37733 as 7GUpbpDXAGHUXFk2bL6OaZ (p2, c1, k60, u'hass').
1665682776: New connection from 172.18.0.1:55814 on port 1883.
1665682776: New client connected from 172.18.0.1:55814 as mqttjs_f54116a7 (p2, c1, k60, u'hass').
1665684431: Saving in-memory database to /mosquitto/data/mosquitto.db.

Not sure what all those new connections are, and why this log does not show up in the Portainer log.

Also. Not sure what to do from here.

Glad you are making a little progress! Lots here, lets see if I can help:

kind of random order parsing thru yoour points.

1)MQTT stuff, I do not think that my MQTT server logs to docker log either, I could not get that to work as I remember and ended up putting some config stuff in to MQTT to get logs to write to a directory on the docker host machine, this so I could monitor between restarts. I dont’ have access to that config right, will post later.
I think the ‘connection’ messages you are seeing are mqtt clients connecting to the mqtt server, this should be normal.

  1. Zigbee not allowing pairing. I do not see the entries in the zigbee2mqtt logs showing how zigbee2mqtt is connecting to the zigbee adapter. This can be a pain at times with docker and usb. The usb ‘path’ sometime can change between docker container restarts or machine restarts.

The mqtt server should not have an effect on the ability for zigbee2mqtt to pair with devices. You can start and stop zigbee pairing from the zigbee2mqtt gui. It is in the upper right corner of screen. The user interface is a bit weird, so read the docs and play around with various ‘presses’ of this pairing gui item.

You will get it!

Here is my Mosquitto v2 docker setup stuff:

----- how I install mqtt server into docker and start first time, from then on I use portainer
----- I map a directory on host ubuntu machine /home/user/mosquitto-2 to a virtual directory
----- inside the docker container /mosquitto/config
----- in the mosquitto.conf file located in the host directory /home/user/mosquitto-2
----- the location of the mosquitto log file.
----- it is a bit hard to get all the directory locations lined up
----- 
docker run -i -t -d --name="mosquitto-2" \
    -p 1883:1883 -p 9001:9001 \
    -v /home/user/mosquitto-2:/mosquitto/config \
    -v /etc/localtime:/etc/localtime:ro \
    --user $(id -u):$(id -g) \
    eclipse-mosquitto:2.0.4


----- mosquitto.conf
#
listener 1883
allow_anonymous true
log_timestamp_format %Y-%m-%dT%H:%M:%S
connection_messages false
persistence true
persistence_location /mosquitto/config/
log_dest file /mosquitto/config/mosquitto.log

----- 

1 Like

Okei, sorry for the random, long messages and thank you for the encouragement and info. Again, greatly appreciated.

Not quite sure what this log statement would look like, but was it something like one of these?

Zigbee2MQTT:info  2022-10-13 19:37:16: Coordinator firmware version: '{"meta":{"maintrel":0,"majorrel":38,"minorrel":114,"product":0,"revision":"0x26720700","transportrev":0},"type":"ConBee2/RaspBee2"}'
...
Zigbee2MQTT:info  2022-10-13 19:39:36: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"commit":"03ba647","coordinator":{"meta":{"maintrel":0,"majorrel":38,"minorrel":114,"product":0,"revision":"0x26720700","transportrev":0},"type":"ConBee2/RaspBee2"},"log_level":"info","network":{"channel":15,"extendedPanID":"0xdddddddddddddddd","panID":6754},"permit_join":false,"version":"1.28.0"}'

I am at least forwarding the /dev/ttyACM0 and thus far it has always been registered as such. Do you think it would be more stable/predictable/reliable using the /dev/serial/by-id/<full_device_name> instead? Like this:

devices:
      - "/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2655021-if00:/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2655021-if00"

I do not use a ConBee2 as my zigbee coordinator, so you might want to search these forums for message and folks that might be more knowledgable. It does look like from your log that the adapter is connecting to zigbee2mqtt. If you can place a zigbee device near your Conbee2 and place them both in ‘pairing’ mode, what happens??? See picture below of the zigbee2mqtt gui pairing button:

Nothing happens after I put them both in pair mode.
Here is a screenshot of the Z2M site:


And this is a picture of the IKEA remote in pair mode next to the Raspberry Pi with the Zigbee adapter:

Well that seems pretty simple. Frustrating!!!

Yes, while they are both in pairing mode, you should see a series of green (maybe a red one or two) dialog boxes appear on the zigbee2mqtt screen showing the progress with the pairing.

Any chance you have a zigbee device that is not battery powered to do the test with. I have a different Ikea zigbee battery remote and it is a real PIA to get paired. Just it’s bad behavior has gotten in the way of me diagnosing other issues I was trying to resolve.

I think you said that you had this working at one time, correct? If so what changed then to now?

While with the devices this close, I can think they would not see each other ever with lots of RF noise, there is often a recommendation to put a USB 2.0 extension cable of at least 2 or 3 feet or 1 meter in order to get the zigbee coordinator adapter away from any RF interference from the RPI.

You can add to your mqtt conf for docker logs

log_dest stdout
log_timestamp true
log_timestamp_format %Y-%m-%dT%H:%M:%S

Although I must say it was a bit slower than the file tbh, not sure why.
Actually seems fine today. Was probably just me

2 Likes

I think you said that you had this working at one time, correct? If so what changed then to now?

Well, I had it working as well as it does now. Which is; nothing connects, but everything seems to be working as it’s supposed to.
I have not tried the USB extension cable, but that is yet another good suggestion. I’ll give it a try. Although, I feel like I should have been able to se something. I’m actually not sure I have any non-battery powered zigbee decices. None that comes to mind that would connect to the adapter I would think.

Thank you @HasQT, I’ll try that out.

1 Like

So I was doing other stuff when your post came up, but I finally got around to trying this out.

I got my xiaomi temp thingy( Xiaomi WSDCGQ01LM) to connect

I had full device id instead of the above ttyACM0, in compose stack.
Nothing extra compared to you for z2m config.yaml
So like this.

  zigbee2mqtt:
    container_name: zigbee2mqtt
    image: koenkk/zigbee2mqtt:latest
    restart: unless-stopped
    volumes:
      -/YOUR/BASE/DIRS/homeassistant/zigbee2mqtt:/app/data   ### lands in HA dir
      - /run/udev:/run/udev:ro
    ports:
      # Frontend port
      - 8080:8080
    environment:
      - TZ=Australia/Sydney
    devices:
      # Make sure this matched your adapter location
      #- /dev/ttyACM0:/dev/ttyACM0
      - "/dev/serial/by-id/usb-Texas_Instruments_TI_CC2531_USB_CDC___0X001349839faked23984-if00:/dev/ttyACM0"

## note the :/dev/ttyACM0 at the end of device

notes:

It failed pairing interview until I had it very close, though that is fairly normal for my setup.

That sun button in the frontend is the switch for light/dark scheme.
You need to click on the actual dropdown box(just to the left of the sun) to start pairing mode.

bonus:
You can add an panel button to frontend (it’s probably not https, I haven’t setup https atm)

panel_iframe:
  zigbee2mqtt:
    title: 'Zigbee2mqtt'
    url: http://yourIP:8080
    icon: mdi:zigbee   

edit: It actually also works with

- "/dev/ttyACM0:/dev/ttyACM0"

@HasQT those are good suggestions. I have tried both ways actually. Using full device ID and the ttyACM0 path. None of them work. The only difference between our Z2M docker-compose service is the base directories, the TZ env variable and the actual full device ID. I can’t imagine that the path/base dir would make that difference. I have tried placing them in the /opt dir earlier with the same outcome.
Also, I have read somewhere that the deConz Conbee II adapters have had some issues with compatibility. However, this is my second Conbee II and the behavior is the same on both. Maybe I should have went for a different device…
I’m clicking the button that belongs to the dropdown. I can see from the logs that it allows devices to join:

Zigbee2MQTT:info  2022-10-18 18:57:22: Zigbee: allowing new devices to join.
1 Like

Does the conbee have a light to indicate pairing mdoe?

Have you tried an extension usb cable?

I cannot believe it @HasQT. I plugged the Zigbee adapter to an extension cable and it worked! And pretty quickly at that.

Thank you very much for your help. It is greatly appreciated. You too @dproffer.

1 Like