ok merci, je posterai ce soir les éléments
ChatGPT
A conversational AI system that listens, learns, and challenges
ok merci, je posterai ce soir les éléments
Tu dois être sous firefox peut-être, si c’est le cas essaie de faire la manip sous chrome ou opéra (i l y a un problème récurent d’auto-complétion à la volée des champs sous firefox)
@cce66 , merci beaucoup, ça a fonctionné tout de suite sous chromium!
ALors pour info cela viens de m’arriver a l’instant en date du 02/11/2024
et la manip a resolu le truc il faudrais la rajouter a la doc en tips en cas de soucis
Je profite du message de @Prof_Techno pour remonter également le soucis… Je devais m’y employer depuis un moment, mais zappé à chaque fois.
Pour info @pierre-gilles, le problème de non reconnexion du service MQTT se produit chez moi depuis … toujours ^^ et n’a jamais cessé !
Pour recontextualiser, j’ai 2 installations chez moi (enfin 3 en vrai ^^ mais y en a une qui ne se met pas à jour automatiquement ^^) :
Je comptais prendre le temps de regarder car je pense qu’il s’agit d’un problème de temps de reconnexion… le simple fait de cliquer sur la connexion le matin suivant reconnecte sans soucis donc …
@Terdious Tu utilises quelle version du broker MQTT ?
Est-ce que par hasard les mises à jour de Gladys et de mosquitto interviendrait en même temps ce qui ferait que Gladys n’arrive jamais à se connecter à Mosquitto lors du premier démarrage, et ainsi ne s’y reconnecte jamais (car jamais connecté) ? Car je confirme que la re-connexion fonctionne très bien, mais quid si la connexion initiale n’est pas possible ?
Tiens nous au courant de tes investigations ! Je peux aider au besoin si j’ai suffisamment de data. Pour l’instant, il me semble n’avoir jamais réussi à reproduire ces bugs malheureusement
Mon serveur mosquitto n’est surtout pas en mise à jour automatique. Voici sa version au cas où :
Mais comme je le disais, aucun souci avec mon autre Gladys.
Information supplémentaire :
Si je suis en dev et que je prend ma base prod en base dev, j’ai exactement le même souci … ^^
Exemple :
2024-11-05T14:49:31+0100 <info> index.js:45 (shutdown) SIGTERM received.
2024-11-05T14:49:31+0100 <info> index.js:51 (shutdown) Closing database connections.
2024-11-05T14:49:31+0100 <info> index.js:37 (closeDuckDB) DuckDB closed.
2024-11-05T14:49:31+0100 <info> index.js:27 (closeSQLite) SQLite closed.
2024-11-05T14:49:38+0100 <info> index.js:96 (Object.duckDbCreateTableIfNotExist) DuckDB - Creating database table if not exist
2024-11-05T14:49:38+0100 <info> job.purge.js:17 (Job.purge) Deleting all background jobs created before = Tue Oct 29 2024 14:49:38 GMT+0100 (Central European Standard Time)
2024-11-05T14:49:40+0100 <info> service.startAll.js:30 () Service xiaomi was manually stopped, so it is ignored at startup
2024-11-05T14:49:40+0100 <info> service.startAll.js:30 () Service ewelink was manually stopped, so it is ignored at startup
2024-11-05T14:49:40+0100 <info> service.startAll.js:30 () Service tp-link was manually stopped, so it is ignored at startup
2024-11-05T14:49:40+0100 <info> service.startAll.js:30 () Service example was manually stopped, so it is ignored at startup
2024-11-05T14:49:40+0100 <info> index.js:14 (Object.start) starting Alexa service
2024-11-05T14:49:40+0100 <info> index.js:20 (Object.start) Starting Open Weather service
2024-11-05T14:49:40+0100 <info> index.js:25 (Object.start) Starting EDF Tempo service
2024-11-05T14:49:40+0100 <info> index.js:18 (Object.start) Starting GoogleCast service
2024-11-05T14:49:40+0100 <info> index.js:16 (Object.start) Starting Z-Wave JS UI service
2024-11-05T14:49:40+0100 <info> service.start.js:40 (Service.start) Service zwavejs-ui is not configured, so it was not started.
2024-11-05T14:49:40+0100 <info> index.js:17 (Object.start) Starting Sonos service
2024-11-05T14:49:40+0100 <info> index.js:17 (Object.start) Starting Netatmo service 2f061381-b138-428a-abfb-dfb1af216ec2
2024-11-05T14:49:40+0100 <info> service.start.js:40 (Service.start) Service netatmo is not configured, so it was not started.
2024-11-05T14:49:40+0100 <info> checkForContainerUpdates.js:13 (NodeRedManager.checkForContainerUpdates) Node-RED: Checking for current installed versions and required updates...
2024-11-05T14:49:40+0100 <info> checkForContainerUpdates.js:17 (NodeRedManager.checkForContainerUpdates) Node-RED: update #2 of the container required...
2024-11-05T14:49:40+0100 <info> checkForContainerUpdates.js:34 (NodeRedManager.checkForContainerUpdates) Node-RED: update #2 of the container done
2024-11-05T14:49:40+0100 <info> installContainer.js:48 (NodeRedManager.installContainer) Nodered: is being installed as Docker container...
2024-11-05T14:49:40+0100 <info> installContainer.js:49 (NodeRedManager.installContainer) Pulling nodered/node-red:3.1 image...
2024-11-05T14:49:41+0100 <info> installContainer.js:53 (NodeRedManager.installContainer) Nodered: Preparing environment...
2024-11-05T14:49:41+0100 <info> configureContainer.js:16 (NodeRedManager.configureContainer) Node-RED: Docker container is being configured...
2024-11-05T14:49:41+0100 <info> configureContainer.js:34 (NodeRedManager.configureContainer) Node-RED: configuration file already exists.
2024-11-05T14:49:41+0100 <info> installContainer.js:56 (NodeRedManager.installContainer) Creation of container...
2024-11-05T14:49:41+0100 <info> installContainer.js:66 (NodeRedManager.installContainer) Node-RED: successfully installed and configured as Docker container
2024-11-05T14:49:41+0100 <info> configureContainer.js:16 (NodeRedManager.configureContainer) Node-RED: Docker container is being configured...
2024-11-05T14:49:41+0100 <info> configureContainer.js:34 (NodeRedManager.configureContainer) Node-RED: configuration file already exists.
2024-11-05T14:49:41+0100 <info> installContainer.js:89 (NodeRedManager.installContainer) Node-RED: container is (re)starting...
2024-11-05T14:49:46+0100 <error> index.js:15 (process.<anonymous>) unhandledRejection catched: Promise {
[...]
2024-11-05T14:49:47+0100 <info> installContainer.js:95 (NodeRedManager.installContainer) Node-RED: container successfully started
2024-11-05T14:49:47+0100 <info> index.js:27 (Object.start) Starting MELCloud service bca6a945-1d67-494a-9abc-eef17f023afa
2024-11-05T14:49:47+0100 <info> service.start.js:40 (Service.start) Service melcloud is not configured, so it was not started.
2024-11-05T14:49:47+0100 <info> index.js:17 (Object.start) Starting Tuya service 2ae251ee-8619-4310-9c71-f0542d7a99b7
2024-11-05T14:49:47+0100 <info> service.start.js:40 (Service.start) Service tuya is not configured, so it was not started.
2024-11-05T14:49:47+0100 <info> index.js:16 (Object.start) Starting Nextcloud Talk service
2024-11-05T14:49:47+0100 <info> service.start.js:40 (Service.start) Service nextcloud-talk is not configured, so it was not started.
2024-11-05T14:49:47+0100 <info> index.js:17 (Object.start) Starting LAN Manager service
2024-11-05T14:49:47+0100 <info> lan-manager.initPresenceScanner.js:18 (LANManager.initPresenceScanner) LANManager configuration: starting presence scanner
2024-11-05T14:49:47+0100 <info> index.js:16 (Object.start) starting Broadlink service
2024-11-05T14:49:47+0100 <info> index.js:18 (Object.start) Starting HomeKit service
2024-11-05T14:49:48+0100 <info> index.js:14 (Object.start) starting GoogleActions service
2024-11-05T14:49:48+0100 <info> init.js:56 (Zigbee2mqttManager.init) Zigbee2mqtt USB dongle not attached
2024-11-05T14:49:48+0100 <info> connect.js:25 (Zigbee2mqttManager.connect) Connecting Gladys to mqtt://10.5.0.51:1884 MQTT broker...
2024-11-05T14:49:48+0100 <info> connect.js:35 (MqttClient.<anonymous>) Connected to MQTT container mqtt://10.5.0.51:1884
2024-11-05T14:49:48+0100 <info> subscribe.js:12 (Zigbee2mqttManager.subscribe) Subscribing to MQTT topic zigbee2mqtt/#
2024-11-05T14:49:48+0100 <info> index.js:15 (Object.start) Starting Bluetooth service
2024-11-05T14:49:48+0100 <info> index.js:15 (Object.start) Starting Tasmota service
2024-11-05T14:49:48+0100 <info> index.js:13 (Object.start) Starting usb service
2024-11-05T14:49:48+0100 <info> index.js:19 (Object.start) Starting Telegram service
2024-11-05T14:49:48+0100 <info> index.js:17 (Object.start) Starting RTSP service
2024-11-05T14:49:48+0100 <info> index.js:18 (Object.start) Starting Philips Hue service
Connexion au service
2024-11-05T14:49:48+0100 <info> index.js:16 (Object.start) Starting MQTT service
2024-11-05T14:49:48+0100 <info> updateContainer.js:13 (MqttHandler.updateContainer) MQTT: checking for required changes...
2024-11-05T14:49:48+0100 <info> updateContainer.js:41 (MqttHandler.updateContainer) MQTT: no container update required
2024-11-05T14:49:48+0100 <info> connect.js:38 (MqttClient.<anonymous>) Connected to MQTT server mqtt://10.5.0.50:1883
2024-11-05T14:49:48+0100 <info> subscribe.js:12 (MqttHandler.subscribe) Subscribing to MQTT topic stat/+/+
2024-11-05T14:49:48+0100 <info> subscribe.js:12 (MqttHandler.subscribe) Subscribing to MQTT topic tele/+/+
2024-11-05T14:49:48+0100 <info> subscribe.js:12 (MqttHandler.subscribe) Subscribing to MQTT topic gladys/master/#
2024-11-05T14:49:48+0100 <info> index.js:15 (Object.start) Starting enedis service
2024-11-05T14:49:49+0100 <info> index.js:88 (Object.start) Starting CalDAV service
2024-11-05T14:49:49+0100 <info> scene.dailyUpdate.js:58 () Sunrise today is at 7:55 today, in your timezone = Europe/Paris
2024-11-05T14:49:49+0100 <info> scene.dailyUpdate.js:59 () Sunset today is at 17:31 today, in your timezone = Europe/Paris
2024-11-05T14:49:49+0100 <info> scene.dailyUpdate.js:70 () The sun rose this morning. Not scheduling for today.
2024-11-05T14:49:49+0100 <info> scene.dailyUpdate.js:81 () Sunset is scheduled, in 3 hours.
2024-11-05T14:49:49+0100 <info> scene.dailyUpdate.js:58 () Sunrise today is at 7:55 today, in your timezone = Europe/Paris
2024-11-05T14:49:49+0100 <info> scene.dailyUpdate.js:59 () Sunset today is at 17:31 today, in your timezone = Europe/Paris
2024-11-05T14:49:49+0100 <info> scene.dailyUpdate.js:70 () The sun rose this morning. Not scheduling for today.
2024-11-05T14:49:49+0100 <info> scene.dailyUpdate.js:81 () Sunset is scheduled, in 3 hours.
2024-11-05T14:49:49+0100 <info> scene.dailyUpdate.js:58 () Sunrise today is at 7:55 today, in your timezone = Europe/Paris
2024-11-05T14:49:49+0100 <info> scene.dailyUpdate.js:59 () Sunset today is at 17:31 today, in your timezone = Europe/Paris
2024-11-05T14:49:49+0100 <info> scene.dailyUpdate.js:70 () The sun rose this morning. Not scheduling for today.
2024-11-05T14:49:49+0100 <info> scene.dailyUpdate.js:81 () Sunset is scheduled, in 3 hours.
2024-11-05T14:49:49+0100 <info> scene.dailyUpdate.js:58 () Sunrise today is at 7:55 today, in your timezone = Europe/Paris
2024-11-05T14:49:49+0100 <info> scene.dailyUpdate.js:59 () Sunset today is at 17:31 today, in your timezone = Europe/Paris
2024-11-05T14:49:49+0100 <info> scene.dailyUpdate.js:70 () The sun rose this morning. Not scheduling for today.
2024-11-05T14:49:49+0100 <info> scene.dailyUpdate.js:81 () Sunset is scheduled, in 3 hours.
2024-11-05T14:49:49+0100 <info> scene.dailyUpdate.js:58 () Sunrise today is at 7:55 today, in your timezone = Europe/Paris
2024-11-05T14:49:49+0100 <info> scene.dailyUpdate.js:59 () Sunset today is at 17:31 today, in your timezone = Europe/Paris
2024-11-05T14:49:49+0100 <info> scene.dailyUpdate.js:70 () The sun rose this morning. Not scheduling for today.
2024-11-05T14:49:49+0100 <info> scene.dailyUpdate.js:81 () Sunset is scheduled, in 3 hours.
2024-11-05T14:49:49+0100 <info> scene.dailyUpdate.js:58 () Sunrise today is at 7:30 today, in your timezone = Europe/Paris
2024-11-05T14:49:49+0100 <info> scene.dailyUpdate.js:59 () Sunset today is at 17:38 today, in your timezone = Europe/Paris
2024-11-05T14:49:49+0100 <info> scene.dailyUpdate.js:70 () The sun rose this morning. Not scheduling for today.
2024-11-05T14:49:49+0100 <info> scene.dailyUpdate.js:81 () Sunset is scheduled, in 3 hours.
Souscription aux topics MQTT au lancement + messages Tasmota
2024-11-05T14:49:49+0100 <info> listenToCustomMqttTopicIfNeeded.js:32 () Subscribing to MQTT topic
2024-11-05T14:49:49+0100 <info> listenToCustomMqttTopicIfNeeded.js:32 () Subscribing to MQTT topic
2024-11-05T14:49:49+0100 <info> listenToCustomMqttTopicIfNeeded.js:32 () Subscribing to MQTT topic gladys/master/device/mqtt:light-ambiance-piscine/feature/mqtt:light-ambiance-piscine
2024-11-05T14:49:49+0100 <info> listenToCustomMqttTopicIfNeeded.js:32 () Subscribing to MQTT topic gladys/master/device/mqtt:light-ambiance-piscine/feature/mqtt:light-ambiance-piscine
2024-11-05T14:49:49+0100 <info> listenToCustomMqttTopicIfNeeded.js:32 () Subscribing to MQTT topic tarifs-total-energie
2024-11-05T14:49:49+0100 <info> listenToCustomMqttTopicIfNeeded.js:32 () Subscribing to MQTT topic tarifs-total-energie
2024-11-05T14:49:49+0100 <info> listenToCustomMqttTopicIfNeeded.js:32 () Subscribing to MQTT topic consos-vince
2024-11-05T14:49:49+0100 <info> listenToCustomMqttTopicIfNeeded.js:32 () Subscribing to MQTT topic consos-vince
2024-11-05T14:49:49+0100 <info> listenToCustomMqttTopicIfNeeded.js:32 () Subscribing to MQTT topic consos-vince
2024-11-05T14:49:49+0100 <info> listenToCustomMqttTopicIfNeeded.js:32 () Subscribing to MQTT topic consos-vince
2024-11-05T14:49:49+0100 <info> listenToCustomMqttTopicIfNeeded.js:32 () Subscribing to MQTT topic
2024-11-05T14:49:49+0100 <info> listenToCustomMqttTopicIfNeeded.js:32 () Subscribing to MQTT topic consos-vince
2024-11-05T14:49:49+0100 <info> listenToCustomMqttTopicIfNeeded.js:32 () Subscribing to MQTT topic consos-vince
2024-11-05T14:49:49+0100 <info> listenToCustomMqttTopicIfNeeded.js:32 () Subscribing to MQTT topic consos-vince
2024-11-05T14:49:49+0100 <info> listenToCustomMqttTopicIfNeeded.js:32 () Subscribing to MQTT topic consos-vince
2024-11-05T14:49:49+0100 <warn> handleNewMessage.js:53 (MqttHandler.handleNewMessage) Unable to handle new MQTT message in topic stat/tasmota_C4BA91/STATUS11
2024-11-05T14:49:49+0100 <warn> handleNewMessage.js:54 (MqttHandler.handleNewMessage) TypeError: Cannot read properties of null (reading 'external_id')
at MqttHandler.handleDeviceCustomTopicMessage (/src/server/services/mqtt/lib/handler/handleDeviceCustomTopicMessage.js:32:101)
at /src/server/services/mqtt/lib/handleNewMessage.js:41:12
at Array.forEach (<anonymous>)
at MqttHandler.handleNewMessage (/src/server/services/mqtt/lib/handleNewMessage.js:39:26)
at MqttClient.<anonymous> (/src/server/services/mqtt/lib/connect.js:68:10)
at MqttClient.emit (node:events:517:28)
at MqttClient._handlePublish (/src/server/services/mqtt/node_modules/mqtt/lib/client.js:1257:12)
at MqttClient._handlePacket (/src/server/services/mqtt/node_modules/mqtt/lib/client.js:401:12)
at work (/src/server/services/mqtt/node_modules/mqtt/lib/client.js:312:12)
at Writable.writable._write (/src/server/services/mqtt/node_modules/mqtt/lib/client.js:325:5)
at doWrite (/src/server/services/mqtt/node_modules/readable-stream/lib/_stream_writable.js:428:64)
at writeOrBuffer (/src/server/services/mqtt/node_modules/readable-stream/lib/_stream_writable.js:417:5)
at Writable.write (/src/server/services/mqtt/node_modules/readable-stream/lib/_stream_writable.js:334:11)
at Socket.ondata (node:internal/streams/readable:809:22)
at Socket.emit (node:events:517:28)
at addChunk (node:internal/streams/readable:368:12)
at readableAddChunk (node:internal/streams/readable:341:9)
at Socket.Readable.push (node:internal/streams/readable:278:10)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
2024-11-05T14:49:49+0100 <warn> handleNewMessage.js:53 (MqttHandler.handleNewMessage) Unable to handle new MQTT message in topic stat/Tasmota_POWR2-1/STATUS11
2024-11-05T14:49:49+0100 <warn> handleNewMessage.js:53 (MqttHandler.handleNewMessage) Unable to handle new MQTT message in topic stat/tasmota_C4E883/STATUS11
2024-11-05T14:49:49+0100 <warn> handleNewMessage.js:54 (MqttHandler.handleNewMessage) TypeError: Cannot read properties of null (reading 'external_id')
at MqttHandler.handleDeviceCustomTopicMessage (/src/server/services/mqtt/lib/handler/handleDeviceCustomTopicMessage.js:32:101)
at /src/server/services/mqtt/lib/handleNewMessage.js:41:12
at Array.forEach (<anonymous>)
at MqttHandler.handleNewMessage (/src/server/services/mqtt/lib/handleNewMessage.js:39:26)
at MqttClient.<anonymous> (/src/server/services/mqtt/lib/connect.js:68:10)
at MqttClient.emit (node:events:517:28)
at MqttClient._handlePublish (/src/server/services/mqtt/node_modules/mqtt/lib/client.js:1257:12)
at MqttClient._handlePacket (/src/server/services/mqtt/node_modules/mqtt/lib/client.js:401:12)
at work (/src/server/services/mqtt/node_modules/mqtt/lib/client.js:312:12)
at processTicksAndRejections (node:internal/process/task_queues:77:11)
2024-11-05T14:49:49+0100 <warn> connect.js:50 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: write ECONNRESET
2024-11-05T14:49:49+0100 <info> device.migrateFromSQLiteToDuckDb.js:36 (DeviceManager.migrateFromSQLiteToDuckDb) DuckDB : Already migrated from SQLite. Not migrating.
2024-11-05T14:49:49+0100 <info> index.js:64 (Server.<anonymous>) Server listening on port 82
2024-11-05T14:49:50+0100 <info> index.js:917 (Socket.<anonymous>) Gladys Gateway: connected in websockets
2024-11-05T14:50:04+0100 <info> enedis.sync.js:23 (recursiveBatchCall) Enedis: Syncing 02351085339470 after 1841-09-18
Comme tu le vois dans la 2ème et dans la 4ème partie, la connexion se fait bien au redémarrage mais je n’ai même pas le temps de la voir. Je reçois quelques messages puis je me retrouve déconnecté. Pas de message complémentaire côté Gladys, par contre côté broker mosquitto :
2024-11-05 16:06:17.%f: New client connected from xx.5.xx.227:56192 as gladys-main-instance-471473 (p2, c1, k60, u'mqtt').
2024-11-05 16:06:18.%f: Client gladys-main-instance-471473 disconnected due to malformed packet.
Mais si je me reconnecte via Gladys, aucun soucis …
PS : Oh et dans le doute j’ai mis à jour mosquitto pour être sûr :
Ok super intéressant ton investigation @Terdious
Le message le plus intéressant est là :
disconnected due to malformed packet.
2 possibilités:
PS : Oh et dans le doute j’ai mis à jour mosquitto pour être sûr :
Déjà, tu as mis à jour vers la 2.0.11, hors dans Gladys on utilise normalement la 2.0.15 ( Code: Gladys/server/services/mqtt/docker/eclipse-mosquitto-container.json at master · GladysAssistant/Gladys · GitHub )
La dernière version de eclipse-mosquitto est la 2.0.20 mais on a eu des soucis avec la 2.0.16, donc à tester si ces soucis sont résolus.
Donc première piste, c’est d’investiguer sur les différentes versions d’eclipse-mosquitto pour voir si ça vient pas de là
2 option: mettre à jour MQTT.js
La lib MQTT.js (GitHub - mqttjs/MQTT.js: The MQTT client for Node.js and the browser) qu’on utilise dans l’intégration est en 4.0.0 dans Gladys, et la dernière version est en 5.10.1.
En sachant que la 5.0 est une re-écriture complète en Typescript, il y a moyen que la lib ait pas mal changé depuis et corrige des bugs historiques :
Donc l’upgrade peut être une autre piste
Merci beaucoup pour ta réflexion supplémentaire @pierre-gilles.
J’ai le souci depuis des années donc rien de pressant !! Ce que je te propose, c’est de réaliser les tests avec les solutions que tu mentionnes sitôt que je peux reprendre le dev. Etant le mieux placé pour reproduire le problème à l’envie ^^
Je dois juste absolument finir mon isolation avant le grand froid.
EDIT (pour mémoire) : Aucun soucis avec les autres connexion
Je ne sais pas si cela aidera (pas décortiqué ^^) :
A conversational AI system that listens, learns, and challenges