Le fichier de config semble bien généré sur mon hote (en l’occurrence HypriotOS) avec le contenu suivant :
port 1884
allow_anonymous false
# connection_messages false
allow_duplicate_messages true
password_file /mosquitto/config/mosquitto.passwd
Les logs de Gladys indique ceci :
2020-11-15T14:52:29+0100 <info> index.js:63 (Server.<anonymous>) Server listening on port 7124
2020-11-15T14:54:34+0100 <info> init.js:49 () Zigbee2mqtt USB dongle attached to /dev/ttyACM0
2020-11-15T14:54:41+0100 <info> init.js:49 () Zigbee2mqtt USB dongle attached to /dev/ttyACM0
2020-11-15T14:54:41+0100 <info> installMqttContainer.js:30 (Zigbee2mqttManager.installMqttContainer) MQTT broker is being installed as Docker container...
2020-11-15T14:54:41+0100 <info> installMqttContainer.js:31 (Zigbee2mqttManager.installMqttContainer) Pulling eclipse-mosquitto:latest image...
2020-11-15T14:54:43+0100 <info> installMqttContainer.js:34 (Zigbee2mqttManager.installMqttContainer) Preparing broker environment...
2020-11-15T14:54:43+0100 <info> installMqttContainer.js:38 (Zigbee2mqttManager.installMqttContainer) Creating container...
2020-11-15T14:54:43+0100 <info> installMqttContainer.js:52 (Zigbee2mqttManager.installMqttContainer) Zigbee2MQTT MQTT broker is starting...
2020-11-15T14:54:49+0100 <info> installMqttContainer.js:58 (Zigbee2mqttManager.installMqttContainer) Creating user/pass...
2020-11-15T14:54:49+0100 <error> installMqttContainer.js:73 (Zigbee2mqttManager.installMqttContainer) MQTT broker container failed to start: Error: (HTTP code 409) unexpected - Container 759eade851c945c48f396ace17a720ae1494882d4fbce9deeee5f6284b1c38de is restarting, wait until the container is running
at /src/server/node_modules/docker-modem/lib/modem.js:257:17
at getCause (/src/server/node_modules/docker-modem/lib/modem.js:287:7)
at Modem.buildPayload (/src/server/node_modules/docker-modem/lib/modem.js:256:5)
at IncomingMessage.<anonymous> (/src/server/node_modules/docker-modem/lib/modem.js:232:14)
at IncomingMessage.emit (events.js:326:22)
at endReadableNT (_stream_readable.js:1223:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
reason: undefined,
statusCode: 409,
{
message: 'Container 759eade851c945c48f396ace17a720ae1494882d4fbce9deeee5f6284b1c38de is restarting, wait until the container is running'
}
}
2020-11-15T14:54:49+0100 <error> index.js:14 (process.<anonymous>) unhandledRejection catched: Promise {
<rejected> Error: (HTTP code 409) unexpected - Container 759eade851c945c48f396ace17a720ae1494882d4fbce9deeee5f6284b1c38de is restarting, wait until the container is running
at /src/server/node_modules/docker-modem/lib/modem.js:257:17
at getCause (/src/server/node_modules/docker-modem/lib/modem.js:287:7)
at Modem.buildPayload (/src/server/node_modules/docker-modem/lib/modem.js:256:5)
at IncomingMessage.<anonymous> (/src/server/node_modules/docker-modem/lib/modem.js:232:14)
at IncomingMessage.emit (events.js:326:22)
at endReadableNT (_stream_readable.js:1223:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
reason: undefined,
statusCode: 409,
json: {
message: 'Container 759eade851c945c48f396ace17a720ae1494882d4fbce9deeee5f6284b1c38de is restarting, wait until the container is running'
}
}
}
2020-11-15T14:54:49+0100 <error> index.js:15 (process.<anonymous>) Error: (HTTP code 409) unexpected - Container 759eade851c945c48f396ace17a720ae1494882d4fbce9deeee5f6284b1c38de is restarting, wait until the container is running
at /src/server/node_modules/docker-modem/lib/modem.js:257:17
at getCause (/src/server/node_modules/docker-modem/lib/modem.js:287:7)
at Modem.buildPayload (/src/server/node_modules/docker-modem/lib/modem.js:256:5)
at IncomingMessage.<anonymous> (/src/server/node_modules/docker-modem/lib/modem.js:232:14)
at IncomingMessage.emit (events.js:326:22)
at endReadableNT (_stream_readable.js:1223:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
reason: undefined,
statusCode: 409,
{
message: 'Container 759eade851c945c48f396ace17a720ae1494882d4fbce9deeee5f6284b1c38de is restarting, wait until the container is running'
}
}
2020-11-15T14:56:41+0100 <info> init.js:49 () Zigbee2mqtt USB dongle attached to /dev/ttyACM0
2020-11-15T14:56:41+0100 <info> installMqttContainer.js:83 (Zigbee2mqttManager.installMqttContainer) Zigbee2MQTT MQTT broker is starting...
2020-11-15T14:56:46+0100 <info> installMqttContainer.js:95 (Zigbee2mqttManager.installMqttContainer) MQTT broker container successfully started
2020-11-15T14:56:47+0100 <info> installZ2mContainer.js:29 (Zigbee2mqttManager.installZ2mContainer) Zigbee2mqtt is being installed as Docker container...
2020-11-15T14:56:47+0100 <info> installZ2mContainer.js:30 (Zigbee2mqttManager.installZ2mContainer) Pulling koenkk/zigbee2mqtt:latest image...
2020-11-15T14:56:49+0100 <info> installZ2mContainer.js:33 (Zigbee2mqttManager.installZ2mContainer) Preparing Zigbee2mqtt environment...
2020-11-15T14:56:49+0100 <info> installZ2mContainer.js:39 (Zigbee2mqttManager.installZ2mContainer) Creating container...
2020-11-15T14:56:49+0100 <info> installZ2mContainer.js:47 (Zigbee2mqttManager.installZ2mContainer) Zigbee2mqtt successfully installed as Docker container
2020-11-15T14:56:49+0100 <info> installZ2mContainer.js:59 (Zigbee2mqttManager.installZ2mContainer) Zigbee2mqtt is starting...
2020-11-15T14:56:54+0100 <info> installZ2mContainer.js:71 (Zigbee2mqttManager.installZ2mContainer) Zigbee2mqtt successfully started
2020-11-15T14:56:55+0100 <warn> connect.js:41 (MqttClient.<anonymous>) Disconnected from MQTT server
Mon docker-compose.yml ressemble à ceci :
version: "2.4"
services:
gladys:
image: r6n0/gladys-zigbee2mqtt:latest
container_name: Gladys_Zigbee2Mqtt
restart: always
user: "0:0"
privileged: true
# depends_on:
# - zigbee2mqttAssistant
# - rhasspy
logging:
options:
max-size: "10m"
network_mode: host
dns:
- 1.1.1.1
- 1.0.0.1
# ports:
# - $GLADYS_PORT:$GLADYS_PORT
environment:
- "TZ=${TZ}"
- "NODE_ENV=production"
- "SERVER_PORT=$GLADYS_PORT"
- "SQLITE_FILE_PATH=/var/lib/gladysassistant/gladys-production.db"
volumes:
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
- "/var/run/docker.sock:/var/run/docker.sock"
- "/run/udev:/run/udev:ro"
- "/dev:/dev"
- "$DATA_PATH/gladys_zigbee:/var/lib/gladysassistant"
labels:
- "hidden_${COMPOSE_PROJECT_NAME}"
- "com.centurylinklabs.watchtower.enable=true"
- "traefik.enable=false"
Avec les variables d’environnement suivantes :
COMPOSE_PROJECT_NAME=Gladys
#-----------------------------------------------------
## GLOBAL
#-----------------------------------------------------
PUID=0
PGID=0
TZ=Europe/Paris
CONFIG_PATH=./.config
LOG_PATH=/var/data/logs/gladys
DATA_PATH=/var/data/docker/gladys
#-----------------------------------------------------
#-----------------------------------------------------
## Gladys
#-----------------------------------------------------
GLADYS_PORT=7124
#-----------------------------------------------------