Zigbee2mqtt - Debug

Continuing the discussion from Zigbee2mqtt : Image docker de test basée Gladys v4:

Si justement, ton device est /dev/ttyUSB0 sur ton Raspberry et /dev/ttyACM0 dans le container Zigbee2Mqtt (volontairement fixe).
D’où ma question, est-ce que tu as bien selectionné /dev/ttyUSB0 dans la configuration ?
Et est-ce que la commande ls /dev/* depuis le Raspberry (en dehors de tout container) te montre bien le périphérique /dev/ttyUSB0 ?

@cicoub13 j’ai une erreur à la création du conteneur :

Zigbee2MQTT:info  2021-02-01 09:59:43: Starting Zigbee2MQTT version 1.17.0 (commit #07cdc9d)
Zigbee2MQTT:info  2021-02-01 09:59:43: Starting zigbee-herdsman (0.13.46)
Zigbee2MQTT:error 2021-02-01 09:59:44: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2021-02-01 09:59:44: Failed to start zigbee
Zigbee2MQTT:error 2021-02-01 09:59:44: Exiting...
Zigbee2MQTT:error 2021-02-01 09:59:44: Error: Error while opening serialport 'Error: Error: No such file or directory, cannot open /dev/ttyUSB0'
    at Znp.<anonymous> (/app/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:136:32)
    at Generator.next (<anonymous>)
    at /app/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:27:71
    at new Promise (<anonymous>)
    at __awaiter (/app/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:23:12)
    at SerialPort.<anonymous> (/app/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:134:49)
    at SerialPort._error (/app/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)
    at /app/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zigbee2mqtt@1.17.0 start: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zigbee2mqtt@1.17.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-02-01T09_59_44_151Z-debug.log

Est-ce que tu as bien configuré le périphérique dans Configuration ? Là, je vois /dev/ttyUSB0 et est-ce qu’il est bien connecté physiquement ?

Oui j’ai créé une nouvelle base de donnée et sélectionné ce périphérique

Au cas où, j’ai débranché / rebranché ma clé, supprimé le conteneur et demandé à nouveau de relancer le service.

$ docker logs -f --since 1m gladys-zigbee2mqtt
> zigbee2mqtt@1.17.0 start /app
> node index.js

Zigbee2MQTT:info  2021-02-01 12:22:52: Logging to console and directory: '/app/data/log/2021-02-01.12-22-51' filename: log.txt
Zigbee2MQTT:info  2021-02-01 12:22:52: Starting Zigbee2MQTT version 1.17.0 (commit #07cdc9d)
Zigbee2MQTT:info  2021-02-01 12:22:52: Starting zigbee-herdsman (0.13.46)
Zigbee2MQTT:error 2021-02-01 12:22:53: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2021-02-01 12:22:53: Failed to start zigbee
Zigbee2MQTT:error 2021-02-01 12:22:53: Exiting...
Zigbee2MQTT:error 2021-02-01 12:22:53: Error: Error while opening serialport 'Error: Error: No such file or directory, cannot open /dev/ttyUSB0'
    at Znp.<anonymous> (/app/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:136:32)
    at Generator.next (<anonymous>)
    at /app/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:27:71
    at new Promise (<anonymous>)
    at __awaiter (/app/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:23:12)
    at SerialPort.<anonymous> (/app/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:134:49)
    at SerialPort._error (/app/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)
    at /app/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zigbee2mqtt@1.17.0 start: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zigbee2mqtt@1.17.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-02-01T12_22_53_243Z-debug.log

Le device n’est pas mappé correctement entre l’hôte et le conteneur @cicoub13 :

$ docker inspect gladys-zigbee2mqtt | grep tty
                    "PathOnHost": "/dev/ttyUSB0",
                    "PathInContainer": "/dev/ttyACM0",

J’ai réussi à lancer le conteneur en trichant :

$ docker restart gladys-zigbee2mqtt ; docker exec -ti gladys-zigbee2mqtt ln -s /dev/ttyACM0 /dev/ttyUSB0
gladys-zigbee2mqtt

Par contre il n’arrive pas à contacter le serveur MQTT :

Using '/app/data' as data directory

> zigbee2mqtt@1.17.0 start /app
> node index.js

Zigbee2MQTT:info  2021-02-01 12:28:29: Logging to console and directory: '/app/data/log/2021-02-01.12-28-28' filename: log.txt
Zigbee2MQTT:info  2021-02-01 12:28:29: Starting Zigbee2MQTT version 1.17.0 (commit #07cdc9d)
Zigbee2MQTT:info  2021-02-01 12:28:29: Starting zigbee-herdsman (0.13.46)
Zigbee2MQTT:info  2021-02-01 12:28:40: zigbee-herdsman started
Zigbee2MQTT:info  2021-02-01 12:28:40: Coordinator firmware version: '{"meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20201026,"transportrev":2},"type":"zStack3x0"}'
Zigbee2MQTT:info  2021-02-01 12:28:40: Currently 7 devices are joined:
Zigbee2MQTT:info  2021-02-01 12:28:40: 0x00158d00044e9780 (0x00158d00044e9780): RTCGQ11LM - Xiaomi Aqara human body movement and illuminance sensor (EndDevice)
Zigbee2MQTT:info  2021-02-01 12:28:40: 0x00158d0003f26e95 (0x00158d0003f26e95): MCCGQ11LM - Xiaomi Aqara door & window contact sensor (EndDevice)
Zigbee2MQTT:info  2021-02-01 12:28:40: 0x00158d0003173fdd (0x00158d0003173fdd): MCCGQ11LM - Xiaomi Aqara door & window contact sensor (EndDevice)
Zigbee2MQTT:info  2021-02-01 12:28:40: 0x00158d000460bf42 (0x00158d000460bf42): RTCGQ11LM - Xiaomi Aqara human body movement and illuminance sensor (EndDevice)
Zigbee2MQTT:info  2021-02-01 12:28:40: 0x00158d000451f624 (0x00158d000451f624): RTCGQ11LM - Xiaomi Aqara human body movement and illuminance sensor (EndDevice)
Zigbee2MQTT:info  2021-02-01 12:28:40: 0x00158d0004843eb4 (0x00158d0004843eb4): RTCGQ11LM - Xiaomi Aqara human body movement and illuminance sensor (EndDevice)
Zigbee2MQTT:info  2021-02-01 12:28:40: 0x842e14fffe19ef0c (0x842e14fffe19ef0c): QS-Zigbee-D02-TRIAC-L - Lonsonho 1 gang smart dimmer switch module without neutral (Router)
Zigbee2MQTT:info  2021-02-01 12:28:40: Zigbee: disabling joining new devices.
Zigbee2MQTT:info  2021-02-01 12:28:40: Started frontend on port 0.0.0.0:8080
Zigbee2MQTT:info  2021-02-01 12:28:40: Connecting to MQTT server at mqtt://localhost:1884
Zigbee2MQTT:error 2021-02-01 12:28:50: Not connected to MQTT server!

@cicoub13 et @lmilcent je vous ai rapatriés les messages échangés ici :slight_smile:

Oui, dans l’interface c’est bien ce qui est affiché.

pi@gladys:~ $ ls /dev/*  | grep ttyUSB0
/dev/ttyUSB0

pi@gladys:~ $ dmesg | grep tty
[ 3902.668761] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
[ 3906.563703] usb 1-1.4: cp210x converter now attached to ttyUSB0

J’ai retesté ce matin et ça marche bien de mon côté avec un périphérique qui est /dev/ttyACM0 sur ma machine host. Mais il doit y avoir un souci si le nom du périphérique est différent. J’enquête :thinking:

Sur ma machine c’est l’inverse par contre, c’est en ttyUSB0 côté hôte.

Tu as bien ces lignes dans le container Gladys (mais avec /dev/ttyUSB0) ?

Oui exactement, c’est bien ça.

Bonjour à tous,

Je suis là pour un court passage.
@cicoub13 Cool pour la communauté d’avoir repris tout le travail sur ce module car je n’ai vraiment plus aucun temps en ce moment, pour ça… :sob:
J’essaierai de donner des coups de main de temps en temps, quand je pourrai.
.

As-tu effacé les fichier de config dans /var/gladysassistant car de mémoire, tu avais modifié le fichier de config de Z2M à la main, il me semble ?
Il doit y avoir /dev/ttyACM0 dans la config

2 Likes

Bien vu !! Punaise j’avais oublié cette modification pendant le dernier debug.

Merci @reno et @cicoub13 pour le temps passé !

Les conteneurs se lancent maintenant super vite et sans soucis.
Par contre, plus aucuns équipement n’est détecté dans Gladys, contrairement à ce qu’indique le conteneur mqtt ?!

Tout est ok dans la page de configuration http://gladys-ip:1080/dashboard/integration/device/zigbee2mqtt/setup ?
Est-ce que tu peux donner les logs des deux containers ?

Premier problème (résolu) : dysfonctionnement entre mqtt et Gladys

En fait la page de configuration affiche régulièrement que tout est OK, mais depuis mon ordi j’ai remarqué que ça « saute » régulièrement.

C’est donc le conteneur mqtt qui semble en cause :

1612425253: New connection from 127.0.0.1 on port 1884.
1612425253: Client gladys-assistant-main-instance already connected, closing old connection.
1612425253: New client connected from 127.0.0.1 as gladys-assistant-main-instance (p2, c1, k60, u'gladys').
1612425258: New connection from 127.0.0.1 on port 1884.
1612425258: Client gladys-assistant-main-instance already connected, closing old connection.
1612425258: New client connected from 127.0.0.1 as gladys-assistant-main-instance (p2, c1, k60, u'gladys').

Une fois tous les conteneurs redémarrés, cette erreur disparait.

Deuxième problème : Aucune réponse du scan

Lorsque je clique sur « Scanner », rien ne s’affiche sauf le message « Aucune réponse du scan ».

Logs Gladys :

2021-02-04T09:00:42+0100 <info> handleMqttMessage.js:91 (Zigbee2mqttManager.handleMqttMessage) Zigbee2mqtt topic zigbee2mqtt/bridge/config/devices/get not handled.
2021-02-04T09:00:43+0100 <info> handleMqttMessage.js:91 (Zigbee2mqttManager.handleMqttMessage) Zigbee2mqtt topic zigbee2mqtt/bridge/logging not handled.
2021-02-04T09:00:43+0100 <info> handleMqttMessage.js:91 (Zigbee2mqttManager.handleMqttMessage) Zigbee2mqtt topic zigbee2mqtt/bridge/logging not handled.
2021-02-04T09:00:43+0100 <info> handleMqttMessage.js:91 (Zigbee2mqttManager.handleMqttMessage) Zigbee2mqtt topic zigbee2mqtt/bridge/log not handled.

Logs Zigbee2mqtt :

Zigbee2MQTT:info  2021-02-04 08:00:42: MQTT publish: topic 'zigbee2mqtt/bridge/config/devices', payload '[{"dateCode":"20201026","friendly_name":"Coordinator","ieeeAddr":"0x00124b0021cc41df","lastSeen":1612425642997,"networkAddress":0,"softwareBuildID":"zStack3x0","type":"Coordinator"}]'
Zigbee2MQTT:info  2021-02-04 08:00:43: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":[{"dateCode":"20201026","friendly_name":"Coordinator","ieeeAddr":"0x00124b0021cc41df","lastSeen":1612425643053,"networkAddress":0,"softwareBuildID":"zStack3x0","type":"Coordinator"}],"type":"devices"}'

On dirait que Gladys n’est pas synchro avec Zigbee2Mqtt et utilise les mauvaises fonctions au mauvais moment.

Troisième problème : Autoriser l’association

Lorsque je clique sur « Autoriser l’association », voici les logs :

Gladys :

2021-02-04T09:07:07+0100 <info> handleMqttMessage.js:91 (Zigbee2mqttManager.handleMqttMessage) Zigbee2mqtt topic zigbee2mqtt/bridge/logging not handled.
2021-02-04T09:07:07+0100 <info> handleMqttMessage.js:91 (Zigbee2mqttManager.handleMqttMessage) Zigbee2mqtt topic zigbee2mqtt/bridge/logging not handled.
2021-02-04T09:07:07+0100 <info> handleMqttMessage.js:91 (Zigbee2mqttManager.handleMqttMessage) Zigbee2mqtt topic zigbee2mqtt/bridge/info not handled.
2021-02-04T09:07:07+0100 <info> handleMqttMessage.js:91 (Zigbee2mqttManager.handleMqttMessage) Zigbee2mqtt topic zigbee2mqtt/bridge/logging not handled.

Zigbee2mqtt :

Zigbee2MQTT:info  2021-02-04 08:07:07: Zigbee: allowing new devices to join.
Zigbee2MQTT:info  2021-02-04 08:07:07: MQTT publish: topic 'zigbee2mqtt/bridge/info', payload '{"commit":"99274c7","config":{"advanced":{"adapter_concurrent":null,"adapter_delay":null,"availability_blacklist":[],"availability_blocklist":[],"availability_passlist":[],"availability_timeout":0,"availability_whitelist":[],"cache_state":true,"cache_state_persistent":true,"cache_state_send_on_startup":true,"channel":11,"elapsed":false,"ext_pan_id":[221,221,221,221,221,221,221,221],"homeassistant_discovery_topic":"homeassistant","homeassistant_legacy_triggers":true,"homeassistant_status_topic":"hass/status","last_seen":"disable","legacy_api":true,"log_directory":"/app/data/log/%TIMESTAMP%","log_file":"log.txt","log_level":"info","log_output":["console","file"],"log_rotation":true,"log_syslog":{},"pan_id":6754,"report":false,"soft_reset_timeout":0,"timestamp_format":"YYYY-MM-DD HH:mm:ss"},"ban":[],"blocklist":[],"device_options":{},"devices":{},"experimental":{"new_api":true,"output":"json"},"external_converters":[],"frontend":{"port":8080},"groups":{},"homeassistant":false,"map_options":{"graphviz":{"colors":{"fill":{"coordinator":"#e04e5d","enddevice":"#fff8ce","router":"#4ea3e0"},"font":{"coordinator":"#ffffff","enddevice":"#000000","router":"#ffffff"},"line":{"active":"#009900","inactive":"#994444"}}}},"mqtt":{"base_topic":"zigbee2mqtt","force_disable_retain":false,"include_device_information":false,"server":"mqtt://localhost:1884","user":"z2m"},"passlist":[],"permit_join":false,"serial":{"disable_led":false,"port":"/dev/ttyACM0"},"whitelist":[]},"config_schema":{"definitions":{"device":{"properties":{"debounce":{"description":"Debounces messages of this device","title":"Debounce","type":"number"},"debounce_ignore":{"description":"Protects unique payload values of specified payload properties from overriding within debounce time","examples":["action"],"items":{"type":"string"},"title":"Ignore debounce","type":"array"},"filtered_attributes":{"description":"Allows to prevent certain attributes from being published","examples":["temperature","battery","action"],"items":{"type":"string"},"title":"Filtered attributes","type":"array"},"friendly_name":{"description":"Used in the MQTT topic of a device. By default this is the device ID","readOnly":true,"title":"Friendly name","type":"string"},"optimistic":{"description":"Publish optimistic state after set (default true)","title":"Optimistic","type":"boolean"},"qos":{"descritption":"QoS level for MQTT messages of this device","title":"QoS","type":"number"},"retain":{"description":"Retain MQTT messages of this device","title":"Retain","type":"boolean"},"retention":{"description":"Sets the MQTT Message Expiry in seconds, Make sure to set mqtt.version to 5","title":"Retention","type":"number"},"retrieve_state":{"description":"Retrieves the state after setting it (Should only be enabled when the reporting feature does not work for this device)","title":"Retrieve State","type":"boolean"}},"required":["friendly_name"],"type":"object"},"group":{"properties":{"devices":{"items":{"type":"string"},"type":"array"},"filtered_attributes":{"items":{"type":"string"},"type":"array"},"friendly_name":{"type":"string"},"optimistic":{"type":"boolean"},"qos":{"type":"number"},"retain":{"type":"boolean"}},"required":["friendly_name"],"type":"object"}},"properties":{"advanced":{"properties":{"adapter_concurrent":{"description":"Adapter concurrency (e.g. 2 for CC2531 or 16 for CC26X2R1) (default: null, uses recommended value)","title":"Adapter concurrency","type":["number","null"]},"adapter_delay":{"title":"Adapter delay","type":["number","null"]},"availability_blacklist":{"items":{"type":"string"},"title":"Availability blacklist (deprecated)","type":"array"},"availability_blocklist":{"description":"Prevent devices from being checked for availability","items":{"type":"string"},"title":"Availability Blocklist","type":"array"},"availability_passlist":{"description":"Only enable availability check for certain devices","items":{"type":"string"},"title":"Availability passlist","type":"array"},"availability_timeout":{"default":0,"description":"Availability timeout in seconds When enabled, devices will be checked if they are still online. Only AC powered routers are checked for availability","minimum":0,"title":"Availability Timeout","type":"number"},"availability_whitelist":{"items":{"type":"string"},"title":"Availability whitelist (deprecated)","type":"array"},"baudrate":{"description":"Baudrate for serial port, default: 115200 for Z-Stack, 38400 for Deconz","examples":[38400,115200],"title":"Baudrate","type":"number"},"cache_state":{"default":true,"description":"MQTT message payload will contain all attributes, not only changed ones. Has to be true when integrating via Home Assistant","title":"Cache state","type":"boolean"},"cache_state_persistent":{"default":true,"description":"Persist cached state, only used when Cache state(cache_state: true)","title":"Chache state persistent","type":"boolean"},"cache_state_send_on_startup":{"default":true,"description":"Cache state send on startup, only used when Cache state(cache_state: true)","title":"Cache state send on startup","type":"boolean"},"channel":{"default":11,"description":"Changing requires re-pairing of all devices. (Note: use a ZLL channel: 11, 15, 20, or 25 to avoid Problems)","maximum":26,"minimum":11,"title":"ZigBee channel","type":"number"},"elapsed":{"default":false,"description":"Add an elapsed attribute to MQTT messages, contains milliseconds since the previous msg","title":"Elapsed","type":"boolean"},"ext_pan_id":{"description":"Zigbee extended pan ID","items":{"type":"number"},"title":"Ext Pan ID","type":"array"},"homeassistant_discovery_topic":{"examples":["homeassistant"],"title":"Homeassistant discovery topic","type":"string"},"homeassistant_status_topic":{"examples":["homeassistant/status"],"title":"Home Assistant status topic","type":"string"},"last_seen":{"default":"disable","description":"Add a last_seen attribute to MQTT messages, contains date/time of last Zigbee message","enum":["disable","ISO_8601","ISO_8601_local","epoch"],"title":"Last seen","type":"string"},"legacy_api":{"default":true,"description":"Disables the legacy api (false = disable)","title":"Legacy API","type":"boolean"},"log_directory":{"description":"Location of log directory","examples":["data/log/%TIMESTAMP%"],"title":"Log directory","type":"string"},"log_file":{"default":"log.txt","description":"Log file name, can also contain timestamp","examples":["zigbee2mqtt_%TIMESTAMP%.log"],"title":"Log file","type":"string"},"log_level":{"default":"info","description":"Logging level","enum":["info","warn","error","debug"],"title":"Log level","type":"string"},"log_output":{"description":"Output location of the log, leave empty to supress logging","items":{"enum":["console","file","syslog"],"type":"string"},"title":"Log output","type":"array"},"log_rotation":{"default":true,"description":"Log rotation","title":"Log rotation","type":"boolean"},"network_key":{"description":"Network encryption key, will improve security (Note: changing requires repairing of all devices)","oneOf":[{"title":"Network key(string)","type":"string"},{"items":{"type":"number"},"title":"Network key(array)","type":"array"}],"title":"Network key"},"pan_id":{"description":"ZigBee pan ID","oneOf":[{"title":"Pan ID (string)","type":"string"},{"title":"Pan ID (number)","type":"number"}],"title":"Pan ID"},"report":{"description":"Enables report feature","title":"Reporting","type":"boolean"},"rtscts":{"default":false,"description":"RTS / CTS Hardware Flow Control for serial port","title":"RTS / CTS","type":"boolean"},"soft_reset_timeout":{"description":"Soft reset ZNP after timeout","minimum":0,"readOnly":true,"title":"Soft reset timeout (deprecated)","type":"number"},"timestamp_format":{"description":"Log timestamp format","examples":["YYYY-MM-DD HH:mm:ss"],"title":"Timestamp format","type":"string"}},"title":"Advanced settings","type":"object"},"ban":{"items":{"type":"string"},"title":"Ban (deprecated)","type":"array"},"blocklist":{"description":"Block devices from the network (by ieeeAddr)","items":{"type":"string"},"title":"Blocklist","type":"array"},"device_options":{"type":"object"},"devices":{"patternProperties":{"^.*$":{"$ref":"#/definitions/device"}},"propertyNames":{"pattern":"^0x[\\d\\w]{16}$"},"type":"object"},"experimental":{"properties":{"output":{"description":"Examples when 'state' of a device is published json: topic: 'zigbee2mqtt/my_bulb' payload '{\"state\":
\"ON\"}' attribute: topic 'zigbee2mqtt/my_bulb/state' payload 'ON' attribute_and_json: both json and attribute (see above)","enum":["attribute_and_json","attribute","json"],"title":"MQTT output type","type":"string"},"transmit_power":{"title":"Transmit power","type":["number","null"]}},"title":"Experimental options","type":"object"},"external_converters":{"examples":["DIYRuZ_FreePad.js"],"items":{"type":"string"},"title":"External converters","type":"array"},"groups":{"patternProperties":{"^.*$":{"$ref":"#/definitions/group"}},"propertyNames":{"pattern":"^[\\w].*$"},"type":"object"},"homeassistant":{"default":false,"description":"Home Assistant integration (MQTT discovery)","title":"Homeassistant integration","type":"boolean"},"map_options":{"properties":{"graphviz":{"properties":{"colors":{"properties":{"fill":{"properties":{"coordinator":{"type":"string"},"enddevice":{"type":"string"},"router":{"type":"string"}},"type":"object"},"font":{"properties":{"coordinator":{"type":"string"},"enddevice":{"type":"string"},"router":{"type":"string"}},"type":"object"},"line":{"properties":{"active":{"type":"string"},"inactive":{"type":"string"}},"type":"object"}},"type":"object"}},"type":"object"}},"title":"Networkmap options","type":"object"},"mqtt":{"properties":{"base_topic":{"description":"MQTT base topic for Zigbee2MQTT MQTT messages","examples":["zigbee2mqtt"],"title":"Base topic","type":"string"},"ca":{"description":"Absolute path to SSL/TLS certificate of CA used to sign server and client certificates","examples":["/etc/ssl/mqtt-ca.crt"],"title":"Certificate authority","type":"string"},"cert":{"examples":["/etc/ssl/mqtt-client.crt"],"title":"SSL/TLS certificate","type":"string"},"client_id":{"description":"MQTT client ID","examples":["MY_CLIENT_ID"],"title":"Client ID","type":"string"},"force_disable_retain":{"default":false,"description":"Disable retain for all send messages. ONLY enable if you MQTT broker doesn't support retained message (e.g. AWS IoT core, Azure IoT Hub, Google Cloud IoT core, IBM Watson IoT Platform). Enabling will break the Home Assistant integration","title":"Force disable retain","type":"boolean"},"include_device_information":{"default":false,"description":"Include device information to mqtt messages","title":"Include device information","type":"boolean"},"keepalive":{"default":60,"description":"MQTT keepalive in second","title":"Keepalive","type":"number"},"key":{"description":"Absolute paths to SSL/TLS key and certificate for client-authentication","examples":["/etc/ssl/mqtt-client.key"],"title":"SSL/TLS key","type":"string"},"password":{"description":"MQTT server authentication password","examples":["ILOVEPELMENI"],"title":"Password","type":"string"},"reject_unauthorized":{"default":true,"description":"Disable self-signed SSL certificate","title":"Reject unauthorized","type":"boolean"},"server":{"description":"MQTT server URL (use mqtts:// for SSL/TLS connection)","examples":["mqtt://localhost:1883"],"title":"MQTT server","type":"string"},"user":{"description":"MQTT server authentication user","examples":["johnnysilverhand"],"title":"User","type":"string"},"version":{"default":4,"description":"MQTT protocol version","title":"Version","type":["number","null"]}},"required":["base_topic","server"],"title":"MQTT settings","type":"object"},"passlist":{"description":"Allow only certain devices to join the network (by ieeeAddr). Note that all devices not on the passlist will be removed from
the network!","items":{"type":"string"},"title":"Passlist","type":"array"},"permit_join":{"default":false,"description":"Allow new devices to join. WARNING: Disable this after all devices have been paired!","title":"Permit join","type":"boolean"},"serial":{"properties":{"adapter":{"description":"Adapter type, not needed unless you are experiencing problems","enum":["deconz","zstack","zigate"],"title":"Adapter","type":"string"},"disable_led":{"default":false,"description":"Disable LED of the adapter if supported","title":"Disable led","type":"boolean"},"port":{"description":"Location of the adapter. To autodetect the port, set null","examples":["/dev/ttyACM0"],"title":"Port","type":["string","null"]}},"title":"Serial settings","type":"object"},"whitelist":{"items":{"type":"string"},"title":"Whitelist (deprecated)","type":"array"}},"required":["mqtt"],"type":"object"},"coordinator":{"meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20201026,"transportrev":2},"type":"zStack3x0"},"log_level":"info","network":{"channel":11,"extended_pan_id":"0xdddddddddddddddd","pan_id":6754},"permit_join":true,"version":"1.17.1"}'
Zigbee2MQTT:info  2021-02-04 08:07:07: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"commit":"99274c7","coordinator":{"meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20201026,"transportrev":2},"type":"zStack3x0"},"log_level":"info","network":{"channel":11,"extendedPanID":"0xdddddddddddddddd","panID":6754},"permit_join":true,"version":"1.17.1"}'

Maintenant, si je décoche l’association :

Gladys :

2021-02-04T09:08:49+0100 <info> handleMqttMessage.js:91 (Zigbee2mqttManager.handleMqttMessage) Zigbee2mqtt topic zigbee2mqtt/bridge/logging not handled.
2021-02-04T09:08:49+0100 <info> handleMqttMessage.js:91 (Zigbee2mqttManager.handleMqttMessage) Zigbee2mqtt topic zigbee2mqtt/bridge/logging not handled.
2021-02-04T09:08:49+0100 <info> handleMqttMessage.js:91 (Zigbee2mqttManager.handleMqttMessage) Zigbee2mqtt topic zigbee2mqtt/bridge/info not handled.
2021-02-04T09:08:49+0100 <info> handleMqttMessage.js:91 (Zigbee2mqttManager.handleMqttMessage) Zigbee2mqtt topic zigbee2mqtt/bridge/logging not handled.

Zigbee :

Zigbee2MQTT:info  2021-02-04 08:08:49: Zigbee: disabling joining new devices.
Zigbee2MQTT:info  2021-02-04 08:08:49: MQTT publish: topic 'zigbee2mqtt/bridge/info', payload '{"commit":"99274c7","config":{"advanced":{"adapter_concurrent":null,"adapter_delay":null,"availability_blacklist":[],"availability_blocklist":[],"availability_passlist":[],"availability_timeout":0,"availability_whitelist":[],"cache_state":true,"cache_state_persistent":true,"cache_state_send_on_startup":true,"channel":11,"elapsed":false,"ext_pan_id":[221,221,221,221,221,221,221,221],"homeassistant_discovery_topic":"homeassistant","homeassistant_legacy_triggers":true,"homeassistant_status_topic":"hass/status","last_seen":"disable","legacy_api":true,"log_directory":"/app/data/log/%TIMESTAMP%","log_file":"log.txt","log_level":"info","log_output":["console","file"],"log_rotation":true,"log_syslog":{},"pan_id":6754,"report":false,"soft_reset_timeout":0,"timestamp_format":"YYYY-MM-DD HH:mm:ss"},"ban":[],"blocklist":[],"device_options":{},"devices":{},"experimental":{"new_api":true,"output":"json"},"external_converters":[],"frontend":{"port":8080},"groups":{},"homeassistant":false,"map_options":{"graphviz":{"colors":{"fill":{"coordinator":"#e04e5d","enddevice":"#fff8ce","router":"#4ea3e0"},"font":{"coordinator":"#ffffff","enddevice":"#000000","router":"#ffffff"},"line":{"active":"#009900","inactive":"#994444"}}}},"mqtt":{"base_topic":"zigbee2mqtt","force_disable_retain":false,"include_device_information":false,"server":"mqtt://localhost:1884","user":"z2m"},"passlist":[],"permit_join":false,"serial":{"disable_led":false,"port":"/dev/ttyACM0"},"whitelist":[]},"config_schema":{"definitions":{"device":{"properties":{"debounce":{"description":"Debounces messages of this device","title":"Debounce","type":"number"},"debounce_ignore":{"description":"Protects unique payload values of specified payload properties from overriding within debounce time","examples":["action"],"items":{"type":"string"},"title":"Ignore debounce","type":"array"},"filtered_attributes":{"description":"Allows to prevent certain attributes from being published","examples":["temperature","battery","action"],"items":{"type":"string"},"title":"Filtered attributes","type":"array"},"friendly_name":{"description":"Used in the MQTT topic of a device. By default this is the device ID","readOnly":true,"title":"Friendly name","type":"string"},"optimistic":{"description":"Publish optimistic state after set (default true)","title":"Optimistic","type":"boolean"},"qos":{"descritption":"QoS level for MQTT messages of this device","title":"QoS","type":"number"},"retain":{"description":"Retain MQTT messages of this device","title":"Retain","type":"boolean"},"retention":{"description":"Sets the MQTT Message Expiry in seconds, Make sure to set mqtt.version to 5","title":"Retention","type":"number"},"retrieve_state":{"description":"Retrieves the state after setting it (Should only be enabled when the reporting feature does not work for this device)","title":"Retrieve State","type":"boolean"}},"required":["friendly_name"],"type":"object"},"group":{"properties":{"devices":{"items":{"type":"string"},"type":"array"},"filtered_attributes":{"items":{"type":"string"},"type":"array"},"friendly_name":{"type":"string"},"optimistic":{"type":"boolean"},"qos":{"type":"number"},"retain":{"type":"boolean"}},"required":["friendly_name"],"type":"object"}},"properties":{"advanced":{"properties":{"adapter_concurrent":{"description":"Adapter concurrency (e.g. 2 for CC2531 or 16 for CC26X2R1) (default: null, uses recommended value)","title":"Adapter concurrency","type":["number","null"]},"adapter_delay":{"title":"Adapter delay","type":["number","null"]},"availability_blacklist":{"items":{"type":"string"},"title":"Availability blacklist (deprecated)","type":"array"},"availability_blocklist":{"description":"Prevent devices from being checked for availability","items":{"type":"string"},"title":"Availability Blocklist","type":"array"},"availability_passlist":{"description":"Only enable availability check for certain devices","items":{"type":"string"},"title":"Availability passlist","type":"array"},"availability_timeout":{"default":0,"description":"Availability timeout in seconds When enabled, devices will be checked if they are still online. Only AC powered routers are checked for availability","minimum":0,"title":"Availability Timeout","type":"number"},"availability_whitelist":{"items":{"type":"string"},"title":"Availability whitelist (deprecated)","type":"array"},"baudrate":{"description":"Baudrate for serial port, default: 115200 for Z-Stack, 38400 for Deconz","examples":[38400,115200],"title":"Baudrate","type":"number"},"cache_state":{"default":true,"description":"MQTT message payload will contain all attributes, not only changed ones. Has to be true when integrating via Home Assistant","title":"Cache state","type":"boolean"},"cache_state_persistent":{"default":true,"description":"Persist cached state, only used when Cache state(cache_state: true)","title":"Chache state persistent","type":"boolean"},"cache_state_send_on_startup":{"default":true,"description":"Cache state send on startup, only used when Cache state(cache_state: true)","title":"Cache state send on startup","type":"boolean"},"channel":{"default":11,"description":"Changing requires re-pairing of all devices. (Note: use a ZLL channel: 11, 15, 20, or 25 to avoid Problems)","maximum":26,"minimum":11,"title":"ZigBee channel","type":"number"},"elapsed":{"default":false,"description":"Add an elapsed attribute to MQTT messages, contains milliseconds since the previous msg","title":"Elapsed","type":"boolean"},"ext_pan_id":{"description":"Zigbee extended pan ID","items":{"type":"number"},"title":"Ext Pan ID","type":"array"},"homeassistant_discovery_topic":{"examples":["homeassistant"],"title":"Homeassistant discovery topic","type":"string"},"homeassistant_status_topic":{"examples":["homeassistant/status"],"title":"Home Assistant status topic","type":"string"},"last_seen":{"default":"disable","description":"Add a last_seen attribute to MQTT messages, contains date/time of last Zigbee message","enum":["disable","ISO_8601","ISO_8601_local","epoch"],"title":"Last seen","type":"string"},"legacy_api":{"default":true,"description":"Disables the legacy api (false = disable)","title":"Legacy API","type":"boolean"},"log_directory":{"description":"Location of log directory","examples":["data/log/%TIMESTAMP%"],"title":"Log directory","type":"string"},"log_file":{"default":"log.txt","description":"Log file name, can also contain timestamp","examples":["zigbee2mqtt_%TIMESTAMP%.log"],"title":"Log file","type":"string"},"log_level":{"default":"info","description":"Logging level","enum":["info","warn","error","debug"],"title":"Log level","type":"string"},"log_output":{"description":"Output location of the log, leave empty to supress logging","items":{"enum":["console","file","syslog"],"type":"string"},"title":"Log output","type":"array"},"log_rotation":{"default":true,"description":"Log rotation","title":"Log rotation","type":"boolean"},"network_key":{"description":"Network encryption key, will improve security (Note: changing requires repairing of all devices)","oneOf":[{"title":"Network key(string)","type":"string"},{"items":{"type":"number"},"title":"Network key(array)","type":"array"}],"title":"Network key"},"pan_id":{"description":"ZigBee pan ID","oneOf":[{"title":"Pan ID (string)","type":"string"},{"title":"Pan ID (number)","type":"number"}],"title":"Pan ID"},"report":{"description":"Enables report feature","title":"Reporting","type":"boolean"},"rtscts":{"default":false,"description":"RTS / CTS Hardware Flow Control for serial port","title":"RTS / CTS","type":"boolean"},"soft_reset_timeout":{"description":"Soft reset ZNP after timeout","minimum":0,"readOnly":true,"title":"Soft reset timeout (deprecated)","type":"number"},"timestamp_format":{"description":"Log timestamp format","examples":["YYYY-MM-DD HH:mm:ss"],"title":"Timestamp format","type":"string"}},"title":"Advanced settings","type":"object"},"ban":{"items":{"type":"string"},"title":"Ban (deprecated)","type":"array"},"blocklist":{"description":"Block devices from the network (by ieeeAddr)","items":{"type":"string"},"title":"Blocklist","type":"array"},"device_options":{"type":"object"},"devices":{"patternProperties":{"^.*$":{"$ref":"#/definitions/device"}},"propertyNames":{"pattern":"^0x[\\d\\w]{16}$"},"type":"object"},"experimental":{"properties":{"output":{"description":"Examples when 'state' of a device is published json: topic: 'zigbee2mqtt/my_bulb' payload '{\"state\":
\"ON\"}' attribute: topic 'zigbee2mqtt/my_bulb/state' payload 'ON' attribute_and_json: both json and attribute (see above)","enum":["attribute_and_json","attribute","json"],"title":"MQTT output type","type":"string"},"transmit_power":{"title":"Transmit power","type":["number","null"]}},"title":"Experimental options","type":"object"},"external_converters":{"examples":["DIYRuZ_FreePad.js"],"items":{"type":"string"},"title":"External converters","type":"array"},"groups":{"patternProperties":{"^.*$":{"$ref":"#/definitions/group"}},"propertyNames":{"pattern":"^[\\w].*$"},"type":"object"},"homeassistant":{"default":false,"description":"Home Assistant integration (MQTT discovery)","title":"Homeassistant integration","type":"boolean"},"map_options":{"properties":{"graphviz":{"properties":{"colors":{"properties":{"fill":{"properties":{"coordinator":{"type":"string"},"enddevice":{"type":"string"},"router":{"type":"string"}},"type":"object"},"font":{"properties":{"coordinator":{"type":"string"},"enddevice":{"type":"string"},"router":{"type":"string"}},"type":"object"},"line":{"properties":{"active":{"type":"string"},"inactive":{"type":"string"}},"type":"object"}},"type":"object"}},"type":"object"}},"title":"Networkmap options","type":"object"},"mqtt":{"properties":{"base_topic":{"description":"MQTT base topic for Zigbee2MQTT MQTT messages","examples":["zigbee2mqtt"],"title":"Base topic","type":"string"},"ca":{"description":"Absolute path to SSL/TLS certificate of CA used to sign server and client certificates","examples":["/etc/ssl/mqtt-ca.crt"],"title":"Certificate authority","type":"string"},"cert":{"examples":["/etc/ssl/mqtt-client.crt"],"title":"SSL/TLS certificate","type":"string"},"client_id":{"description":"MQTT client ID","examples":["MY_CLIENT_ID"],"title":"Client ID","type":"string"},"force_disable_retain":{"default":false,"description":"Disable retain for all send messages. ONLY enable if you MQTT broker doesn't support retained message (e.g. AWS IoT core, Azure IoT Hub, Google Cloud IoT core, IBM Watson IoT Platform). Enabling will break the Home Assistant integration","title":"Force disable retain","type":"boolean"},"include_device_information":{"default":false,"description":"Include device information to mqtt messages","title":"Include device information","type":"boolean"},"keepalive":{"default":60,"description":"MQTT keepalive in second","title":"Keepalive","type":"number"},"key":{"description":"Absolute paths to SSL/TLS key and certificate for client-authentication","examples":["/etc/ssl/mqtt-client.key"],"title":"SSL/TLS key","type":"string"},"password":{"description":"MQTT server authentication password","examples":["ILOVEPELMENI"],"title":"Password","type":"string"},"reject_unauthorized":{"default":true,"description":"Disable self-signed SSL certificate","title":"Reject unauthorized","type":"boolean"},"server":{"description":"MQTT server URL (use mqtts:// for SSL/TLS connection)","examples":["mqtt://localhost:1883"],"title":"MQTT server","type":"string"},"user":{"description":"MQTT server authentication user","examples":["johnnysilverhand"],"title":"User","type":"string"},"version":{"default":4,"description":"MQTT protocol version","title":"Version","type":["number","null"]}},"required":["base_topic","server"],"title":"MQTT settings","type":"object"},"passlist":{"description":"Allow only certain devices to join the network (by ieeeAddr). Note that all devices not on the passlist will be removed from
the network!","items":{"type":"string"},"title":"Passlist","type":"array"},"permit_join":{"default":false,"description":"Allow new devices to join. WARNING: Disable this after all devices have been paired!","title":"Permit join","type":"boolean"},"serial":{"properties":{"adapter":{"description":"Adapter type, not needed unless you are experiencing problems","enum":["deconz","zstack","zigate"],"title":"Adapter","type":"string"},"disable_led":{"default":false,"description":"Disable LED of the adapter if supported","title":"Disable led","type":"boolean"},"port":{"description":"Location of the adapter. To autodetect the port, set null","examples":["/dev/ttyACM0"],"title":"Port","type":["string","null"]}},"title":"Serial settings","type":"object"},"whitelist":{"items":{"type":"string"},"title":"Whitelist (deprecated)","type":"array"}},"required":["mqtt"],"type":"object"},"coordinator":{"meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20201026,"transportrev":2},"type":"zStack3x0"},"log_level":"info","network":{"channel":11,"extended_pan_id":"0xdddddddddddddddd","pan_id":6754},"permit_join":false,"version":"1.17.1"}'
Zigbee2MQTT:info  2021-02-04 08:08:49: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"commit":"99274c7","coordinator":{"meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20201026,"transportrev":2},"type":"zStack3x0"},"log_level":"info","network":{"channel":11,"extendedPanID":"0xdddddddddddddddd","panID":6754},"permit_join":false,"version":"1.17.1"}'

J'espère qu'il y a suffisamment de détails pour t'aider !

C’est le client ID qui est déjà utilisé ( y’a une 1ère connexion qui n’est pas killé ? )

clientId: `gladys-main-instance-${Math.floor(Math.random() * 1000000)}`,

Les 2 autres points ne sont pas des erreurs/problèmes

  1. C’est parce qu’il ny’a rien sur mqtt (aucuns devices)
  2. Pas d’erreur, faut appairer tes devices :wink:

Tu penses que je devrais faire le même fix que toi ici ? [MQTT] Generate random client ID by VonOx · Pull Request #1034 · GladysAssistant/Gladys · GitHub