Hi,
I messed up but don’t know what I did wrong.
I’ve updated both the ConbeeII stick and Ubuntu Server , and now zigbee2mqtt gives the following error when starting Docker Compose:
Attaching to zigbee2mqtt
zigbee2mqtt | Using '/app/data' as data directory
zigbee2mqtt | Zigbee2MQTT:info 2024-05-01 09:43:35: Logging to console and directory: '/app/data/log/2024-05-01.09-43-35' filename: log.txt
zigbee2mqtt | Zigbee2MQTT:info 2024-05-01 09:43:35: Starting Zigbee2MQTT version 1.36.1 (commit #ffc2ff1)
zigbee2mqtt | Zigbee2MQTT:info 2024-05-01 09:43:35: Starting zigbee-herdsman (0.40.3)
zigbee2mqtt | Zigbee2MQTT:error 2024-05-01 09:43:46: Error while starting zigbee-herdsman
zigbee2mqtt | Zigbee2MQTT:error 2024-05-01 09:43:46: Failed to start zigbee
zigbee2mqtt | Zigbee2MQTT:error 2024-05-01 09:43:46: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
zigbee2mqtt | Zigbee2MQTT:error 2024-05-01 09:43:46: Exiting...
zigbee2mqtt | Zigbee2MQTT:error 2024-05-01 09:43:46: undefined
zigbee2mqtt exited with code 0
For troubleshooting:
ls -l /dev/serial/by-id:
lrwxrwxrwx 1 root root 13 May 1 09:33 usb-0658_0200-if00 -> ../../ttyACM0
lrwxrwxrwx 1 root root 13 May 1 09:33 usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2128773-if00 -> ../../ttyACM1
docker compose file contains:
zigbee2mqtt:
container_name: zigbee2mqtt
image: koenkk/zigbee2mqtt
restart: unless-stopped
volumes:
- /opt/zigbee2mqtt/data:/app/data
- /run/udev:/run/udev:ro
ports:
- 8080:8080
environment:
- TZ=Europe/Brussels
devices:
- /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2128773-if00:/dev/ttyACM0
zigbee2mqtt/data/configuration.yaml:
homeassistant: true
frontend: true
permit_join: false
mqtt:
base_topic: zigbee2mqtt
server: mqtt://10.27.27.24:1883
user: admin
password: xxxx
serial:
port: /dev/ttyACM0
adapter: deconz
disable_led: false
baudrate: 115200
rtscts: false
advanced:
network_key:
- 28
- 52
- 208
- 181
- 104
- 3
- 126
- 190
- 120
- 20
- 66
- 237
- 110
- 20
- 185
- 88
log_level: info
Any idea?
Tinkerer
(aka DubhAd on GitHub)
May 1, 2024, 8:04am
2
That error usually means a problem with the broker comms. Can it reach the broker on that IP? Do those details work in something like MQTT Explorer ?
MQTT seems to be up and running:
francisp
(Francis)
May 1, 2024, 11:04am
4
Maybe set log level to debug.
I might be wrong, but one place you are pointing to ttyACM1 and another ttyACM0, might that be the issue?
Thx, some more info in debug-log:
debug 2024-05-01 13:08:59: Loaded state from file /app/data/state.json
info 2024-05-01 13:08:59: Logging to console and directory: '/app/data/log/2024-05-01.13-08-59' filename: log.txt
debug 2024-05-01 13:08:59: Removing old log directory '/app/data/log/2024-05-01.13-05-26'
info 2024-05-01 13:08:59: Starting Zigbee2MQTT version 1.36.1 (commit #ffc2ff1)
info 2024-05-01 13:08:59: Starting zigbee-herdsman (0.40.3)
debug 2024-05-01 13:08:59: Using zigbee-herdsman with settings: '{"adapter":{"concurrent":null,"delay":null,"disableLED":false},"backupPath":"/app/data/coordinator_backup.json","databaseBackupPath":"/app/data/database.db.backup","databasePath":"/app/data/database.db","network":{"channelList":[11],"extendedPanID":[221,221,221,221,221,221,221,221],"networkKey":"HIDDEN","panID":6754},"serialPort":{"adapter":"deconz","baudRate":115200,"path":"/dev/ttyACM0","rtscts":false}}'
error 2024-05-01 13:09:10: Error while starting zigbee-herdsman
error 2024-05-01 13:09:10: Failed to start zigbee
error 2024-05-01 13:09:10: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
error 2024-05-01 13:09:10: Exiting...
error 2024-05-01 13:09:10: undefined
Changed to ttyACM1:
zigbee2mqtt:
container_name: zigbee2mqtt
image: koenkk/zigbee2mqtt
restart: unless-stopped
volumes:
- /opt/zigbee2mqtt/data:/app/data
- /run/udev:/run/udev:ro
ports:
- 8080:8080
environment:
- TZ=Europe/Brussels
devices:
- /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2128773-if00:/dev/ttyACM1
serial:
port: /dev/ttyACM1
adapter: deconz
Gives this error:
debug 2024-05-01 13:20:20: Loaded state from file /app/data/state.json
info 2024-05-01 13:20:20: Logging to console and directory: '/app/data/log/2024-05-01.13-20-20' filename: log.txt
debug 2024-05-01 13:20:20: Removing old log directory '/app/data/log/2024-05-01.13-17-19'
info 2024-05-01 13:20:20: Starting Zigbee2MQTT version 1.36.1 (commit #ffc2ff1)
info 2024-05-01 13:20:20: Starting zigbee-herdsman (0.40.3)
debug 2024-05-01 13:20:20: Using zigbee-herdsman with settings: '{"adapter":{"concurrent":null,"delay":null,"disableLED":false},"backupPath":"/app/data/coordinator_backup.json","databaseBackupPath":"/app/data/database.db.backup","databasePath":"/app/data/database.db","network":{"channelList":[11],"extendedPanID":[221,221,221,221,221,221,221,221],"networkKey":"HIDDEN","panID":6754},"serialPort":{"adapter":"deconz","baudRate":115200,"path":"/dev/ttyACM1","rtscts":false}}'
error 2024-05-01 13:20:30: Error while starting zigbee-herdsman
error 2024-05-01 13:20:30: Failed to start zigbee
error 2024-05-01 13:20:30: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
error 2024-05-01 13:20:30: Exiting...
error 2024-05-01 13:20:30: undefined
francisp
(Francis)
May 1, 2024, 11:22am
9
francisp:
Try adding
privileged: true
to your docker-compose
And did you add the docker user to the dailout group ?
jellelle
(jelle)
May 1, 2024, 11:27am
10
privileged: true
Same error
And did you add the docker user to the dailout group ?
How do i do that? I run as root (i think)
francisp
(Francis)
May 1, 2024, 11:32am
11
opened 08:38PM - 09 Jan 22 UTC
closed 04:27PM - 10 Jan 22 UTC
problem
### What happened?
I tried running Zigbee2MQTT as a rootless Docker container… . Unfortunately, the container does not start correctly because it does not have access to the corresponding Zigbee device.
### What did you expect to happen?
I expected the container to start with no root privileges or errors.
### How to reproduce it (minimal and precise)
Start the compose file:
```yaml
version: "3.5"
services:
bridge:
image: koenkk/zigbee2mqtt
restart: unless-stopped
environment:
- ZIGBEE2MQTT_CONFIG_MQTT_SERVER=mqtt://broker:1883
- ZIGBEE2MQTT_CONFIG_FRONTEND_PORT=8080
- ZIGBEE2MQTT_CONFIG_HOMEASSISTANT=true
- TZ=Europe/Berlin
volumes:
- /run/udev:/run/udev:ro
networks:
default:
group_add:
- dialout
user: 1000:1000
devices:
- /dev/ttyACM0
```
### Zigbee2MQTT version
1.22.2
### Adapter firmware version
0x26720700
### Adapter
Conbee II
### Debug log
Container:
```
/dev $ ls -lah
crw-rw---- 1 root dialout 166, 0 Jan 9 21:16 ttyACM0
/app $ test -w /dev/ttyACM0 && echo success || echo failure
failure
```
```
smarthome-bridge-1 | 2022-01-09T20:14:50.440720251Z Zigbee2MQTT:info 2022-01-09 21:14:50: Logging to console and directory: '/app/data/log/2022-01-09.21-14-35' filename: log.txt
smarthome-bridge-1 | 2022-01-09T20:14:50.626601810Z Zigbee2MQTT:info 2022-01-09 21:14:50: Starting Zigbee2MQTT version 1.22.2 (commit #414c51f)
smarthome-bridge-1 | 2022-01-09T20:14:50.647804760Z Zigbee2MQTT:info 2022-01-09 21:14:50: Starting zigbee-herdsman (0.13.188)
smarthome-bridge-1 | 2022-01-09T20:14:54.160397538Z CREATED DECONZ ADAPTER
smarthome-bridge-1 | 2022-01-09T20:14:54.228855177Z Zigbee2MQTT:error 2022-01-09 21:14:54: Error while starting zigbee-herdsman
smarthome-bridge-1 | 2022-01-09T20:14:54.239459861Z Zigbee2MQTT:error 2022-01-09 21:14:54: Failed to start zigbee
smarthome-bridge-1 | 2022-01-09T20:14:54.248763592Z Zigbee2MQTT:error 2022-01-09 21:14:54: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
smarthome-bridge-1 | 2022-01-09T20:14:54.258128194Z Zigbee2MQTT:error 2022-01-09 21:14:54: Exiting...
smarthome-bridge-1 | 2022-01-09T20:14:54.981823885Z Zigbee2MQTT:error 2022-01-09 21:14:54: Error: Error while opening serialport 'Error: Error: Permission denied, cannot open /dev/ttyACM0'
```
Host-System:
```
➜ smarthome git:(master) l /dev/ttyACM0
crw-rw---- 1 root dialout 166, 0 Jan 9 21:17 /dev/ttyACM0
➜ smarthome git:(master) id
uid=1000(bananapi) gid=1000(thueske) groups=1000(bananapi),5(tty),6(disk),20(dialout),27(sudo),29(audio),44(video),46(plugdev),60(games),100(users),102(systemd-journal),106(input),110(netdev),112(ssh),998(docker)
➜ smarthome git:(master) test -w /dev/ttyACM0 && echo success || echo failure
success
```
and
https://www.xmodulo.com/change-usb-device-permission-linux.html
Fixed: I tested the stick with the official Phoscon App, and I saw Firmware: Not connected
. I must have done something wrong during the firmware update I suppose.
Thanks Tinkerer , fleskefjes and francisp . I’ve learned some new things today.
2 Likes