#I'm trying to setup a docker environment
1 messages · Page 1 of 1 (latest)
What does the compose file look like for Z2M?
What does your Z2M config look like?
Does Z2M's log say it started the frontend?
mqtt:
base_topic: zigbee2mqtt
server: mqtt://10.0.0.5
user: musungo
password: Katon5678!
serial:
port: /dev/ttyUSB0
advanced:
homeassistant_legacy_entity_attributes: false
legacy_api: false
legacy_availability_payload: false
homeassistant: true
device_options:
legacy: false
frontend: true
``` Configuration.yaml
```yaml
version: '3'
services:
zigbee2mqtt:
container_name: zigbee2mqtt
restart: unless-stopped
devices:
- /dev/ttyUSB0:/dev/ttyUSB0
ports:
- "8099:8099"
volumes:
- ./data:/app/data
- /run/udev:/run/udev:ro
environment:
- TZ=America/Phoenix
image: koenkk/zigbee2mqtt
``` docker-compose
You should see something like:
info 2022-10-04 13:08:34: Logging to console and directory: '/app/data/log/2022-10-04.13-08-34' filename: log.txt
info 2022-10-04 13:08:34: Starting Zigbee2MQTT version 1.28.0 (commit #03ba647)
info 2022-10-04 13:08:34: Starting zigbee-herdsman (0.14.62)
info 2022-10-04 13:08:37: zigbee-herdsman started (resumed)
info 2022-10-04 13:08:37: Coordinator firmware version: '{"meta":{"maintrel":3,"majorrel":2,"minorrel":6,"product":0,"revision":20190619,"transportrev":2},"type":"zStack12"}'
info 2022-10-04 13:08:37: Currently 1 devices are joined:
info 2022-10-04 13:08:37: 0x0015bc001a01e59c (0x0015bc001a01e59c): MOSZB-140 - Develco Motion sensor (EndDevice)
info 2022-10-04 13:08:37: Zigbee: disabling joining new devices.
info 2022-10-04 13:08:38: Connecting to MQTT server at mqtt://172.23.72.30
info 2022-10-04 13:08:38: Connected to MQTT server
info 2022-10-04 13:08:38: MQTT publish: topic 'z2m_test/bridge/state', payload '{"state":"online"}'
info 2022-10-04 13:08:39: MQTT publish: topic 'z2m_test/0x0015bc001a01e59c/availability', payload '{"state":"online"}'
info 2022-10-04 13:08:39: Started frontend on port 0.0.0.0:8080
Ok, so all you did was turn on the frontend, on the default port
That port isn't 8099
I can't reach it at 8080 either
(Also, use the /dev/serial/by-id/ path in the compose file)
Well, set the internal port back to 8080 and check the Z2M log file
GNU nano 7.2 log.txt
info 2024-01-15 23:08:27: Logging to console and directory: '/app/data/log/2024-01-15.23-08-27' filename: log.txt
info 2024-01-15 23:08:28: Starting Zigbee2MQTT version 1.35.1 (commit #9eaaa0f)
info 2024-01-15 23:08:28: Starting zigbee-herdsman (0.30.0)
info 2024-01-15 23:08:29: zigbee-herdsman started (resumed)
info 2024-01-15 23:08:29: Coordinator firmware version: '{"meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20210708,"transportrev":2},"type":"zStack3x0"}'
info 2024-01-15 23:08:29: Currently 0 devices are joined:
info 2024-01-15 23:08:29: Zigbee: disabling joining new devices.
info 2024-01-15 23:08:29: Connecting to MQTT server at mqtt://10.0.0.5
info 2024-01-15 23:08:29: Connected to MQTT server
info 2024-01-15 23:08:29: MQTT publish: topic 'zigbee2mqtt/bridge/state', payload '{"state":"online"}'
info 2024-01-15 23:08:29: Started frontend on port 8080
info 2024-01-15 23:08:29: Zigbee2MQTT started!
info 2024-01-16 08:05:15: MQTT publish: topic 'zigbee2mqtt/bridge/state', payload '{"state":"offline"}'
info 2024-01-16 08:05:15: Disconnecting from MQTT server
info 2024-01-16 08:05:15: Stopping zigbee-herdsman...
info 2024-01-16 08:05:24: Stopped zigbee-herdsman
info 2024-01-16 08:05:24: Stopped Zigbee2MQTT```
Theres the curren't log. I'll change the internal port
Started on 8080 😉
devices:
- /dev/serial/by-id/usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B0018E1F2ED-if00:/dev/ttyUSB0
``` from my test Z2M box
Avoids problems when that becomes ttyUSB1
Annddd I feell dum
Works now?
Thanks for the fix magic man, ye 🤣
Can't belive I made such a grade schooler mistake
The magic of rubber duck debugging
No joke
devices:
- /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_ecae9aadba45ed11a65dcf8f0a86e0b4-if00-port0:/dev/ttyUSB0``` like this?
Makes sense