Hey all,
I am still a HA noob and I cannot figure out what I am missing.
I run HA, zigbee2mqtt and mosquitto on my raspberry pi 4 in docker containers.
Everything seems to work. But, when I try to connect devices via zigbee2mqtt, nothing happens.
I open the zigbee2mqtt frontend, click on permit join (ALL) and start pairing mode on device (tried it with the sonoff wirless switch and the temperature and humidity sensor; SNZB-01 and SNZB-02).
But when configuring ZHA in HA, I can detect and connect the devices. So the stick works, no?
my compose.yml is:
version: '3'
services:
homeassistant:
container_name: homeassistant
image: "[ghcr.io/home-assistant/home-
assistant:stable](https://ghcr.io/home-
assistant/home-assistant:stable)"
volumes:
- /docker/homeassistant:/config
- /etc/localtime:/etc/localtime:ro
- /run/dbus:/run/dbus:ro
restart: unless-stopped
privileged: true
network_mode: host
environment:
DISABLE_JEMALLOC: true
ports:
- 8123:8123
mosquitto:
image: eclipse-mosquitto
container_name: mosquitto
volumes:
- /docker/mosquitto:/mosquitto
- /docker/mosquitto/data:/mosquitto/data
- /docker/mosquitto/log:/mosquitto/log
network_mode: host
zigbee2mqtt:
container_name: zigbee2mqtt
restart: unless-stopped
image: koenkk/zigbee2mqtt
network_mode: host
volumes:
- /zigbee2mqtt/data:/app/data
- /run/udev:/run/udev:ro
environment:
- TZ=Europe/Berlin
depends_on:
- mosquitto
devices:
- /dev/serial/by-id/usb-Silicon\_Labs\_Sonoff\_Zigbee\_3.0\_USB\_Dongle\_Plus\_0001-if00-port0:/dev/ttyACM0
# using /Dev/ttyUSB0:/dev/ttyACM0 does not seem to make a difference
my mosquitto.conf:
persistence true
persistence_location /mosquitto/data/
log_dest file /mosquitto/log/mosquitto.log
listener 1883
## Authentication ##
allow_anonymous true
password_file /mosquitto/config/password.txt
and my zigbee2mqtt configuration.yaml:
homeassistant: true
# Let new devices join our zigbee network
permit_join: true
# Docker Compose makes the MQTT-Server available using "mqtt" hostname
mqtt:
base_topic: zigbee2mqtt
server: "mqtt://localhost:1883"
user: "user"
password: "password"
client_id: "zigbee2mqtt"
# Zigbee Adapter path
serial:
port: /dev/serial/by-id/usb-Silicon_Labs_Sonoff_Zigbee_3.0_USB_Dongle_Plus_0001-if00-port0 # Here it also does not seem to matter if i use /dev/ttyUSB0 or /dev/ttyACM0. Is it because of the mapping in the compose.yml?
# Enable the Zigbee2MQTT frontend
frontend:
port: 8080
# Let Zigbee2MQTT generate a new network key on first start
advanced:
network_key: GENERATE
And these are the logs from the zigbee2mqtt container from portainer:
Zigbee2MQTT:info 2023-12-31 14:09:52: Starting zigbee-herdsman (0.25.0)
Zigbee2MQTT:info 2023-12-31 14:09:53: zigbee-herdsman started (resumed)
Zigbee2MQTT:info 2023-12-31 14:09:53: Coordinator firmware version: ‘{“meta”:{“maintrel”:1,“majorrel”:2,“minorrel”:7,“product”:1,“revision”:20210708,“transportrev”:2},“type”:“zStack3x0”}’
Zigbee2MQTT:info 2023-12-31 14:09:53: Currently 0 devices are joined:
Zigbee2MQTT:info 2023-12-31 14:09:53: Zigbee: disabling joining new devices.
Zigbee2MQTT:info 2023-12-31 14:09:53: Connecting to MQTT server at mqtt://localhost
Zigbee2MQTT:info 2023-12-31 14:09:53: Connected to MQTT server
Zigbee2MQTT:info 2023-12-31 14:09:53: MQTT publish: topic ‘zigbee2mqtt/bridge/state’, payload ‘{“state”:“online”}’
Zigbee2MQTT:info 2023-12-31 14:09:54: Started frontend on port 8080
Zigbee2MQTT:info 2023-12-31 14:09:54: Zigbee2MQTT started!
When I click on “permit join (ALL)” it gives me this:
Zigbee2MQTT:info 2023-12-31 14:10:04: Zigbee: allowing new devices to join.
So, what am I missing?