Problème de démon Gardena qui ne se lance pas

Bonjour à tous,

J’ai depuis peu un problème avec le démon du plugin Gardena qui ne se lance pas. J’ai réinstallé les dépendances, essayé la beta, mais le problème reste présent…

Mon Jeedom tourne sur Proxmox et il est à jour. l’OS est Debian 11.

Le log Gardena :

[2024-09-25 22:19:25] DEBUG  : Lancement de : /var/www/html/core/class/../../core/php/jeePlugin.php  plugin_id=gardena function=pre_update callInstallFunction=1
[2024-09-25 22:19:28] INFO  : Début d'activation du plugin
[2024-09-25 22:19:29] INFO  : Info sur le démon : {"log":"gardena","state":"nok","launchable":"ok","launchable_message":"Gestion automatique d\u00e9sactiv\u00e9e","auto":"0","last_launch":"2024-09-25 22:17:31"}
[2024-09-25 22:19:30] DEBUG  : Lancement de : /var/www/html/core/class/../../core/php/jeePlugin.php  plugin_id=gardena function=update callInstallFunction=1
[2024-09-25 22:19:32] INFO  : Lancement démon
[2024-09-25 22:19:33] DEBUG  : test from gardena daemon
[2024-09-25 22:20:20] INFO  : Lancement démon
[2024-09-25 22:20:21] DEBUG  : test from gardena daemon

Le log Daemon

[2024-09-25 22:20:21] INFO  : Starting daemon with log level: debug
[2024-09-25 22:20:21] DEBUG  : Writing PID 2617832 to /tmp/jeedom/gardena/daemon.pid
[2024-09-25 22:20:21] INFO  : Listening on 127.0.0.1:55070
[2024-09-25 22:20:21] DEBUG  : load_ssl_context verify=True cert=None trust_env=True http2=False
[2024-09-25 22:20:21] DEBUG  : load_verify_locations cafile='/var/www/html/plugins/gardena/resources/venv/lib/python3.9/site-packages/certifi/cacert.pem'
[2024-09-25 22:20:26]WARNING : Exception occurred when calling on_start_cb:
[2024-09-25 22:20:26] INFO  : Listening cancelled
[2024-09-25 22:20:26] INFO  : Shutdown
[2024-09-25 22:20:26] DEBUG  : Removing PID file /tmp/jeedom/gardena/daemon.pid
[2024-09-25 22:20:26] DEBUG  : Exit 0

Le log Update

======================================================================
== 25/09/2024 21:55:45 == Dependencies installation for gardena
======================================================================
[  5% ] : Clean apt...
[  9% ] : Clean apt : [  OK  ]
[ 10% ] : Update apt...
[ 19% ] : Update apt : [  OK  ]
[ 20% ] : Init python3 & prerequisites...
[ 31% ] : Init python3 & prerequisites : [  OK  ]
[ 32% ] : Init PyEnv...
** PyEnv not required: 3.9.2 >= 3.9 **
** python3 path: python3 **
[ 43% ] : Init PyEnv : [  OK  ]
[ 44% ] : Setting up virtual environment...
** Version of python in VENV: Python 3.9.2
[ 79% ] : Setting up virtual environment : [  OK  ]
[ 80% ] : Install the required python packages...
[ 89% ] : Install the required python packages : [  OK  ]
[ 90% ] : Summary of installed packages...
aiohttp==3.9.5
aiosignal==1.3.1
anyio==4.4.0
async-timeout==4.0.3
attrs==23.2.0
Authlib==1.3.2
certifi==2024.7.4
cffi==1.16.0
cryptography==42.0.8
exceptiongroup==1.2.1
frozenlist==1.4.1
h11==0.14.0
httpcore==1.0.5
httpx==0.27.2
idna==3.7
jeedomdaemon==0.11.2
multidict==6.0.5
oauthlib==3.2.2
pkg_resources==0.0.0
pycparser==2.22
sniffio==1.3.1
typing_extensions==4.12.2
websockets==13.1
yarl==1.9.4
[ 99% ] : Summary of installed packages : [  OK  ]
[100% ] : Finished !
======================================================================
== OK == Installation Successful
======================================================================

Avez-vous une idée de l’origine du problème et de comment le résoudre ?

Merci pour votre aide !

Bonjour,

Il manque la page santé jeedom.

Bonjour,

Désolé pour l’oubli ! Voilà la capture :

Entre temps j’ai réussi à reproduire un peu par hasard mais le problème c’est que ce n’est pas systématique.
Lorsque j’ai réussi à reproduire c’est dû à un problème de droits sur les fichiers, juste après une nouvelle installation des dépendances.
Et en cliquant sur « Rétablissement des droits des dossiers et fichiers » alors le démon démarrait

Mais donc:

  • si je supprime tout et que je recommence, souvent cela fonctionne, parfois pas (et systématiquement en rétablissant les droits c’est ok)
  • en principe ceci est fait tous les jours par jeedom donc si c’était un « vieux » problème, il aurait été fixé tout seul sur votre installation.

Ceci dit, ca ne coute rien d’essayer

Je viens d’essayer et même problème : le démon passe au vert puis au rouge quelques secondes après

Effacez le dossier /resources/venv via l’éditeur de fichier jeedom et relancez les dépendances

Il me faudra le log des dépendances et le log du démon ensuite.

Voilà le log après la suppression du dossier et la réinstallation des dépendances ( le problème reste le même ):

Log des dépendances :


======================================================================
== 26/09/2024 12:27:30 == Dependencies installation for gardena
======================================================================
[  5% ] : Clean apt...
[  9% ] : Clean apt : [  OK  ]
[ 10% ] : Update apt...
[ 19% ] : Update apt : [  OK  ]
[ 20% ] : Init python3 & prerequisites...
[ 29% ] : Init python3 & prerequisites : [  OK  ]
[ 30% ] : Init PyEnv...
** PyEnv not required: 3.9.2 >= 3.9 **
** python3 path: python3 **
[ 39% ] : Init PyEnv : [  OK  ]
[ 40% ] : Setting up virtual environment...
** Version of python in VENV: Python 3.9.2
[ 69% ] : Setting up virtual environment : [  OK  ]
[ 70% ] : Install the required python packages...
[ 79% ] : Install the required python packages : [  OK  ]
[ 80% ] : Restoring folders and files rights...
[ 89% ] : Restoring folders and files rights : [  OK  ]
[ 90% ] : Summary of installed packages...
aiohappyeyeballs==2.4.0
aiohttp==3.10.6
aiosignal==1.3.1
anyio==4.6.0
async-timeout==4.0.3
attrs==24.2.0
Authlib==1.3.2
certifi==2024.8.30
cffi==1.17.1
cryptography==43.0.1
exceptiongroup==1.2.2
frozenlist==1.4.1
h11==0.14.0
httpcore==1.0.5
httpx==0.27.2
idna==3.10
jeedomdaemon==0.11.2
multidict==6.1.0
oauthlib==3.2.2
pkg_resources==0.0.0
pycparser==2.22
sniffio==1.3.1
typing_extensions==4.12.2
websockets==13.1
yarl==1.12.1
[ 99% ] : Summary of installed packages : [  OK  ]
[100% ] : Finished !

Log du démon :


[2024-09-26 12:31:37] INFO  : Starting daemon with log level: debug
[2024-09-26 12:31:37] DEBUG  : Writing PID 2982947 to /tmp/jeedom/gardena/daemon.pid
[2024-09-26 12:31:37] INFO  : Listening on 127.0.0.1:55070
[2024-09-26 12:31:37] DEBUG  : load_ssl_context verify=True cert=None trust_env=True http2=False
[2024-09-26 12:31:37] DEBUG  : load_verify_locations cafile='/var/www/html/plugins/gardena/resources/venv/lib/python3.9/site-packages/certifi/cacert.pem'
[2024-09-26 12:31:42]WARNING : Exception occurred when calling on_start_cb:
[2024-09-26 12:31:42] INFO  : Listening cancelled
[2024-09-26 12:31:42] INFO  : Shutdown
[2024-09-26 12:31:42] DEBUG  : Removing PID file /tmp/jeedom/gardena/daemon.pid
[2024-09-26 12:31:42] DEBUG  : Exit 0

Déjà essayé de redémarrer la machine?

Je viens de le faire, je n’y avais pas pensé. Mais c’est sans effet

Je ne comprend pas, j’ai exactement les mêmes versions pour tout et je ne reproduis plus…
je viens d’essayer un fix, une beta est dispo

Idem…

Alors je n’ai pas désinstallé par contre, je suis passé par le market puis installer beta. Ce n’est pas problématique ?

non, c’est ce qu’il faut faire.
il ne faut jamais désinstaller (sauf si explicitement demandé) sinon tous les équipements sont perdus

Bon en fait il n’y avait aucun problème avec les dépendances ni le plugin ni les droits, c’est husqvarna qui met du temps à répondre.
Je viens de à nouveau de reproduire par chance, et chance double, après avoir activer un log low level.
J’ai démarré 3 fois de suite le démon sans rien changer et 2 fois j’ai le timeout (après 5s), la 3eme ca passe instantanément (il faut regarder les connect_tcp.started) :

0000|[2024-09-26 16:13:04] INFO  : Starting daemon with log level: info
0001|[2024-09-26 16:13:04] INFO  : Listening on 127.0.0.1:55070
0002|[2024-09-26 16:13:04] DEBUG  : connect_tcp.started host='api.authentication.husqvarnagroup.dev' port=443 local_address=None timeout=5.0 socket_options=None
0003|[2024-09-26 16:13:09] DEBUG  : connect_tcp.failed exception=ConnectTimeout(TimeoutError())
0004|[2024-09-26 16:13:09]WARNING : Exception occurred when calling on_start_cb:
0005|[2024-09-26 16:13:09] INFO  : Listening cancelled
0006|[2024-09-26 16:13:09] INFO  : Shutdown
0007|[2024-09-26 16:13:21] INFO  : Starting daemon with log level: info
0008|[2024-09-26 16:13:21] INFO  : Listening on 127.0.0.1:55070
0009|[2024-09-26 16:13:21] DEBUG  : connect_tcp.started host='api.authentication.husqvarnagroup.dev' port=443 local_address=None timeout=5.0 socket_options=None
0010|[2024-09-26 16:13:26] DEBUG  : connect_tcp.failed exception=ConnectTimeout(TimeoutError())
0011|[2024-09-26 16:13:26]WARNING : Exception occurred when calling on_start_cb:
0012|[2024-09-26 16:13:26] INFO  : Listening cancelled
0013|[2024-09-26 16:13:26] INFO  : Shutdown
0014|[2024-09-26 16:14:06] INFO  : Starting daemon with log level: info
0015|[2024-09-26 16:14:06] INFO  : Listening on 127.0.0.1:55070
0016|[2024-09-26 16:14:06] DEBUG  : connect_tcp.started host='api.authentication.husqvarnagroup.dev' port=443 local_address=None timeout=5.0 socket_options=None
0017|[2024-09-26 16:14:06] DEBUG  : connect_tcp.complete return_value=<httpcore._backends.anyio.AnyIOStream object at 0x7f1bad87e490>
0018|[2024-09-26 16:14:06] DEBUG  : start_tls.started ssl_context=<ssl.SSLContext object at 0x7f1bad93bec0> server_hostname='api.authentication.husqvarnagroup.dev' timeout=5.0
0019|[2024-09-26 16:14:06] DEBUG  : start_tls.complete return_value=<httpcore._backends.anyio.AnyIOStream object at 0x7f1bad910f40>

donc la dessus je ne vais pas savoir faire grand chose, je vais augmenter le timeout à 10s mais si leur serveurs répondent pas à un simple « connect » (c’est même pas l’appel api, juste le connect tcp là…) après 5s, je n’ai pas bcp d’espoir

edit: nouvelle version dispo en beta

1 « J'aime »

Super merci ! tout fonctionne impec !

Merci pour ton aide et ta réactivité :wink:

Je peux voir le log ?
Y a plus que 0s de délai ?
Peut-être que husqvarna a fini de redémarrer ses serveurs :wink:

Voila le log du démon

[2024-09-26 17:12:12] INFO  : Starting daemon with log level: debug
[2024-09-26 17:12:12] DEBUG  : Writing PID 102838 to /tmp/jeedom/gardena/daemon.pid
[2024-09-26 17:12:12] INFO  : Listening on 127.0.0.1:55070
[2024-09-26 17:12:12] DEBUG  : load_ssl_context verify=True cert=None trust_env=True http2=False
[2024-09-26 17:12:12] DEBUG  : load_verify_locations cafile='/var/www/html/plugins/gardena/resources/venv/lib/python3.9/site-packages/certifi/cacert.pem'
[2024-09-26 17:12:18] INFO  : HTTP Request: POST https://api.authentication.husqvarnagroup.dev/v1/oauth2/token "HTTP/1.1 200 OK"
[2024-09-26 17:12:18] INFO  : get new token: eyJhbGciOi...
[2024-09-26 17:12:18] DEBUG  : # user_id: XXXXXXXXXXXXXXXXXXXX
[2024-09-26 17:12:18] DEBUG  : # scope: amc:api iam:read
[2024-09-26 17:12:18] DEBUG  : # expires_in: 86399
[2024-09-26 17:12:18] DEBUG  : # expires_at: 1727449937
[2024-09-26 17:12:18] DEBUG  : # token_type: Bearer
[2024-09-26 17:12:18] DEBUG  : # provider: husqvarna
[2024-09-26 17:12:18] INFO  : Authentication done
[2024-09-26 17:12:18] INFO  : updating Husqvarna Automowers
[2024-09-26 17:12:23] INFO  : HTTP Request: GET https://api.amc.husqvarna.dev/v1/mowers "HTTP/1.1 200 OK"
[2024-09-26 17:12:23] DEBUG  : get mower: {"type": "mower", "id": « XXXXXXXXXXXXXXX », "attributes": {"system": {"name": "Mouton 315", "model": "HUSQVARNA AUTOMOWER\u00ae 315", "serialNumber": XXXXXXXXXXX}, XXXXXXXXXXX}
[2024-09-26 17:12:23] INFO  : start ws for husqvarna
[2024-09-26 17:12:23] DEBUG  : start auto update task
[2024-09-26 17:12:24] INFO  : Syncing Husqvarna Automowers with jeedom
[2024-09-26 17:12:24] INFO  : Send async started with a cycle of 1.0s
[2024-09-26 17:12:24] DEBUG  : Send to jeedom: {'husqvarna_automower': {‘XXXXXXXXXX’: {'id': ‘XXXXXXXXX’, 'type': 'mower', 'name': 'Mouton 315', 'model_type': 'HUSQVARNA AUTOMOWER® 315', 'serial': XXXXXXXXX, }
[2024-09-26 17:12:29] INFO  : websocket husqvarna connected
[2024-09-26 17:12:30] DEBUG  : Websocket connection ready
[2024-09-26 17:24:19] DEBUG  : Received message status-event
[2024-09-26 17:24:19] DEBUG  : Received automower data {'id': ‘XXXXX’, 'type': 'status-event', 'attributes': {'battery': {'batteryPercent': 100}, 'mower': {'mode': 'MAIN_AREA', 'activity': 'PARKED_IN_CS', 'state': 'RESTRICTED', 'inactiveReason': 'NONE', 'errorCode': 0, 'errorCodeTimestamp': 0}, 'planner': {'nextStartTimestamp': 1727395200000, 'override': {'action': 'NOT_ACTIVE'}, 'restrictedReason': 'SENSOR'}, 'metadata': {'connected': True, 'statusTimestamp': 1727364259509}}}
[2024-09-26 17:24:19] DEBUG  : Received message positions-event
[2024-09-26 17:24:19] DEBUG  : Received automower data {'id': ‘XXXXX’XXXX, 'type': 'positions-event', 'attributes': {'positions': [{'latitude': XXXXXXX, 'longitude': XXXXXXX}]}}
[2024-09-26 17:24:19] DEBUG  : Send to jeedom: {'husqvarna_automower': {XXXX’XXXXX: {'id': ‘XXXXXXXX’, 'type': 'mower', 'name': 'Mouton 315', 'model_type': 'HUSQVARNA AUTOMOWER® 315', 'serial': XXXXXXXXXX, }
[2024-09-26 17:38:19] DEBUG  : Received message positions-event
[2024-09-26 17:38:19] DEBUG  : Received automower data {'id': '3bd32755-8977-4442-a604-0d9c80bd9da9', 'type': 'positions-event', 'attributes': {'positions': [{'latitude': XXXXXXXXXXXX 'longitude': XXXXXXXXXXXX}]}}
[2024-09-26 17:38:19] DEBUG  : Received message status-event
[2024-09-26 17:38:19] DEBUG  : Received automower data {'id': ‘XXXXXXXXXXXX, 'type': 'status-event', 'attributes': {'battery': {'batteryPercent': 100}, 'mower': {'mode': 'MAIN_AREA', 'activity': 'PARKED_IN_CS', 'state': 'RESTRICTED', 'inactiveReason': 'NONE', 'errorCode': 0, 'errorCodeTimestamp': 0}, 'planner': {'nextStartTimestamp': 1727395200000, 'override': {'action': 'NOT_ACTIVE'}, 'restrictedReason': 'SENSOR'}, 'metadata': {'connected': True, 'statusTimestamp': 1727365099649}}}
[2024-09-26 17:38:20] DEBUG  : Send to jeedom: {'husqvarna_automower': {‘XXXXXXXXX’: {'id': ‘X’XXXXXXX, 'type': 'mower', 'name': 'Mouton 315', 'model_type': 'HUSQVARNA AUTOMOWER® 315', 'serial': XXXXXXX, }
[2024-09-26 17:52:19] DEBUG  : Received message status-event
[2024-09-26 17:52:19] DEBUG  : Received automower data {'id': 'XXXXXXXXXXXX', 'type': 'status-event', 'attributes': {'battery': {'batteryPercent': 100}, 'mower': {'mode': 'MAIN_AREA', 'activity': 'PARKED_IN_CS', 'state': 'RESTRICTED', 'inactiveReason': 'NONE', 'errorCode': 0, 'errorCodeTimestamp': 0}, 'planner': {'nextStartTimestamp': 1727395200000, 'override': {'action': 'NOT_ACTIVE'}, 'restrictedReason': 'SENSOR'}, 'metadata': {'connected': True, 'statusTimestamp': 1727365939574}}}
[2024-09-26 17:52:19] DEBUG  : Received message positions-event
[2024-09-26 17:52:19] DEBUG  : Received automower data {'id': 'XXXXXXXXXXXX, 'type': 'positions-event', 'attributes': {'positions': [{'latitude': XXXXXXXXXXXX, 'longitude': XXXXXXXXXXXX}]}}
[2024-09-26 17:52:20] DEBUG  : Send to jeedom: {'husqvarna_automower': {'XXXXXXXXXXXX': {'id': 'XXXXXXXXXXXX', 'type': 'mower', 'name': 'Mouton 315', 'model_type': 'HUSQVARNA AUTOMOWER® 315', 'serial': XXXXXXXXXXXX, }

C’est ce qu’il te faut ?

Yes, super
Effectivement ca a pris 6s.
Au moins ca confirme que mon changement fonctionne

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