Closed florentin68 closed 2 years ago
Bonsoir,
Il y a 2 logs: jMQTT et jMQTT_daemon les 2 sont interessants car l'un représente le daemon python et l'autre le daemon PHP
Hier je vous ai posté un extrait de jmqtt_daemon, voici ci-dessous celui nommé jmqtt de ce soir :
[2021-09-23 22:03:47][DEBUG] : Id 21 : Python daemon connected successfully to WebSocket Daemon
[2021-09-23 22:03:47][DEBUG] : Id 21 : Python daemon disconnected from WebSocket Daemon
[2021-09-23 22:03:52][DEBUG] : Id 21 : Python daemon connected successfully to WebSocket Daemon
[2021-09-23 22:03:52][DEBUG] : Id 21 : Python daemon disconnected from WebSocket Daemon
[2021-09-23 22:03:57][DEBUG] : Id 21 : Python daemon connected successfully to WebSocket Daemon
[2021-09-23 22:03:57][DEBUG] : Id 21 : Python daemon disconnected from WebSocket Daemon
[2021-09-23 22:04:02][DEBUG] : Id 21 : Python daemon connected successfully to WebSocket Daemon
[2021-09-23 22:04:02][DEBUG] : Id 21 : Python daemon disconnected from WebSocket Daemon
[2021-09-23 22:04:05][INFO] : Starting MqttClient for jmqtt_borker
[2021-09-23 22:04:05][DEBUG] : Id 21 : Python daemon connected successfully to WebSocket Daemon
[2021-09-23 22:04:05][DEBUG] : Id 21 : Python daemon disconnected from WebSocket Daemon
[2021-09-23 22:04:11][DEBUG] : Id 21 : Python daemon connected successfully to WebSocket Daemon
[2021-09-23 22:04:11][DEBUG] : Id 21 : Python daemon disconnected from WebSocket Daemon
[2021-09-23 22:04:16][DEBUG] : Id 21 : Python daemon connected successfully to WebSocket Daemon
[2021-09-23 22:04:16][DEBUG] : Id 21 : Python daemon disconnected from WebSocket Daemon
[2021-09-23 22:04:21][DEBUG] : Id 21 : Python daemon connected successfully to WebSocket Daemon
[2021-09-23 22:04:21][DEBUG] : Id 21 : Python daemon disconnected from WebSocket Daemon
[2021-09-23 22:04:26][DEBUG] : Id 21 : Python daemon connected successfully to WebSocket Daemon
[2021-09-23 22:04:26][DEBUG] : Id 21 : Python daemon disconnected from WebSocket Daemon
[2021-09-23 22:04:31][DEBUG] : Id 21 : Python daemon connected successfully to WebSocket Daemon
[2021-09-23 22:04:31][DEBUG] : Id 21 : Python daemon disconnected from WebSocket Daemon
[2021-09-23 22:04:36][DEBUG] : Id 21 : Python daemon connected successfully to WebSocket Daemon
[2021-09-23 22:04:36][DEBUG] : Id 21 : Python daemon disconnected from WebSocket Daemon
[2021-09-23 22:04:41][DEBUG] : Id 21 : Python daemon connected successfully to WebSocket Daemon
[2021-09-23 22:04:41][DEBUG] : Id 21 : Python daemon disconnected from WebSocket Daemon
[2021-09-23 22:04:46][DEBUG] : Id 21 : Python daemon connected successfully to WebSocket Daemon
[2021-09-23 22:04:46][DEBUG] : Id 21 : Python daemon disconnected from WebSocket Daemon
[2021-09-23 22:04:51][DEBUG] : Id 21 : Python daemon connected successfully to WebSocket Daemon
[2021-09-23 22:04:51][DEBUG] : Id 21 : Python daemon disconnected from WebSocket Daemon
est-il possible de mesurer le nombre message par minute qui passe sur le broker avec MQTT Explorer par exemple? quelle est la plateforme matérielle utilisée? Rpi4? VM x86? etc.
Il s'agit d'une VM Debian 10 sur un NAS QNAP (Virtualization Station). Je vais regarder le nombre de messages ce soir et je vous le donnerai.
uname -a
=> Linux jeedom 4.19.0-17-amd64 #1 SMP Debian 4.19.194-3 (2021-07-18) x86_64 GNU/Linux
Nombre de messages par 5 minutes d'après MQTT Explorer :
Voici également le log du serveur MQTT (Mosquitto) :
2021-09-24T20:56:24: New connection from 127.0.0.1:49560 on port 1883.
2021-09-24T20:56:24: New client connected from 127.0.0.1:49560 as mqttjs_3a9114d9 (p2, c1, k60, u'z2m').
2021-09-24T20:56:24: Will message specified (7 bytes) (r1, q0).
2021-09-24T20:56:24: zigbee2mqtt/bridge/state
2021-09-24T20:56:24: Sending CONNACK to mqttjs_3a9114d9 (0, 0)
2021-09-24T20:56:24: Received SUBSCRIBE from mqttjs_3a9114d9
2021-09-24T20:56:24: zigbee2mqtt/# (QoS 0)
2021-09-24T20:56:24: mqttjs_3a9114d9 0 zigbee2mqtt/#
2021-09-24T20:56:24: Sending SUBACK to mqttjs_3a9114d9
2021-09-24T20:56:24: Sending PUBLISH to mqttjs_3a9114d9 (d0, q0, r1, m0, 'zigbee2mqtt/bridge/state', ... (7 bytes))
2021-09-24T20:56:24: Sending PUBLISH to mqttjs_3a9114d9 (d0, q0, r1, m0, 'zigbee2mqtt/bridge/info', ... (21193 bytes))
2021-09-24T20:56:24: Sending PUBLISH to mqttjs_3a9114d9 (d0, q0, r1, m0, 'zigbee2mqtt/bridge/devices', ... (37308 bytes))
2021-09-24T20:56:24: Sending PUBLISH to mqttjs_3a9114d9 (d0, q0, r1, m0, 'zigbee2mqtt/bridge/groups', ... (2 bytes))
2021-09-24T20:56:24: Sending PUBLISH to mqttjs_3a9114d9 (d0, q0, r1, m0, 'zigbee2mqtt/bridge/config', ... (286 bytes))
2021-09-24T20:56:24: Sending PUBLISH to mqttjs_3a9114d9 (d0, q0, r1, m0, 'zigbee2mqtt/bridge/extensions', ... (2 bytes))
2021-09-24T20:56:24: Received PUBLISH from mqttjs_3a9114d9 (d0, q0, r0, m0, 'zigbee2mqtt/bridge/logging', ... (53 bytes))
2021-09-24T20:56:24: Sending PUBLISH to mqttjs_3a9114d9 (d0, q0, r0, m0, 'zigbee2mqtt/bridge/logging', ... (53 bytes))
2021-09-24T20:56:24: Received PUBLISH from mqttjs_3a9114d9 (d0, q0, r0, m0, 'zigbee2mqtt/bridge/logging', ... (93 bytes))
2021-09-24T20:56:24: Sending PUBLISH to mqttjs_3a9114d9 (d0, q0, r0, m0, 'zigbee2mqtt/bridge/logging', ... (93 bytes))
2021-09-24T20:56:24: Received PUBLISH from mqttjs_3a9114d9 (d0, q0, r1, m0, 'zigbee2mqtt/bridge/state', ... (6 bytes))
2021-09-24T20:56:24: Sending PUBLISH to mqttjs_3a9114d9 (d0, q0, r0, m0, 'zigbee2mqtt/bridge/state', ... (6 bytes))
2021-09-24T20:56:25: Received PUBLISH from mqttjs_3a9114d9 (d0, q0, r0, m0, 'zigbee2mqtt/bridge/logging', ... (663 bytes))
2021-09-24T20:56:25: Sending PUBLISH to mqttjs_3a9114d9 (d0, q0, r0, m0, 'zigbee2mqtt/bridge/logging', ... (663 bytes))
2021-09-24T20:56:25: Received PUBLISH from mqttjs_3a9114d9 (d0, q1, r0, m65058, 'zigbee2mqtt/0x00158d00065947ee', ... (502 bytes))
2021-09-24T20:56:25: Sending PUBLISH to mqttjs_3a9114d9 (d0, q0, r0, m0, 'zigbee2mqtt/0x00158d00065947ee', ... (502 bytes))
2021-09-24T20:56:25: Sending PUBACK to mqttjs_3a9114d9 (m65058, rc0)
2021-09-24T20:56:28: New connection from ::1:51869 on port 1883.
2021-09-24T20:56:28: New client connected from ::1:51869 as jeedom (p2, c1, k30, u'jeedom').
2021-09-24T20:56:28: Will message specified (7 bytes) (r1, q1).
2021-09-24T20:56:28: jeedom/status
2021-09-24T20:56:28: Sending CONNACK to jeedom (0, 0)
2021-09-24T20:56:28: Received PUBLISH from jeedom (d0, q1, r1, m25, 'jeedom/status', ... (6 bytes))
2021-09-24T20:56:28: Sending PUBACK to jeedom (m25, rc0)
2021-09-24T20:56:28: Received SUBSCRIBE from jeedom
2021-09-24T20:56:28: zigbee2mqtt/0x00158d000400fe09 (QoS 1)
2021-09-24T20:56:28: jeedom 1 zigbee2mqtt/0x00158d000400fe09
2021-09-24T20:56:28: Sending SUBACK to jeedom
2021-09-24T20:56:28: Received SUBSCRIBE from jeedom
2021-09-24T20:56:28: zigbee2mqtt/0x00158d000400fdf3 (QoS 1)
2021-09-24T20:56:28: jeedom 1 zigbee2mqtt/0x00158d000400fdf3
2021-09-24T20:56:28: Sending SUBACK to jeedom
2021-09-24T20:56:28: Received SUBSCRIBE from jeedom
2021-09-24T20:56:28: zigbee2mqtt/0x00158d00028355f7 (QoS 1)
2021-09-24T20:56:28: jeedom 1 zigbee2mqtt/0x00158d00028355f7
2021-09-24T20:56:28: Sending SUBACK to jeedom
2021-09-24T20:56:28: Received SUBSCRIBE from jeedom
2021-09-24T20:56:28: zigbee2mqtt/0x00158d00042d62df (QoS 1)
2021-09-24T20:56:28: jeedom 1 zigbee2mqtt/0x00158d00042d62df
2021-09-24T20:56:28: Sending SUBACK to jeedom
2021-09-24T20:56:28: Received SUBSCRIBE from jeedom
2021-09-24T20:56:28: zigbee2mqtt/0x00158d0006594a29 (QoS 1)
2021-09-24T20:56:28: jeedom 1 zigbee2mqtt/0x00158d0006594a29
2021-09-24T20:56:28: Sending SUBACK to jeedom
2021-09-24T20:56:28: Received SUBSCRIBE from jeedom
2021-09-24T20:56:28: zigbee2mqtt/0x00158d00065947ee (QoS 1)
2021-09-24T20:56:28: jeedom 1 zigbee2mqtt/0x00158d00065947ee
2021-09-24T20:56:28: Sending SUBACK to jeedom
Log du broker :
[2021-09-24 21:12:06]INFO : Equipement zigbee2mqtt: subscribes to "zigbee2mqtt/#" with Qos=1
[2021-09-24 21:12:06]INFO : Subscribes to the API topic "jeedom/api"
[2021-09-24 21:12:06]INFO : Broker jmqtt_borker: subscribes to "jeedom/api" with Qos=1
[2021-09-24 21:12:18]INFO : démarre le client MQTT
[2021-09-24 21:12:18]INFO : Equipement Détecteur fumée cuisine: subscribes to "zigbee2mqtt/0x00158d000400fe09" with Qos=1
[2021-09-24 21:12:18]INFO : Equipement Détecteur fumée garage: subscribes to "zigbee2mqtt/0x00158d000400fdf3" with Qos=1
[2021-09-24 21:12:18]INFO : Equipement Détection eau 1 (55F7): subscribes to "zigbee2mqtt/0x00158d00028355f7" with Qos=1
[2021-09-24 21:12:18]INFO : Equipement Détection eau 2 (62DF): subscribes to "zigbee2mqtt/0x00158d00042d62df" with Qos=1
[2021-09-24 21:12:18]INFO : Equipement Module 2 relais chauffe-eau: subscribes to "zigbee2mqtt/0x00158d0006594a29" with Qos=1
[2021-09-24 21:12:18]INFO : Equipement Module 2 relais compresseur: subscribes to "zigbee2mqtt/0x00158d00065947ee" with Qos=1
[2021-09-24 21:12:18]INFO : Equipement Module 2 relais lumière garage: subscribes to "zigbee2mqtt/0x00158d0006584d78" with Qos=1
[2021-09-24 21:12:18]INFO : Equipement Mouvement garage: subscribes to "zigbee2mqtt/0x00158d00032c0e2d" with Qos=1
[2021-09-24 21:12:18]INFO : Equipement Mouvement SAM: subscribes to "zigbee2mqtt/0x00158d000302c7b0" with Qos=1
[2021-09-24 21:12:18]INFO : Equipement Porte entrée: subscribes to "zigbee2mqtt/0x00158d00031b15f4" with Qos=1
[2021-09-24 21:12:18]INFO : Equipement Porte terrasse: subscribes to "zigbee2mqtt/0x00158d00031b1659" with Qos=1
[2021-09-24 21:12:18]INFO : Equipement Porte véranda: subscribes to "zigbee2mqtt/0x00158d0003139f48" with Qos=1
[2021-09-24 21:12:18]INFO : Equipement Portillon garage: subscribes to "zigbee2mqtt/0x00158d0003139e53" with Qos=1
[2021-09-24 21:12:18]INFO : Equipement Prise guirlandes boules: subscribes to "zigbee2mqtt/0x60a423fffe62161d" with Qos=1
[2021-09-24 21:12:18]INFO : Equipement Télécommande 1 (BA88): subscribes to "zigbee2mqtt/0x847127fffe13ba88" with Qos=1
[2021-09-24 21:12:18]INFO : Equipement Télécommande 2 (41C2): subscribes to "zigbee2mqtt/0x847127fffe0a41c2" with Qos=1
[2021-09-24 21:12:18]INFO : Equipement Température - humidité 1 (0553): subscribes to "zigbee2mqtt/0x00158d0003230553" with Qos=1
[2021-09-24 21:12:18]INFO : Equipement Température - humidité 2 (0584): subscribes to "zigbee2mqtt/0x00158d0003230584" with Qos=1
[2021-09-24 21:12:18]INFO : Equipement Vibration fenêtre 5 véranda: subscribes to "zigbee2mqtt/0x00158d00031b1a13/#" with Qos=1
[2021-09-24 21:12:18]INFO : Equipement Vibration fenêtre terrasse: subscribes to "zigbee2mqtt/0x00158d0003130dce" with Qos=1
[2021-09-24 21:12:18]INFO : Equipement Vibration porte garage: subscribes to "zigbee2mqtt/0x00158d000312c729" with Qos=1
[2021-09-24 21:12:18]INFO : Equipement zigbee2mqtt: subscribes to "zigbee2mqtt/#" with Qos=1
[2021-09-24 21:12:18]INFO : API is disabled
Le fonctionnement du nouveau daemon jMQTT consiste en un daemon python et un daemon PHP. Le daemon python se connecte au daemon PHP en WebSocket. Dans le premier log, on voit que le daemon python s'est connécté, puis lors de l'envoi d'un message, la connection a en fait été fermé.
Il faut vérifier si un autre plugin utilise les ports 1025 ou 1026. En second, la liste des plugins utilisés m'interesse, car certains utilise le même librairie que nous pour la gestion du WebSocket (un possible conflit de version?). En troisième, existe-t-il sur cette machine un logiciel qui pourrait filtrer/couper les connexions TCP?
J'ai testé avec les ports 2025/2026, les mêmes erreurs sortent. Les ports 1025/1026 ne semblent pas utilisés par ailleurs. Liste des plugins installés (Core Jeedom v4.2.3), tous ne sont pas activés :
Il y a également zigbee2mqtt qui est installé sur la même machine et autrement que des paquets liés à l'installation de Jeedom et ces plugins.
Résultat de netstat -paunt
:
jeedom@jeedom:~$ netstat -paunt | grep 202
(Tous les processus ne peuvent être identifiés, les infos sur les processus
non possédés ne seront pas affichées, vous devez être root pour les voir toutes.)
tcp 0 0 127.0.0.1:2025 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:2026 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:47212 127.0.0.1:2025 TIME_WAIT -
tcp 0 0 127.0.0.1:47214 127.0.0.1:2025 TIME_WAIT -
tcp 0 0 127.0.0.1:47208 127.0.0.1:2025 TIME_WAIT -
tcp 0 0 127.0.0.1:47174 127.0.0.1:2025 TIME_WAIT -
tcp 0 0 127.0.0.1:47186 127.0.0.1:2025 TIME_WAIT -
tcp 0 0 127.0.0.1:47172 127.0.0.1:2025 TIME_WAIT -
tcp 0 0 127.0.0.1:47182 127.0.0.1:2025 TIME_WAIT -
tcp 0 0 127.0.0.1:47206 127.0.0.1:2025 TIME_WAIT -
tcp 0 0 127.0.0.1:47196 127.0.0.1:2025 TIME_WAIT -
tcp 0 0 127.0.0.1:47178 127.0.0.1:2025 TIME_WAIT -
tcp 0 0 127.0.0.1:47184 127.0.0.1:2025 TIME_WAIT -
tcp 0 0 127.0.0.1:47198 127.0.0.1:2025 TIME_WAIT -
tcp 0 0 127.0.0.1:47170 127.0.0.1:2025 TIME_WAIT -
tcp 0 0 127.0.0.1:47180 127.0.0.1:2025 TIME_WAIT -
tcp 0 0 127.0.0.1:47202 127.0.0.1:2025 TIME_WAIT -
tcp 0 0 127.0.0.1:47200 127.0.0.1:2025 TIME_WAIT -
tcp 0 0 127.0.0.1:47176 127.0.0.1:2025 TIME_WAIT -
tcp 0 0 127.0.0.1:47192 127.0.0.1:2025 TIME_WAIT -
tcp 0 0 127.0.0.1:47194 127.0.0.1:2025 TIME_WAIT -
tcp 0 0 127.0.0.1:47188 127.0.0.1:2025 TIME_WAIT -
tcp 0 0 127.0.0.1:47190 127.0.0.1:2025 TIME_WAIT -
tcp 0 0 127.0.0.1:47204 127.0.0.1:2025 TIME_WAIT -
tcp 0 0 127.0.0.1:47210 127.0.0.1:2025 TIME_WAIT -
Y a-t-il moyen de réinstaller une ancienne version du plugin ?
Oui, il faut installer la branche github old_daemon.
Parfait merci beaucoup. J'ai récupéré les fichiers dans une sauvegarde un peu plus tôt ce soir et ça fonctionne. Merci.
Désolé pour la short notice : si il y a retour arrière, l'équipement broker ne doit pas être modifié sous peine d'être perdu dans les limbes
Je ne touche plus à rien comme ça fonctionne présentement. Pas d'idée pour mon souci avec le nouveau démon sinon ?
Pour obtenir un log intéréssant, il faut : passer le plugin en mode debug puis redemarrer le daemon:
On obtiens ces 2 logs ("jMQTT_daemon" et "jMQTT") sur une install par défaut :
Arf, les 2 premiers log étaient bien en DEBUG déjà.
La ligne qui m'étonne est celle-ci : [2021-09-22 21:20:18,922]DEBUG : BrkId: 21 : Received a message through WebSocket
Le daemon python ne reçoit pas d'ordre par le WebSocket.
Le seul cas où un message est envoyé à travers le WebSocket (du PHP vers le Python), c'est lorsqu'il y a un problème avec la clef API et la connection est fermée dans la foulée :
Coté Configuration - API, est-ce bien dans ce mode? :
J'ai amélioré le log de la version beta pour savoir si le problème viens de là. S'il est possible de refaire un test ca m'interesse.
J'essaierai ça ce soir. L'accès API était sur "Liste blanche" uniquement pour ce plugin...
Je suis passé à la version beta via mon compte Market. Le problème semble résolu, certainement à cause de la liste blanche dans l'accès API !?! En revanche, je n'ai plus de nouvelle ligne dans les logs JMQTT et JMQTT_Daemon depuis que je suis repassé à la version old_daemon j'ai l'impression. Le log du broker vit bien par contre.
Oui, je suis persuadé que cela venait de la configuration de l'"Accès API". Pour les logs, je n'ai pas compris. Le problème n'est pas présent avec la beta/stable, c'est bien ça? S'il n'y a plus de problème avec la beta, il n'y en a donc plus avec la stable non plus
Le problème est-il résolu donc?
Pour les logs j'ai l'impression que plus rien de s'y enregistre mais je revérifierai. Effectivement problème résolu tout fonctionne à merveille, merci pour votre aide ! 😀
la version passera en stable prochainement?
Oui mais le problème venait de la configuration de l'API key du plugin jMQTT. La beta ne fait qu'améliorer le log du daemon PHP pour le moment. Il faut qu'on reflechisse à une solution palliative si c eproblème est rencontré régulièrement.
Un message d'information sur la page de configuration du plugin peut être une aide.
Je fais suite à mon problème d'hier (#103) qui semble avoir un peu évolué à force d'arrêts / redémarrages / réinstallations plugins-dépendances.
Le broker à toujours pour statut : NOK Le Client MQTT est arrêté
Le démon est OK mais avec les logs suivants :