MàJ Merossync encore des problèmes

Hello, màj faite, je vois encore quelques trucs dans le http.error :

sh: 1: /var/www/html/plugins/MerosSync/core/class/../../resources/.venvs/merosssync/bin/pip: not found
sh: 1: /var/www/html/plugins/MerosSync/core/class/../../resources/.venvs/merosssync/bin/pip: not found
sh: 1: /var/www/html/plugins/MerosSync/core/class/../../resources/.venvs/merosssync/bin/pip: not found
sh: 1: /var/www/html/plugins/MerosSync/core/class/../../resources/.venvs/merosssync/bin/pip: not found
sh: 1: /var/www/html/plugins/MerosSync/core/class/../../resources/.venvs/merosssync/bin/pip: not found
sh: 1: /var/www/html/plugins/MerosSync/core/class/../../resources/.venvs/merosssync/bin/pip: not found
sh: 1: /var/www/html/plugins/MerosSync/core/class/../../resources/.venvs/merosssync/bin/pip: not found
warning: commands will be executed using /bin/sh

Je note aussi des problèmes quand on active/désactiver la gestion automatique du daemon et que ça prend beaucoup de temps pour le relancer voire ça ne se termine jamais et ça tourne :
meros

Enfin dans le log de sync en mode debug, je me demande si c’est bien normal qu’il redécouvre à chaque minute le device ?
(j’ai coupé des fins de ligne)

[2025-01-16 17:44:05] INFO  : Synchronisation des équipements depuis le Cloud Meross
[2025-01-16 17:44:05] DEBUG  : callMeross syncMeross
[2025-01-16 17:44:05] DEBUG  : Socket unix:///tmp/jeedom/MerosSync/daemon.sock
[2025-01-16 17:44:05] DEBUG [DemonPython] : Message received in socket
[2025-01-16 17:44:05] DEBUG [DemonPython] : {'action': 'syncMeross', 'args': ''}
[2025-01-16 17:44:05] DEBUG [DemonPython] : syncMeross called
[2025-01-16 17:44:05] DEBUG [DemonPython] : aSyncMeross called[2025-01-16 17:44:05][DEBUG][DemonPython] : Connecting with user ***@gmail.com - **** => ***
[2025-01-16 17:44:05][DEBUG][meross_iot.http_api] : Logging in with email: ***@gmail.com, password: XXXXX
[2025-01-16 17:44:05][DEBUG][meross_iot.http_api] : Performing HTTP request against https://iotx-eu.meross.com/v1/Auth/signIn
[2025-01-16 17:44:05][DEBUG][meross_iot.http_api] : Response Status Code: 200
[2025-01-16 17:44:05][DEBUG][meross_iot.http_api] : Performing HTTP request against https://iotx-eu.meross.com/v1/log/user
[2025-01-16 17:44:06][DEBUG][meross_iot.http_api] : Response Status Code: 200
[2025-01-16 17:44:06][DEBUG][meross_iot.http_api] : Login successful!
[2025-01-16 17:44:06][DEBUG][DemonPython] : Connected with user ***@gmail.com
[2025-01-16 17:44:06][INFO][meross_iot.manager] : 
------- Triggering Manager Discovery, filter_device: [None] -------
[2025-01-16 17:44:06][DEBUG][meross_iot.http_api] : Performing HTTP request against https://iotx-eu.meross.com/v1/Device/devList
[2025-01-16 17:44:06][DEBUG][meross_iot.http_api] : Response Status Code: 200
[2025-01-16 17:44:06][DEBUG][meross_iot.manager] : The following devices were already known to me: {}
[2025-01-16 17:44:06][DEBUG][meross_iot.manager] : The following devices are new to me: [{"uuid": "***", "online_status": "ONLINE", "dev_name": "Matelas"
[2025-01-16 17:44:06][DEBUG][meross_iot.manager] : Sending GET-Namespace.SYSTEM_ABILITY command via MQTT to *** via mqtt-eu-4.meross.com:443
[2025-01-16 17:44:06][INFO][meross_iot.manager] : Allocating new mqtt client for mqtt-eu-4.meross.com:443...
[2025-01-16 17:44:06][DEBUG][meross_iot.manager] : MQTT client connecting to mqtt-eu-4.meross.com:443
[2025-01-16 17:44:06][DEBUG][meross_iot.manager] : Connected with result code {'session present': 0}
[2025-01-16 17:44:06][DEBUG][meross_iot.manager] : Subscribing to topics...
[2025-01-16 17:44:06][DEBUG][meross_iot.manager] : Successfully subscribed to topics.
[2025-01-16 17:44:06][INFO][meross_iot.manager] : Subscribed to topics, scheduling state update for already known devices.
[2025-01-16 17:44:06][INFO][meross_iot.manager] : 
------- Triggering Manager Discovery, filter_device: [None] -------
[2025-01-16 17:44:06][DEBUG][meross_iot.http_api] : Performing HTTP request against https://iotx-eu.meross.com/v1/Device/devList
[2025-01-16 17:44:07][DEBUG][meross_iot.manager] : Received message from topic /app/3428666-***/subscribe
[2025-01-16 17:44:07][DEBUG][meross_iot.manager] : Message signature OK
[2025-01-16 17:44:07][DEBUG][meross_iot.manager] : This message is an ACK to a command this client has send.
[2025-01-16 17:44:07][DEBUG][meross_iot.manager] : Found a pending command waiting for response message
[2025-01-16 17:44:07][DEBUG][meross_iot.device_factory] : Building managed device for Matelas (***). Reported abilities: {'Appliance.Config.Key': {},
[2025-01-16 17:44:07][DEBUG][meross_iot.manager] : Adding device Matelas (#BASE:***) to registry.
[2025-01-16 17:44:07][DEBUG][meross_iot.manager] : Updating 0 known devices form HTTPINFO and fetching data from 1 newly discovered devices...
[2025-01-16 17:44:07][INFO][meross_iot.manager] : Fetch and update done
[2025-01-16 17:44:07][INFO][meross_iot.manager] : 
------- Manager Discovery ended -------
[2025-01-16 17:44:07][DEBUG][DemonPython] : aSyncMeross connected
[2025-01-16 17:44:07][INFO][meross_iot.manager] : 
------- Triggering Manager Discovery, filter_device: [None] -------
[2025-01-16 17:44:07][DEBUG][meross_iot.http_api] : Performing HTTP request against https://iotx-eu.meross.com/v1/Device/devList
[2025-01-16 17:44:07][DEBUG][meross_iot.http_api] : Response Status Code: 200
[2025-01-16 17:44:07][DEBUG][meross_iot.manager] : The following devices were already known to me: {{"uuid": "***", "online_status": "ONLINE", "dev_name": "Matelas",
[2025-01-16 17:44:07][DEBUG][meross_iot.manager] : The following devices are new to me: []
[2025-01-16 17:44:07][DEBUG][meross_iot.manager] : Updating 1 known devices form HTTPINFO and fetching data from 0 newly discovered devices...
[2025-01-16 17:44:07][INFO][meross_iot.manager] : Fetch and update done
[2025-01-16 17:44:07][INFO][meross_iot.manager] : 
------- Manager Discovery ended -------
[2025-01-16 17:44:07][WARNING][meross_iot.manager] : Found a new device Matelas (mss310, HW 8.0.0, 
[2025-01-16 17:44:07][DEBUG][meross_iot.http_api] : Response Status Code: 200
[2025-01-16 17:44:07][DEBUG][meross_iot.manager] : The following devices were already known to me: {{"uuid": "***", "online_status": "ONLINE", "dev_name": "Matelas", 
[2025-01-16 17:44:07][DEBUG][meross_iot.manager] : The following devices are new to me: []
[2025-01-16 17:44:07][DEBUG][meross_iot.manager] : Updating 1 known devices form HTTPINFO and fetching data from 0 newly discovered devices...
[2025-01-16 17:44:07][INFO][meross_iot.manager] : Fetch and update done
[2025-01-16 17:44:07][INFO][meross_iot.manager] : 
------- Manager Discovery ended -------
[2025-01-16 17:44:07][DEBUG][DemonPython] : aSyncMeross - 1 devices found
[2025-01-16 17:44:07][DEBUG][DemonPython] : aSyncMeross - Matelas(mss310):OnlineStatus.ONLINE
[2025-01-16 17:44:07][DEBUG][meross_iot.manager] : Sending GET-Namespace.SYSTEM_ALL command via MQTT to *** via mqtt-eu-4.meross.com:443
[2025-01-16 17:44:07][DEBUG][meross_iot.manager] : MQTT Client for mqtt-eu-4.meross.com:443 already available.
[2025-01-16 17:44:07][DEBUG][meross_iot.manager] : Received message from topic /app/***/subscribe: b'{"header":{"messageId":"d02e55fd04
[2025-01-16 17:44:07][DEBUG][meross_iot.manager] : Message signature OK
[2025-01-16 17:44:07][DEBUG][meross_iot.manager] : This message is an ACK to a command this client has send.
[2025-01-16 17:44:07][DEBUG][meross_iot.manager] : Found a pending command waiting for response message
[2025-01-16 17:44:07][DEBUG][meross_iot.controller.mixins.system] : Handling mss310:*** mixin data update.
[2025-01-16 17:44:07][DEBUG][meross_iot.controller.mixins.toggle] : Handling mss310:*** mixin data update.
[2025-01-16 17:44:07][DEBUG][meross_iot.manager] : Sending GET-Namespace.SYSTEM_RUNTIME command via MQTT to *** via mqtt-eu-4.meross.com:443
[2025-01-16 17:44:07][DEBUG][meross_iot.manager] : MQTT Client for mqtt-eu-4.meross.com:443 already available.
[2025-01-16 17:44:08][DEBUG][meross_iot.manager] : Received message from topic /app/***/subscribe: 
[2025-01-16 17:44:08][DEBUG][meross_iot.manager] : Message signature OK
[2025-01-16 17:44:08][DEBUG][meross_iot.manager] : This message is an ACK to a command this client has send.
[2025-01-16 17:44:08][DEBUG][meross_iot.manager] : Found a pending command waiting for response message
[2025-01-16 17:44:08][DEBUG][DemonPython] : ElectricityMixin
[2025-01-16 17:44:08][DEBUG][meross_iot.manager] : Sending GET-Namespace.CONTROL_ELECTRICITY command via MQTT 
[2025-01-16 17:44:08][DEBUG][meross_iot.manager] : MQTT Client for mqtt-eu-4.meross.com:443 already available.
[2025-01-16 17:44:08][DEBUG][meross_iot.manager] : Received message from topic /app/e27ea3cbb8e3b
[2025-01-16 17:44:08][DEBUG][meross_iot.manager] : Message signature OK
[2025-01-16 17:44:08][DEBUG][meross_iot.manager] : This message is an ACK to a command this client has send.
[2025-01-16 17:44:08][DEBUG][meross_iot.manager] : Found a pending command waiting for response message
[2025-01-16 17:44:08][DEBUG][DemonPython] : ConsumptionXMixin
[2025-01-16 17:44:08][DEBUG][meross_iot.manager] : Sending GET-Namespace.CONTROL_CONSUMPTIONX command via MQTT
[2025-01-16 17:44:08][DEBUG][meross_iot.manager] : MQTT Client for mqtt-eu-4.meross.com:443 already available.
[2025-01-16 17:44:08][DEBUG][meross_iot.manager] : Received message from topic /app/-
[2025-01-16 17:44:08][DEBUG][meross_iot.manager] : Message signature OK
[2025-01-16 17:44:08][DEBUG][meross_iot.manager] : This message is an ACK to a command this client has send.
[2025-01-16 17:44:08][DEBUG][meross_iot.manager] : Found a pending command waiting for response message
[2025-01-16 17:44:08][DEBUG][DemonPython] : [{"date": "2024-12-31 00:00:00", "total_consumption_kwh": 0.066}, {"date": "2025-01-01 00:00:00", "total_consumption_kwh": 0.16},
[2025-01-16 17:44:08][DEBUG][DemonPython] : ToggleXMixin
[2025-01-16 17:44:08][DEBUG][DemonPython] : Close connection
[2025-01-16 17:44:08][INFO][meross_iot.manager] : Manager stop requested.
[2025-01-16 17:44:08][DEBUG][meross_iot.manager] : Canceling pending futures...
[2025-01-16 17:44:08][DEBUG][meross_iot.manager] : Disconnecting MQTT clients...
[2025-01-16 17:44:08][DEBUG][meross_iot.http_api] : Logging out. Invalidating cached credentials {"token": "***", "key": "***", "user_id": "***",
[2025-01-16 17:44:08][INFO][meross_iot.manager] : Disconnection detected. Reason: 0

[2025-01-16 17:44:08][DEBUG][meross_iot.http_api] : Performing HTTP request against https://iotx-eu.meross.com/v1/Profile/logout, headers: 
[2025-01-16 17:44:08][DEBUG][meross_iot.controller.mixins.system] : OnlineMixin handling push notification for namespace Namespace.SYSTEM_ONLINE
[2025-01-16 17:44:08][DEBUG][meross_iot.controller.device] : MerossBaseDevice Matelas handling notification Namespace.SYSTEM_ONLINE
[2025-01-16 17:44:09][DEBUG][meross_iot.http_api] : Response Status Code: 200
[2025-01-16 17:44:09][INFO][meross_iot.http_api] : Logout succeeded.
[2025-01-16 17:44:09][DEBUG][DemonPython] : {'result': [{'name': 'Matelas', 'uuid': '***', 'famille': 'mss310:8
[2025-01-16 17:44:09][DEBUG] : result callMeross Array ([result] => Array([0] => Array([name] => Matelas  
[2025-01-16 17:44:09][INFO] : syncMeross: Mise à jour de Matelas - ***
[2025-01-16 17:44:09][DEBUG] : updateEqLogicCmds: Update eqLogic commands
[2025-01-16 17:44:09][DEBUG] : syncMeross: - Famille mss310:8.0.0:6.3.23
[2025-01-16 17:44:09][DEBUG] : syncMeross: - Update cmd=onoff_0
[2025-01-16 17:44:09][DEBUG] : syncMeross: - Update cmd=off_0
[2025-01-16 17:44:09][DEBUG] : syncMeross: - Update cmd=on_0
[2025-01-16 17:44:09][DEBUG] : syncMeross: - Update cmd=refresh
[2025-01-16 17:44:09][DEBUG] : syncMeross: - Update cmd=power
[2025-01-16 17:44:09][DEBUG] : syncMeross: - Update cmd=current
[2025-01-16 17:44:09][DEBUG] : syncMeross: - Update cmd=tension
[2025-01-16 17:44:09][DEBUG] : syncMeross: - Update cmd=conso_totale
[2025-01-16 17:44:09][DEBUG] : updateEqLogicCmdVal: Update eqLogic informations Completed
[2025-01-16 17:44:09][DEBUG] : updateEqLogicVals: Update eqLogic values
[2025-01-16 17:44:09][DEBUG] : updateEqLogicVals:
[2025-01-16 17:44:09][DEBUG] : syncMeross: - Mise à jour onoff_0 : 0
[2025-01-16 17:44:09][DEBUG] : syncMeross: En ligne : 1 - ***
[2025-01-16 17:44:09][DEBUG] : Check offline components
[2025-01-16 17:44:09][DEBUG] : ID *** - MerosSync - Matelas
[2025-01-16 17:44:09][INFO] : syncMeross: synchronisation terminée.

Je m’étonne de la ligne 17:44:06 : The following devices are new to me « Matelas » alors que chaque minute d’avant il l’avait déjà en base.
Forcément il refait sa base chaque minute et dans le déroulé il réinterroge une 2ème fois iotx-eu.meross.com/v1/Device/devList (à 17:44:06 et 07).

Il n’y a pas un souci ?

Un autre truc qui vient d’arriver :

6400|------- Triggering Manager Discovery, filter_device: [None] -------
6401|[2025-01-16 19:03:05] DEBUG [meross_iot.http_api] : Performing HTTP request against https://iotx-eu.meross.com/v1/Device/devList, headers: {'AppVersion':/
6402|[2025-01-16 19:03:05] DEBUG [meross_iot.http_api] : Response Status Code: 200

6403|[2025-01-16 19:03:05] DEBUG [meross_iot.manager] : The following devices were already known to me: {}
6404|[2025-01-16 19:03:05] DEBUG [meross_iot.manager] : The following devices are new to me: []
6405|[2025-01-16 19:03:05] DEBUG [meross_iot.manager] : Updating 0 known devices form HTTPINFO and fetching data from 0 newly discovered devices...

6406|[2025-01-16 19:03:05] INFO [meross_iot.manager] : Fetch and update done
6407|[2025-01-16 19:03:05] INFO [meross_iot.manager] :
6408|------- Manager Discovery ended -------
6409|[2025-01-16 19:03:05] DEBUG [DemonPython] : aSyncMeross connected
6410|[2025-01-16 19:03:05] INFO [meross_iot.manager] :
6411|------- Triggering Manager Discovery, filter_device: [None] -------
6412|[2025-01-16 19:03:05] DEBUG [meross_iot.http_api] : Performing HTTP request against https://iotx-eu.meross.com/v1/Device/devList/
6413|[2025-01-16 19:03:06] DEBUG [meross_iot.http_api] : Response Status Code: 200
6414|[2025-01-16 19:03:06] DEBUG [meross_iot.manager] : The following devices were already known to me: {}
6415|[2025-01-16 19:03:06] DEBUG [meross_iot.manager] : The following devices are new to me: []
6416|[2025-01-16 19:03:06] DEBUG [meross_iot.manager] : Updating 0 known devices form HTTPINFO and fetching data from 0 newly discovered devices...
6417|[2025-01-16 19:03:06] INFO [meross_iot.manager] : Fetch and update done
6418|[2025-01-16 19:03:06] INFO [meross_iot.manager] :
6419|------- Manager Discovery ended -------
6420|[2025-01-16 19:03:06] DEBUG [DemonPython] : aSyncMeross - 0 devices found
6421|[2025-01-16 19:03:06] DEBUG [DemonPython] : Close connection
6422|[2025-01-16 19:03:06] INFO [meross_iot.manager] : Manager stop requested.
6423|[2025-01-16 19:03:06] DEBUG [meross_iot.manager] : Canceling pending futures...
6424|[2025-01-16 19:03:06] DEBUG [meross_iot.manager] : Disconnecting MQTT clients...
6425|[2025-01-16 19:03:06] DEBUG [meross_iot.http_api] : Logging out. Invalidating cached credentials {"token": "d7/
6426|[2025-01-16 19:03:06] DEBUG [meross_iot.http_api] : Performing HTTP request against https://iotx-eu.meross.com/v1/Profile/logout, headers: {'AppVersion/
6427|[2025-01-16 19:03:06] DEBUG [meross_iot.http_api] : Response Status Code: 200
6428|[2025-01-16 19:03:06] INFO [meross_iot.http_api] : Logout succeeded.
6429|[2025-01-16 19:03:06] DEBUG [DemonPython] : {'result': [], 'success': True}

6430|[2025-01-16 19:03:06] ERROR  : Aucun équipement connecté ou problème de connexion. Merci de consulter la log.

6431|[2025-01-16 19:04:04] DEBUG [DemonPython] : Message received in socket
6432|[2025-01-16 19:04:04] DEBUG [DemonPython] : {'action': 'syncMeross', 'args': ''}
6433|[2025-01-16 19:04:04] DEBUG [DemonPython] : syncMeross called
6434|[2025-01-16 19:04:04] DEBUG [DemonPython] : aSyncMeross called

Bonjour,

Pour répondre à cette première partie :

C’est normal car lors de la vérification des dépendances je lance une commande pip list qui échoue si python n’est pas installé dans l’environnement virtuel. Une fois les dépendances installés il n’y a plus de problèmes.

Concernant ceci : la commande pip list est assez longue (sûrement lié à cet environnement virtuel qu’il faut démarrer je suppose) et le lancement du démon prend bien une minute pour que tout soit vérifié.

Ceci est plutôt normal car j’utilise un plugin python (merossiot) qui peut être toujours en route et donc garder en mémoire les devices. Comme je le démarre et l’arrête à chaque fois il perd cette mémoire court terme. Aussi je crois qu’il liste les device quand il se connecte et quand je demande le rafraîchissement du device. Ce n’est pas optimisé je peux le convenir mais je n’ai pas la main sur ce code.

Pour finir sur ça je rencontre moi aussi des erreurs de ce type sans pour autant avoir identifié la cause. ça arrive une fois de manière assez rare et jusque là ne m’a jamais géné. Sûrement les API Meross qui ne sont pas 100% UP.

Attention tout de même à ne pas lancer la synchronisation trop régulièrement au risque de se faire ban de meross.

Bonne journée,
Jérôme

Euh là je parle de 5mn et ce n’était toujours pas fini.

Euh ben peut-être vaut-il mieux ne pas l’arrêter ? Parce que là chaque minute il interroge 2x le devicelist et si en plus tu dis qu’il ne faut pas trop faire de requêtes sur merossiot alors… A voir.

Sur un reboot j’ai ça aussi :

[2025-01-17 00:05:53] ERROR  : Impossible de stopper le démon meross, tuons le

Et enfin est-ce normal qu’il soit présent 3 fois dans le Memory usage ?

 SIZE     PID USER     COMMAND
564316    657 mysql    /usr/sbin/mariadbd
51584    1361 www-data /var/www/html/plugins/MerosSync/resources/.venvs/merosssync/bin/python3 /var/www/html/plugins/MerosSync/resources/MerossIOTd/MerossIOTd.py --muser ***@gmail.com --mpswd *** --callback http://127.0.0.1:80/plugins/MerosSync/core/php/jeeMerosSync.php --apikey *** --loglevel error --pid /tmp/jeedom/MerosSync/daemon.pid --errorfile /tmp/jeedom/MerosSync/errordaemon.pid --socket /tmp/jeedom/MerosSync/daemon.sock --logfile /var/www/html/core/class/../../log/MerosSync --versionFile /var/www/html/plugins/MerosSync/resources/meross-iot_version.txt
51568   35376 www-data /var/www/html/plugins/MerosSync/resources/.venvs/merosssync/bin/python3 /var/www/html/plugins/MerosSync/resources/MerossIOTd/MerossIOTd.py --muser ***@gmail.com --mpswd *** --callback http://127.0.0.1:80/plugins/MerosSync/core/php/jeeMerosSync.php --apikey *** --loglevel info --pid /tmp/jeedom/MerosSync/daemon.pid --errorfile /tmp/jeedom/MerosSync/errordaemon.pid --socket /tmp/jeedom/MerosSync/daemon.sock --logfile /var/www/html/core/class/../../log/MerosSync --versionFile /var/www/html/plugins/MerosSync/resources/meross-iot_version.txt
49608   33389 www-data /var/www/html/plugins/MerosSync/resources/.venvs/merosssync/bin/python3 /var/www/html/plugins/MerosSync/resources/MerossIOTd/MerossIOTd.py --muser ***@gmail.com --mpswd *** --callback http://127.0.0.1:80/plugins/MerosSync/core/php/jeeMerosSync.php --apikey *** --loglevel info --pid /tmp/jeedom/MerosSync/daemon.pid --errorfile /tmp/jeedom/MerosSync/errordaemon.pid --socket /tmp/jeedom/MerosSync/daemon.sock --logfile /var/www/html/core/class/../../log/MerosSync --versionFile /var/www/html/plugins/MerosSync/resources/meross-iot_version.txt

De fait, il prend quand même 12% de mémoire à lui seul, CPU usage :

PID   PPID %MEM %CPU CMD
35376    1  4.9  1.0 /var/www/html/plugins/MerosSync/resources/.venvs/merosssync/bin/python3 /var/www/html/plugins/MerosSync/resources/MerossIOTd/MerossIOTd.py /
33389    1  4.7  0.4 /var/www/html/plugins/MerosSync/resources/.venvs/merosssync/bin/python3 /var/www/html/plugins/MerosSync/resources/MerossIOTd/MerossIOTd.py /
1361     1  2.5  0.3 /var/www/html/plugins/MerosSync/resources/.venvs/merosssync/bin/python3 /var/www/html/plugins/MerosSync/resources/MerossIOTd/MerossIOTd.py /

Bonjour,

Effectivement il y a un soucis. Chez moi il est bien présent qu’une seule fois avec la gestion automatique.

Donc tu as dû faire une manipulation qui a démarré 3 fois le démon .

J’aimerai donc bien savoir ce que tu as fait pour arriver à reproduire de mon côté.

Merci
Jérôme

Le fait de lancement toutes les minutes et le délai de 5 minutes au démarrage doit être lié au fait que tu aies 3 démon en même temps

Alors là bonne question ! Je n’ai rien fait de spécial, quand j’avais le message « Aucun équipement connecté » il a dû m’arriver de redémarrer le daemon, j’ai aussi tenté de désactiver la gestion automatique de démarrer à la main et de remettre la gestion auto. Mais rien d’autre.
J’ai supprimer le plugin et réinstallé et pour l’instant je n’en ai plus qu’un dans le cpu usage.

Ok je me réponds, c’est bien ça : le fait de relancer le daemon alors qu’il est en route, il n’y a pas de stop daemon préventif dans le fichier class et de fait on peut avoir 2, 3, 10 fois le plugins en mémoire.
J’ai donc réécrit une partie des fonctions start et stop, si vous voulez les changer (remplacer les 2 fonctions) c’est dans le fichier html/plugins/MerosSync/core/class/MerosSync.class.php

    public static function deamon_start() {
		self::deamon_stop();
        $deamon_info = self::deamon_info();
        if ($deamon_info['launchable'] != 'ok') {
            throw new Exception(__('Veuillez vérifier la configuration', __FILE__));
        }
        $user = config::byKey('MerossUSR', 'MerosSync');
        $pswd = addslashes(config::byKey('MerossPWD', 'MerosSync'));

        $MerosSync_path = realpath(dirname(__FILE__) . '/../../resources');
        $callback = network::getNetworkAccess('internal', 'proto:127.0.0.1:port:comp') . '/plugins/MerosSync/core/php/jeeMerosSync.php';

        $cmd = $MerosSync_path.'/.venvs/merosssync/bin/python3 ' . $MerosSync_path . '/MerossIOTd/MerossIOTd.py';
        $cmd.= ' --muser "'.$user.'"';
        $cmd.= ' --mpswd "'.$pswd.'"';
        $cmd.= ' --callback '.$callback;
        $cmd.= ' --apikey '.jeedom::getApiKey('MerosSync');
        $cmd.= ' --loglevel '.log::convertLogLevel(log::getLogLevel('MerosSync'));
        $cmd.= ' --pid '.jeedom::getTmpFolder('MerosSync') . '/daemon.pid';
        $cmd.= ' --errorfile '.jeedom::getTmpFolder('MerosSync') . '/errordaemon.pid';
        $cmd.= ' --socket '.jeedom::getTmpFolder('MerosSync') . '/daemon.sock';
        $cmd.= ' --logfile '.log::getPathToLog('MerosSync');
        $cmd.= ' --versionFile '.$MerosSync_path.'/meross-iot_version.txt';

        $log = str_replace($pswd, 'xxx', str_replace($user, 'xxx', $cmd));
        log::add('MerosSync','info',__('Lancement démon meross :', __FILE__).' '.$log);
        $result = exec($cmd . ' >> ' . log::getPathToLog('MerosSync') . ' 2>&1 &');
        $i = 0;
        while ($i < 30) {
            $deamon_info = self::deamon_info();
            if ($deamon_info['state'] == 'ok') {
                break;
            }
            sleep(1);
            $i++;
        }
        if ($i >= 30) {
            log::add('MerosSync', 'error', 'Le démon meross a mis trop de temps à démarrer, vérifiez les logs', 'unableStartDeamon');
            return false;
        }
        message::removeAll('MerosSync', 'unableStartDeamon');
        return true;
    }
 
 public static function deamon_stop() {
        $pid_file = jeedom::getTmpFolder('MerosSync') . '/daemon.pid';
        if (file_exists($pid_file)) {
            $pid = intval(trim(file_get_contents($pid_file)));
            system::kill($pid);
        }
        system::kill('MerossIOTd.py');
		system::fuserk(config::byKey('socketport', 'MerosSync'));
    }

Merci @Pax24
C’est mis à jour en beta

Ce sujet a été automatiquement fermé après 24 heures suivant le dernier commentaire. Aucune réponse n’est permise dorénavant.