Page 1 of 1

Dockge and Zigbee not running

Posted: Tuesday 10 June 2025 17:36
by hjzwiers
I have set this up in Dockge:

services:
zigbee2mqtt:
container_name: zigbee2mqtt
image: ghcr.io/koenkk/zigbee2mqtt
restart: unless-stopped
volumes:
- ./data:/app/data
- /run/udev:/run/udev:ro
ports:
# Frontend port
- 8099:8099
environment:
- TZ=Europe/Amsterdam
devices:
# Make sure this matched your adapter location
- /dev/serial/by-id/usb-Itead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2_cc03fed5943aef11aca9331455516304-if00-port0:/dev/ttyUSB0
networks: {}

with my config file:
version: 4
mqtt:
base_topic: zigbee2mqtt
server: 'mqtt://192.168.2.71:1883'
user: hjz
password: 7184!@#$
serial:
port: /dev/serial/by-id/usb-Itead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2_cc03fed5943aef11aca9331455516304-if00-port0
adapter: ember
advanced:
log_level: info
channel: 11
network_key: GENERATE
pan_id: GENERATE
ext_pan_id: GENERATE
frontend:
enabled: true
package: zigbee2mqtt-frontend
port: 8099
homeassistant:
enabled: true
onboarding: true

It says "service device services.zigbee2mqtt.devices.[0] is missing a mount target" and I cannot connect to the front end ...... Do you have an idea what is wrong?

Re: Dockge and Zigbee not running

Posted: Tuesday 10 June 2025 17:57
by waltervl
I think you should skip DockGe for now and concentrate on getting Domoticz and Zigbee2MQTT running as Docker containers (without DockGe)

Re: Dockge and Zigbee not running

Posted: Tuesday 10 June 2025 18:02
by eddieb
I doubt it has anything to do with Dockge ... Just a docker management interface. `
The yml can be started from cli as normal docker

Re: Dockge and Zigbee not running

Posted: Tuesday 10 June 2025 18:05
by waltervl
Port for the USB in the zigbee2mqtt config should be /dev/ttyUSB0 and not /dev/serial/by-id/usb-Itead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2_cc03fed5943aef11aca9331455516304-if00-port0

So from your system the docker translates
/dev/serial/by-id/usb-Itead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2_cc03fed5943aef11aca9331455516304-if00-port0
into
/dev/ttyUSB0

Then in your config of zigbee2mqtt within the docker container you should use /dev/ttyUSB0. The /dev/serial/by-id/ is unkown for zigbee2mqtt in the zigbee2mqtt docker container.

Re: Dockge and Zigbee not running

Posted: Tuesday 10 June 2025 20:40
by eddieb
Ok, below my compose.yml for zigbee2mqtt

Code: Select all

services:
  zigbee2mqtt:
    container_name: zigbee2mqtt
    image: ghcr.io/koenkk/zigbee2mqtt
    restart: unless-stopped
    dns_search: .
    environment:
      - TZ=Europe/Amsterdam
    volumes:
      - ./data:/app/data
      - /run/udev:/run/udev:ro
    ports:
      # frontend port
      - 8888:8888
    devices:
      - /dev/serial/by-id/usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B0014D9C37B-if00:/dev/ttyUSB0
    group_add:
      - dialout
    #    user: 1000:1000
networks: {}
starting this gives the following log

Code: Select all

Using '/app/data' as data directory
Starting Zigbee2MQTT without watchdog.
[2025-06-10 20:36:20] info: 	z2m: Logging to console, file (filename: log.log)
[2025-06-10 20:36:20] info: 	z2m: Starting Zigbee2MQTT version 2.3.0 (commit #aec59cb774aa09a793ae41cd60e6a5cef15b293c
)
[2025-06-10 20:36:20] info: 	z2m: Starting zigbee-herdsman (4.0.0)
[2025-06-10 20:36:20] info: 	zh:zstack:znp: Opening SerialPort with {"path":"/dev/ttyUSB0","baudRate":115200,"rtscts":false,"autoOpen":false}
[2025-06-10 20:36:25] info: 	zh:zstack:znp: Serialport opened
[2025-06-10 20:37:30] error: 	z2m: Error while starting zigbee-herdsman
[2025-06-10 20:37:30] error: 	z2m: Failed to start zigbee-herdsman
[2025-06-10 20:37:30] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html for possible solutions
[2025-06-10 20:37:30] error: 	z2m: Exiting...
[2025-06-10 20:37:30] error: 	z2m: Error: AREQ - ZDO - stateChangeInd after 60000ms
    at Object.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/utils/waitress.ts:67:23)
    at ZnpAdapterManager.beginStartup (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/manager.ts:279:27)
    at ZnpAdapterManager.beginCommissioning (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/manager.ts:370:13)
    at ZnpAdapterManager.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/manager.ts:87:21)
    at ZStackAdapter.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:154:16)
    at Controller.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/controller/controller.ts:133:29)
    at Zigbee.start (/app/lib/zigbee.ts:70:27)
    at Controller.start (/app/lib/controller.ts:104:13)
    at start (/app/index.js:149:5)
Container stopped
suggestions are welcome

Re: Dockge and Zigbee not running

Posted: Tuesday 10 June 2025 21:57
by Varazir
this is my setup https://gist.github.com/varazir/65909bd ... 41aef37103

Now day's when I get an error I past it into chatgpt or Gemini and usually get good answer back.

Re: Dockge and Zigbee not running

Posted: Tuesday 10 June 2025 22:11
by hjzwiers
the right settings are full version in the compose file (dev/serial/by-id/usb-Itead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2_cc03fed5943aef11aca9331455516304-if00-port0:/dev/ttyUSB0) and the short version (port: /dev/ttyUSB0) in the config file.

Its working now, thanks. I have the data in the remote viewer, now to get them in domoticz ..... (I have auto MQTT Auto Discovery on but still wonder where the sensors are .....)

Re: Dockge and Zigbee not running

Posted: Tuesday 10 June 2025 22:45
by Varazir
Screenshot your settings for the auto MQTT Auto Discovery settings in Domoticz..

This is mine. I hade some issue suing local host and 172.0.0.1 so I use the IP my pie get from my router.
Image

Re: Dockge and Zigbee not running

Posted: Tuesday 10 June 2025 22:47
by Varazir
hjzwiers wrote: Tuesday 10 June 2025 22:11 the right settings are full version in the compose file (dev/serial/by-id/usb-Itead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2_cc03fed5943aef11aca9331455516304-if00-port0:/dev/ttyUSB0) and the short version (port: /dev/ttyUSB0) in the config file.

Its working now, thanks. I have the data in the remote viewer, now to get them in domoticz ..... (I have auto MQTT Auto Discovery on but still wonder where the sensors are .....)

Remote viewer you mean you connect to your MQTT server with MQTT explorer ?

Re: Dockge and Zigbee not running

Posted: Wednesday 11 June 2025 7:17
by eddieb
running mqtt-explorer in docker on your docker host

compose.yaml

Code: Select all

services:
  mqtt-explorer:
    container_name: mqtt-explorer
    image: smeagolworms4/mqtt-explorer
    restart: unless-stopped
    dns_search: .
    ports:
      - 4000:4000
    volumes:
      - ./config:/mqtt-explorer/config
networks: {}

Re: Dockge and Zigbee not running

Posted: Wednesday 11 June 2025 7:54
by gizmocuz
MQTT Explorer is a GUI application

Don't just copy/paste any AI generated stuff here

https://mqtt-explorer.com/

The setup files from Varazir are a good start, but this is not the best way to work with docker compose

1. For each project you create a folder
2. In this folder you make a file 'docker-compose.yml' where you place the config in
3. You use local volume folders, that is, they will be created inside this folder, so you can easily make a backup
For example
volumes:
- ./data:/app/path/data
4. You test it first inside this folder with
docker compose up (without the -d flag, so you see all messages)
5. Once you are sure all is working, stop the docker (control-c)
docker compose down
docker compose stop
6. Now run the docker as a background deamon
docker compose up -d (with the -d flag)

This is all basic stuff, there are tons of web pages with tutorials

A AI bot will not be a tutorial, just use your google search phrase and add 'tutorial' or 'example' behind it

Re: Dockge and Zigbee not running

Posted: Wednesday 11 June 2025 8:24
by Varazir
gizmocuz wrote: Wednesday 11 June 2025 7:54 MQTT Explorer is a GUI application

Don't just copy/paste any AI generated stuff here

https://mqtt-explorer.com/

The setup files from Varazir are a good start, but this is not the best way to work with docker compose

1. For each project you create a folder
2. In this folder you make a file 'docker-compose.yml' where you place the config in
3. You use local volume folders, that is, they will be created inside this folder, so you can easily make a backup
For example
volumes:
- ./data:/app/path/data
4. You test it first inside this folder with
docker compose up (without the -d flag, so you see all messages)
5. Once you are sure all is working, stop the docker (control-c)
docker compose down
docker compose stop
6. Now run the docker as a background deamon
docker compose up -d (with the -d flag)

This is all basic stuff, there are tons of web pages with tutorials

A AI bot will not be a tutorial, just use your google search phrase and add 'tutorial' or 'example' behind it
Ya I should note that it's very specific where I store my data. I liked to have all data in the home folder. Start with ./ is standard and dockge takes care of the creating the folder.

Re: Dockge and Zigbee not running

Posted: Wednesday 11 June 2025 8:49
by eddieb
Yeah, same here.
all my docker stuff is in /opt/stacks/
each in its own directory
all can be started from cli with docker compose up -d but I prefer dockge
I am still busy trying to get everything working the way I like to have it, especially some python stuff is giving me some problems.

Code: Select all

# ls -al /opt/stacks/
total 60
drwxr-xr-x 15 root root 4096 May 30 10:34 .
drwxr-xr-x  5 root root 4096 May 22 18:53 ..
drwxr-xr-x  3 root root 4096 Jun 11 06:40 dockge
drwxr-xr-x  3 root root 4096 Jun  5 11:19 domoticz
drwxr-xr-x  2 root root 4096 May 22 18:55 dozzle
drwxr-xr-x  2 root root 4096 May 30 10:32 iperf-server
drwxr-xr-x  4 root root 4096 May 25 09:51 monit
drwxr-xr-x  5 1883 1883 4096 May 22 20:06 mosquitto
drwxr-xr-x  3 root root 4096 May 25 09:01 mqtt-explorer
drwxr-xr-x  3 root root 4096 May 22 20:11 node-red
drwxr-xr-x  2 root root 4096 May 30 08:39 openspeedtest
drwxr-xr-x  3 root root 4096 May 30 10:34 portainer
drwxr-xr-x  3 root root 4096 May 22 19:59 tasmoadmin
drwxr-xr-x  2 root root 4096 May 22 18:58 watchtower
drwxr-xr-x  3 root root 4096 Jun 10 22:10 zigbee2mqtt