zigbee2mqtt docker startet nicht auf einem raspberrypi?

Hallo,

ich habe probleme zigbee2mqtt als docker auf meinem RaspberryPi zum laufen zu bekommen.

Ich möchte gerne

  • mosquitto
  • zigbee2mqtt
  • nodered

als docker laufen lassen.

nodered läuft auch schon und ich kann über den Browser drauf zugreifen.
mosquitto wird mir auch gesagt, dass dies gestartet ist

docker ps sagt mir, dass alle gestartet sind
docker ps:

c1bfbfabb05f  koenkk/zigbee2mqtt:latest  "docker-entrypoint.s…"  6 seconds ago      Up 4 seconds                0.0.0.0:8080->8080/tcp, :::8080->8080/tcp                                                                                        zigbee2mqtt
da87857fa681  eclipse-mosquitto:latest   "/docker-entrypoint.…"  15 minutes ago     Up 15 minutes               0.0.0.0:1883->1883/tcp, :::1883->1883/tcp, 0.0.0.0:8883->8883/tcp, :::8883->8883/tcp, 0.0.0.0:9001->9001/tcp, :::9001->9001/tcp  mosquitto
0548b80f3616  nodered/node-red:latest    "./entrypoint.sh"       About an hour ago  Up 48 minutes (healthy)     0.0.0.0:1880->1880/tcp, :::1880->1880/tcp                                                                                        nodered
685f899c9a0b  pihole/pihole:latest       "/s6-init"              About an hour ago  Up About an hour (healthy)  0.0.0.0:53->53/tcp, :::53->53/tcp, 0.0.0.0:80->80/tcp, 0.0.0.0:53->53/udp, :::80->80/tcp, :::53->53/udp, 67/udp                  pihole

log von mosquitto:

2024-10-19T12:11:37: mosquitto version 2.0.20 starting
2024-10-19T12:11:37: Config loaded from /mosquitto/config/mosquitto.conf.
2024-10-19T12:11:37: Opening ipv4 listen socket on port 1883.
2024-10-19T12:11:37: Opening ipv6 listen socket on port 1883.
2024-10-19T12:11:37: mosquitto version 2.0.20 running
2024-10-19T12:11:42: New connection from xxx.xxx.xxx.xxx:xxxxx on port 1883.
2024-10-19T12:11:42: New client connected from xxx.xxx.xxx.xxx:xxxxx as nodered_4a9ed9759c96a485 (p2, c1, k60).

log von zigbee2mqtt:

[2024-10-19 14:20:03] info:     z2m: Logging to console, file (filename: log.log)
[2024-10-19 14:20:04] info:     z2m: Starting Zigbee2MQTT version 1.40.2 (commit #e06848d)
[2024-10-19 14:20:04] info:     z2m: Starting zigbee-herdsman (2.1.3)
[2024-10-19 14:20:07] info:     zh:zstack:znp: Opening SerialPort with {"path":"/dev/ttyACM0","baudRate":115200,"rtscts":false,"autoOpen":false}
[2024-10-19 14:20:07] info:     zh:zstack:znp: Serialport opened
[2024-10-19 14:20:07] info:     z2m: zigbee-herdsman started (resumed)
[2024-10-19 14:20:07] info:     z2m: Coordinator firmware version: '{"meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20210708,"transportrev":2},"type":"zStack3x0"}'
[2024-10-19 14:20:07] info:     z2m: Currently 0 devices are joined.
[2024-10-19 14:20:07] info:     z2m: Zigbee: disabling joining new devices.
[2024-10-19 14:20:07] info:     z2m: Connecting to MQTT server at mqtt://mosquitto:1883
[2024-10-19 14:20:38] error:    z2m: MQTT error: connack timeout
[2024-10-19 14:20:38] error:    z2m: MQTT failed to connect, exiting... (connack timeout)
[2024-10-19 14:20:38] info:     z2m: Stopping zigbee-herdsman...
[2024-10-19 14:20:38] error:    z2m: Not connected to MQTT server!
[2024-10-19 14:20:38] error:    z2m: Cannot send message: topic: 'zigbee2mqtt/bridge/state', payload: '{"state":"offline"}
[2024-10-19 14:20:38] info:     z2m: Disconnecting from MQTT server
[2024-10-19 14:20:38] info:     z2m: Stopping zigbee-herdsman...


docker-compose.yml

 services:
  mosquitto:
    container_name: mosquitto
    image: eclipse-mosquitto:latest
    ports:
      - 1883:1883
      - 8883:8883
      - 9001:9001
    volumes:
      - ./mosquitto/config:/mosquitto/config
      - ./mosquitto/data:/mosquitto/data
      - ./mosquitto/log:/mosquitto/log
    networks:
      - mosquitto
    restart: unless-stopped


  zigbee2mqtt:
    container_name: zigbee2mqtt
    image: koenkk/zigbee2mqtt:latest
    environment:
      - TZ=Europe/Berlin
      - ZIGBEE2MQTT_CONFIG_MQTT_SERVER=mqtt://mosquitto:1883
      - ZIGBEE2MQTT_CONFIG_FRONTEND=true
      - ZIGBEE2MQTT_CONFIG_ADVANCED_LOG_SYMLINK_CURRENT=true
      - DEBUG=zigbee-herdsman*
    ports:
      - 8080:8080
    volumes:
      - ./zigbee2mqtt/data:/app/data
      - /run/udev:/run/udev:ro
    devices:
      - /dev/serial/by-id/usb-Silicon_Labs_Sonoff_Zigbee_3.0_USB_Dongle_Plus_0001-if00-port0:/dev/ttyACM0
    restart: unless-stopped
    depends_on:
      - mosquitto


  nodered:
    container_name: nodered
    image: nodered/node-red:latest
    environment:
      - TZ=Europe/BERLIN
    ports:
      - "1880:1880"
    networks:
      - node-red
    volumes:
     - ./nodered/data:/data
    restart: unless-stopped



networks:
  mosquitto:
    name: mosquitto
    driver: bridge
  node-red:

Wenn ich jetzt im Browser auch 192.168.178.25:8080 eingebe, bekomme ich den fehler, dass die Verbindung fehlgeschlagen ist.

Warum zeigt mir "docker ps" dann an, dass dieser gestartet ist? ich hätte jetzt erwartet, dass es dort nicht auftaucht, sondern nur bei "docker ps -a"

Raspberry Pi, Docker, mqtt
Weitere Inhalte können nur Nutzer sehen, die bei uns eingeloggt sind.