# Netatmo Service

**URL:** <https://community.gladysassistant.com/t/service-netatmo/5910>\
**Category:** Développement\
**Tags:** netatmo\
**Created:** [8. Mai 2020 um 17:54 UTC](https://community.gladysassistant.com/t/service-netatmo/5910 "2020-05-08T17:54:28Z")\
**Posts on this page:** 15\
**Page:** 19

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [29. Mai 2026 um 13:45 UTC](https://community.gladysassistant.com/t/service-netatmo/5910/363 "2026-05-29T13:45:09Z")

</div>

Ich habe Claude gefragt, und laut ihm gibt es zwei Probleme:

1. Ein wahrscheinlich kaputter OAuth-Refresh seit der Migration zu undici (Bearer auf einem abgelaufenen Token, Bug eingeführt in diesem PR: [https://github.com/GladysAssistant/Gladys/pull/2256](https://github.com/GladysAssistant/Gladys/pull/2256)).
2. Eine „Alles löschen“-Richtlinie, sobald ein Refresh fehlschlägt, die jeden vorübergehenden Fehler in eine dauerhafte Abmeldung verwandelt.

@Terdious Ich stehe dir zur Verfügung, falls du Hilfe beim Beheben brauchst 🙂

Danke an alle für euer Feedback!

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [29. Mai 2026 um 13:49 UTC](https://community.gladysassistant.com/t/service-netatmo/5910/364 "2026-05-29T13:49:33Z")

</div>

> [@PhilippeMA](#):
>
> Siehst du, wann es bei dir aufgehört hat?

Bei mir war es 0:30 Uhr.

---

<div class="post-metadata">

**Author:** ![Terdious](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/terdious/32/6316_2.png) [@Terdious](https://community.gladysassistant.com/u/Terdious)\
**Post date:** [29. Mai 2026 um 21:56 UTC](https://community.gladysassistant.com/t/service-netatmo/5910/365 "2026-05-29T21:56:59Z")

</div>

Hallo zusammen!

Genau, bei mir auch!

Entschuldigung für die Verzögerung, ich habe seit zwei Wochen nicht am PC gearbeitet, meine Eltern sind zu Hause. Und ich habe mir Anfang der Woche einen Bänderriss plus Prellung am Daumen und Zeigefinger zugezogen. 🫣🫣

Ich versuche, das am Wochenende zu prüfen.

Danke an @pierre-gilles für die erste Analyse… und entschuldige für das Einführen des Bugs.

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [30. Mai 2026 um 12:00 UTC](https://community.gladysassistant.com/t/service-netatmo/5910/366 "2026-05-30T12:00:58Z")

</div>

Kein Problem @Terdious, es brennt nicht…

Gute Besserung!

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [30. Mai 2026 um 17:14 UTC](https://community.gladysassistant.com/t/service-netatmo/5910/367 "2026-05-30T17:14:32Z")

</div>

> [@Terdious](#):
>
> Und ich habe mir Anfang der Woche eine Verstauchung plus Prellung am Daumen und Zeigefinger zugezogen. 🫣🫣

Oh Mist! Soll ich am Montag einen Pull Request machen? Ich könnte nicht testen, aber ich kann Claude darauf ansetzen 😂

---

<div class="post-metadata">

**Author:** ![Terdious](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/terdious/32/6316_2.png) [@Terdious](https://community.gladysassistant.com/u/Terdious)\
**Post date:** [18. Juni 2026 um 06:12 UTC](https://community.gladysassistant.com/t/service-netatmo/5910/368 "2026-06-18T06:12:31Z")

</div>

Hallo!

Ich bin dabei.

Ich habe gesehen, insbesondere auf HA, dass es keinen Authorization-Header für `/oauth2/token` geben sollte. Ich nutze die Gelegenheit auch, um die Benutzerinformationsrückgabe während einer erneuten Verbindung auf der Setup-Seite zu verbessern.

---

<div class="post-metadata">

**Author:** ![Terdious](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/terdious/32/6316_2.png) [@Terdious](https://community.gladysassistant.com/u/Terdious)\
**Post date:** [18. Juni 2026 um 08:33 UTC](https://community.gladysassistant.com/t/service-netatmo/5910/369 "2026-06-18T08:33:20Z")

</div>

PR hier erstellt:

> <https://github.com/GladysAssistant/Gladys/pull/2561>
>
> \### Pull Request check-list
> 
> To ensure your Pull Request can be accepted as fa…st as possible, make sure to review and check all of these items:
> 
> \- \[x\] If your changes affects code, did your write the tests?
> \- \[x\] Are tests passing? (\`npm test\` on both front/server)
> \- \[x\] Is the linter passing? (\`npm run eslint\` on both front/server)
> \- \[x\] Did you run prettier? (\`npm run prettier\` on both front/server)
> \- \[x\] If you are adding a new features/services, did you run integration comparator? (\`npm run compare-translations\` on front)
> \- \[x\] Did you test this pull request in real life? With real devices? If this development is a big feature or a new service, we recommend that you provide a Docker image to the community (\[forum\](https://community.gladysassistant.com/)) for testing before merging.
> \- \[\] ~If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code)~
> \- \[\] ~If you are adding a new features/services which needs explanation, did you modify the user documentation? See \[the GitHub repo\](https://github.com/GladysAssistant/v4-website) and the \[website\](https://gladysassistant.com).~
> \- \[\] ~Did you add fake requests data for the demo mode (\`front/src/config/demo.js\`) so that the demo website is working without a backend? (if needed) See \[https://demo.gladysassistant.com\](https://demo.gladysassistant.com).~
> 
> NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.
> 
> \### Description of change
> \## Summary
> 
> Fix the recurring Netatmo disconnects reported by the community (\[forum thread\](https://community.gladysassistant.com/t/service-netatmo/5910/355), starting May 2026) and add resilient auto-reconnect.
> 
> Root causes:
> 1. PR #2256 (axios → undici migration) added \`Authorization: Bearer \<accessToken\>\` on the \`/oauth2/token\` endpoint. The access token sent in that Bearer is by construction expired (we're refreshing it), so Netatmo rejects the request.
> 2. The \`catch\` of \`refreshingTokens()\` wiped both \`accessToken\` and \`refreshToken\` on any error (transient network blip, 5xx, timeout, 4xx). One transient blip = permanent disconnect with no auto-recovery.
> 
> \## Details
> 
> Approach aligned with how Home Assistant's OAuth helper handles refresh errors (\[HA blog 2026-02-19\](https://developers.home-assistant.io/blog/2026/02/19/oauth-token-request-error-handling/)):
> 
> \- \*\*No more Bearer header on \`/oauth2/token\`\*\* for both \`refreshingTokens\` and \`retrieveTokens\`. Credentials go in the form body (\`client\_id\`, \`client\_secret\`, \`refresh\_token\`), as expected by the OAuth2 refresh\_token grant spec.
> \- \*\*Error classification\*\*:
> - 5xx, 429 and network errors → transient. Tokens are preserved, status switches to \`RECONNECTING\`, and a short backoff retry is scheduled (30s → 60s → 120s → 300s, then 300s recurrent indefinitely).
> - 4xx except 429 → fatal. Tokens are preserved within a \*\*24h grace window\*\* (status \`RECONNECTING\`, retries continue). If failures persist for 24h, tokens are cleared and the service drops to \`DISCONNECTED\` (manual reconnect required, same as before).
> \- \*\*\`init()\` is now resilient\*\*: a transient first refresh schedules the auto-reconnect cycle instead of throwing.
> \- \*\*New \`STATUS.RECONNECTING\`\*\* with a yellow info banner in the Setup, Devices and Discover pages, plus EN/FR/DE i18n (\`integration.netatmo.status.reconnecting\`).
> \- \`pollRefreshingToken\`, \`refreshNetatmoTokens\`, \`scheduleReconnectAttempt\` follow the Gladys convention (functions exported and attached to the prototype, mirroring \`services/tuya/lib/tuya.reconnect.js\`).
> 
> Runtime validated by the integration maintainer: after killing connectivity, the service stays alive, retries, and recovers when Netatmo becomes reachable again.
> 
> \## Scope
> 
> | Area | Insertions | Deletions |
> |---|---|---|
> | Production code (server) | 178 | 23 |
> | Production code (front) | 15 | 0 |
> | Tests | 327 | 64 |
> | i18n (en/fr/de) | 6 | 0 |
> | \*\*Total vs \`master\`\*\* | \*\*526\*\* | \*\*87\*\* |
> 
> Touched files reach 100% statements / branches / functions / lines coverage. Full netatmo suite: 185 passing.
> 
> \## Test plan
> 
> \- \[x\] \`npm run test-service --service=netatmo\` → 185 passing
> \- \[x\] \`npx nyc --reporter=text --include='services/netatmo/lib/...' npm run test-service --service=netatmo\` → 100% on every touched file
> \- \[x\] \`npm run prettier\` + \`npm run eslint\` on server and front (no new issues)
> \- \[x\] Runtime: connection alive, disconnects gracefully, reconnects when Netatmo is back
> 
> 
> 
> \## Summary by CodeRabbit
> 
> \* \*\*New Features\*\*
> \* Netatmo integration now displays a "reconnecting" status message when connection is temporarily lost.
> \* Automatic reconnection attempts with exponential backoff timing for transient network and temporary service failures.
> \* Added reconnection status messages in German, English, and French.
> 
> \* \*\*Tests\*\*
> \* Added comprehensive test coverage for reconnection retry behavior, grace windows, token handling, and status transitions.

Ich habe die Gelegenheit genutzt, um eine zweite PR zu erstellen, um die bestehende Rückmeldung zu verbessern. In einigen Fehlerfällen wurde die Integration nicht als getrennt erkannt und blieb visuell auf „Verbunden“ stehen, selbst wenn dies nicht der Fall war (z. B. wenn die Erkennung fehlschlug). Ich nutze die Gelegenheit, um die Funktion der automatischen Wiederverbindung zu nutzen. PR2:

> <https://github.com/GladysAssistant/Gladys/pull/2562>
>
> \### Pull Request check-list
> 
> To ensure your Pull Request can be accepted as fa…st as possible, make sure to review and check all of these items:
> 
> \- \[x\] If your changes affects code, did your write the tests?
> \- \[x\] Are tests passing? (\`npm test\` on both front/server)
> \- \[x\] Is the linter passing? (\`npm run eslint\` on both front/server)
> \- \[x\] Did you run prettier? (\`npm run prettier\` on both front/server)
> \- \[x\] If you are adding a new features/services, did you run integration comparator? (\`npm run compare-translations\` on front)
> \- \[x\] Did you test this pull request in real life? With real devices? If this development is a big feature or a new service, we recommend that you provide a Docker image to the community (\[forum\](https://community.gladysassistant.com/)) for testing before merging.
> \- \[\] ~If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code)~
> \- \[\] ~If you are adding a new features/services which needs explanation, did you modify the user documentation? See \[the GitHub repo\](https://github.com/GladysAssistant/v4-website) and the \[website\](https://gladysassistant.com).~
> \- \[\] ~Did you add fake requests data for the demo mode (\`front/src/config/demo.js\`) so that the demo website is working without a backend? (if needed) See \[https://demo.gladysassistant.com\](https://demo.gladysassistant.com).~
> 
> NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.
> 
> \### Description of change
> \## Summary
> 
> Follow-up to #2561. The OAuth refresh fix covers \`/oauth2/token\`, but business API calls (\`homesdata\`, \`getthermostatsdata\`, \`getstationsdata\`) also need to trigger the auto-reconnect cycle when Netatmo rejects the access token. Without this, clicking "Refresh" on the Discovery page when the Netatmo app is deactivated returned silently while the status stayed \`connected\` — confusing for the user.
> 
> \> ⚠️ \*\*Stacked on top of #2561.\*\* Once #2561 is merged, this PR will rebase cleanly and the displayed diff will shrink to only the changes below.
> 
> \## Details
> 
> \- \*\*New \`handleApiAuthError(status)\` helper.\*\* On HTTP \`401\`, \`403\` or \`406\` (Netatmo's code for "Application is deactivated", confirmed by runtime testing: \`406 { "error": { "code": 5, "message": "Application is deactivated" } }\`), it switches the status to \`RECONNECTING\` and calls the \`scheduleReconnectAttempt()\` cycle introduced in #2561. Idempotent: no-op if a reconnect cycle is already in progress.
> \- \*\*Wired into the 3 cloud loaders\*\*: \`loadDevices\`, \`loadThermostatDetails\`, \`loadWeatherStationDetails\` — right after detecting a non-OK response.
> \- \*\*\`discoverDevices\` and \`refreshNetatmoValues\`\*\* no longer overwrite the status with \`CONNECTED\` when \`handleApiAuthError\` just moved it to \`RECONNECTING\`/\`DISCONNECTED\`. The UI keeps showing the auto-reconnect banner.
> \- \*\*Tokens are never cleared by this helper itself.\*\* \`refreshingTokens\` remains the single source of truth for token lifecycle decisions (24h grace window before clearing on fatal OAuth errors).
> 
> Runtime validated by the integration maintainer: deactivating the app on \`dev.netatmo.com\` while Gladys is up → click "Refresh" → status switches to \`reconnecting\`, banner appears in the 3 Netatmo pages, automatic retry cycles kick in; reactivating the app → reconnect succeeds at the next retry.
> 
> \## Scope
> 
> | Area | Insertions | Deletions |
> |---|---|---|
> | Production code (server) | 67 | 3 |
> | Tests | 159 | 0 |
> | \*\*Total vs #2561\*\* | \*\*226\*\* | \*\*3\*\* |
> 
> Touched files reach 100% statements / branches / functions / lines coverage. Full netatmo suite: 197 passing.
> 
> \## Test plan
> 
> \- \[x\] \`npm run test-service --service=netatmo\` → 197 passing
> \- \[x\] 100% coverage on the 6 touched files
> \- \[x\] \`npm run prettier\` + \`npm run eslint\` on server (no new issues)
> \- \[x\] Runtime: app deactivation/reactivation → status transitions correctly + UI banner shows up in all 3 pages
> 
> 
> \## Summary by CodeRabbit
> 
> \* \*\*Bug Fixes\*\*
> \* Improved handling of Netatmo auth-related HTTP errors (401, 403, 406) to reliably switch to reconnect mode and avoid duplicate reconnect scheduling.
> \* Refined service status transitions so “connected” status is only set when not reconnecting/disconnected.
> \* Enhanced device discovery/details loading to trigger auth-error handling on failed API calls.
> \* \*\*New Features\*\*
> \* Added optional status-loading support to the Netatmo discover page so it can refresh status after discovery actions.
> \* \*\*Tests\*\*
> \* Expanded unit tests for reconnection idempotency, discovery/status preservation, and auth error propagation across API flows.

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [18. Juni 2026 um 17:48 UTC](https://community.gladysassistant.com/t/service-netatmo/5910/370 "2026-06-18T17:48:25Z")

</div>

Danke @Terdious!

Alles klar bei mir, ich habe den ersten PR gemerged. Danke, dass du dir die Zeit genommen hast, das zu prüfen und die Korrekturen vorzuschlagen 🙏

Für den zweiten PR, da er auf dem ersten basiert, gibt es jetzt einige Konflikte. Könntest du den Master rebase, um sie zu lösen?

Danke! 😄

---

<div class="post-metadata">

**Author:** ![Terdious](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/terdious/32/6316_2.png) [@Terdious](https://community.gladysassistant.com/u/Terdious)\
**Post date:** [19. Juni 2026 um 10:42 UTC](https://community.gladysassistant.com/t/service-netatmo/5910/371 "2026-06-19T10:42:41Z")

</div>

> [@pierre-gilles](#):
>
> Das ist für mich in Ordnung, ich habe den ersten PR gemerged. Vielen Dank, dass du dir die Zeit genommen hast, das zu prüfen und die Korrekturen vorzuschlagen 🙏

Gern geschehen, das ist normal!

> [@pierre-gilles](#):
>
> Für den zweiten PR, da er auf dem ersten basiert, gibt es jetzt einige Konflikte. Könntest du master rebase, um sie zu lösen?

Das ist für mich in Ordnung beim zweiten PR, es ist rebase.

> <https://github.com/GladysAssistant/Gladys/pull/2562>
>
> \### Pull Request check-list
> 
> To ensure your Pull Request can be accepted as fa…st as possible, make sure to review and check all of these items:
> 
> \- \[x\] If your changes affects code, did your write the tests?
> \- \[x\] Are tests passing? (\`npm test\` on both front/server)
> \- \[x\] Is the linter passing? (\`npm run eslint\` on both front/server)
> \- \[x\] Did you run prettier? (\`npm run prettier\` on both front/server)
> \- \[x\] If you are adding a new features/services, did you run integration comparator? (\`npm run compare-translations\` on front)
> \- \[x\] Did you test this pull request in real life? With real devices? If this development is a big feature or a new service, we recommend that you provide a Docker image to the community (\[forum\](https://community.gladysassistant.com/)) for testing before merging.
> \- \[\] ~If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code)~
> \- \[\] ~If you are adding a new features/services which needs explanation, did you modify the user documentation? See \[the GitHub repo\](https://github.com/GladysAssistant/v4-website) and the \[website\](https://gladysassistant.com).~
> \- \[\] ~Did you add fake requests data for the demo mode (\`front/src/config/demo.js\`) so that the demo website is working without a backend? (if needed) See \[https://demo.gladysassistant.com\](https://demo.gladysassistant.com).~
> 
> NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.
> 
> \### Description of change
> \## Summary
> 
> Follow-up to #2561. The OAuth refresh fix covers \`/oauth2/token\`, but business API calls (\`homesdata\`, \`getthermostatsdata\`, \`getstationsdata\`) also need to trigger the auto-reconnect cycle when Netatmo rejects the access token. Without this, clicking "Refresh" on the Discovery page when the Netatmo app is deactivated returned silently while the status stayed \`connected\` — confusing for the user.
> 
> \> ⚠️ \*\*Stacked on top of #2561.\*\* Once #2561 is merged, this PR will rebase cleanly and the displayed diff will shrink to only the changes below.
> 
> \## Details
> 
> \- \*\*New \`handleApiAuthError(status)\` helper.\*\* On HTTP \`401\`, \`403\` or \`406\` (Netatmo's code for "Application is deactivated", confirmed by runtime testing: \`406 { "error": { "code": 5, "message": "Application is deactivated" } }\`), it switches the status to \`RECONNECTING\` and calls the \`scheduleReconnectAttempt()\` cycle introduced in #2561. Idempotent: no-op if a reconnect cycle is already in progress.
> \- \*\*Wired into the 3 cloud loaders\*\*: \`loadDevices\`, \`loadThermostatDetails\`, \`loadWeatherStationDetails\` — right after detecting a non-OK response.
> \- \*\*\`discoverDevices\` and \`refreshNetatmoValues\`\*\* no longer overwrite the status with \`CONNECTED\` when \`handleApiAuthError\` just moved it to \`RECONNECTING\`/\`DISCONNECTED\`. The UI keeps showing the auto-reconnect banner.
> \- \*\*Tokens are never cleared by this helper itself.\*\* \`refreshingTokens\` remains the single source of truth for token lifecycle decisions (24h grace window before clearing on fatal OAuth errors).
> 
> Runtime validated by the integration maintainer: deactivating the app on \`dev.netatmo.com\` while Gladys is up → click "Refresh" → status switches to \`reconnecting\`, banner appears in the 3 Netatmo pages, automatic retry cycles kick in; reactivating the app → reconnect succeeds at the next retry.
> 
> \## Scope
> 
> | Area | Insertions | Deletions |
> |---|---|---|
> | Production code (server) | 67 | 3 |
> | Tests | 159 | 0 |
> | \*\*Total vs #2561\*\* | \*\*226\*\* | \*\*3\*\* |
> 
> Touched files reach 100% statements / branches / functions / lines coverage. Full netatmo suite: 197 passing.
> 
> \## Test plan
> 
> \- \[x\] \`npm run test-service --service=netatmo\` → 197 passing
> \- \[x\] 100% coverage on the 6 touched files
> \- \[x\] \`npm run prettier\` + \`npm run eslint\` on server (no new issues)
> \- \[x\] Runtime: app deactivation/reactivation → status transitions correctly + UI banner shows up in all 3 pages
> 
> 
> \## Summary by CodeRabbit
> 
> \* \*\*Bug Fixes\*\*
> \* Improved handling of Netatmo auth-related HTTP errors (401, 403, 406) to reliably switch to reconnect mode and avoid duplicate reconnect scheduling.
> \* Refined service status transitions so “connected” status is only set when not reconnecting/disconnected.
> \* Enhanced device discovery/details loading to trigger auth-error handling on failed API calls.
> \* \*\*New Features\*\*
> \* Added optional status-loading support to the Netatmo discover page so it can refresh status after discovery actions.
> \* \*\*Tests\*\*
> \* Expanded unit tests for reconnection idempotency, discovery/status preservation, and auth error propagation across API flows.

Zur Info besteht die Änderung darin, auch den automatischen Reconnect-Zyklus auszulösen, wenn Netatmo den Zugriffstoken ablehnt. Ohne dies führte das Klicken auf „Aktualisieren“ auf der Entdeckungsseite oder das Abrufen der Werte, wenn die Netatmo-Anwendung deaktiviert ist, zu keiner Fehlermeldung.

Jetzt haben wir eine klare Information über den aktuellen Reconnect-Status auf allen Seiten der Integration. Die Versuchszyklen sind: 30s → 60s → 120s → 300s, dann unendlich wiederkehrende 300s.

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/a/4/a4867c14ec7dbf383255a077cac2193b2710072a.png)  
 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/1/9/1954c0c2c7e7c3a3a1d0e2df6340f3c2f93603a7.png)  
 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/8/9/895c54d4cc68f6b952ac539629f288d79657b7d7.png)

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/e/3/e35f927a8aac3ce53ffe34c7fd908c1f809014e8.png)

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [19. Juni 2026 um 11:37 UTC](https://community.gladysassistant.com/t/service-netatmo/5910/372 "2026-06-19T11:37:47Z")

</div>

Das ist für mich in Ordnung, es ist gemerged und wird in der nächsten Version von Gladys veröffentlicht 🙂

Danke für alle diese Korrekturen 🙌

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [22. Juni 2026 um 18:27 UTC](https://community.gladysassistant.com/t/service-netatmo/5910/373 "2026-06-22T18:27:49Z")

</div>

Die Korrekturen sind in Gladys Assistant 4.80 verfügbar:

> [@Gladys Assistant 4.80: Matter, Netatmo, Tuya und KI rocket](https://community.gladysassistant.com/t/gladys-assistant-4-80-matter-netatmo-tuya-et-ia/10295?u=pierre-gilles):
>
> Salut à tous ! Beaucoup de nouveautés en ce moment smiley Cette version 4.80 apporte de nombreuses améliorations de stabilité, des corrections sur Matter, Netatmo et Tuya, ainsi que plusieurs nouveautés autour de l’IA. robot IA L’agent IA continue de s’améliorer avec deux nouveautés : plus Ajout d’un nouvel outil sensor.set-state, permettant à l’agent de modifier directement l’état de certains capteurs lorsque demandé. Par exemple, vous pouvez utiliser l’IA pour lire une image de cam…

Danke @Terdious für die Korrekturen 🙂

---

<div class="post-metadata">

**Author:** ![Terdious](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/terdious/32/6316_2.png) [@Terdious](https://community.gladysassistant.com/u/Terdious)\
**Post date:** [4. Juli 2026 um 09:46 UTC](https://community.gladysassistant.com/t/service-netatmo/5910/374 "2026-07-04T09:46:18Z")

</div>

Hallo zusammen! 👋

Das Netatmo-Projekt geht weiter! Bevor wir mit der Entwicklung der Integration der **Kameras** (der alte PR #2032, automatisch wegen Inaktivität geschlossen — ein neues, dediziertes Thema kommt sehr bald) wieder starten, haben wir beschlossen, zunächst den **aktuellen Service zu bereinigen** : eine vollständige Überprüfung der Service-Historie, gefolgt von einer Reihe gezielter Korrekturen.

Ergebnis: **4 PRs** , alle getestet und unter realen Bedingungen auf meiner Installation validiert (Thermostat, etwa ein Dutzend Ventile, Relais, Wetterstation und ihre Module — darunter mehrere Geräte absichtlich ohne Strom, was übrigens einen schönen Bug aufgedeckt hat 😄).

### Die 4 PRs (in der empfohlenen Merge-Reihenfolge)

**1. [#2620 — Erkennung von Geräten ohne Strom](https://github.com/GladysAssistant/Gladys/pull/2620)** 🔴 _zuerst zu mergen_  
Ein einziges Modul ohne Strom in Ihrem Haus (z. B. das Relais einer Wärmepumpe, die außerhalb der Heizsaison abgeschaltet ist) reichte aus, um die **Entdeckungseite komplett einzufrieren** (Notwendigkeit, die Seite neu zu laden), mit einem Gerät namens „undefined“. Diese Module werden jetzt sauber aus der API (Name, Raum) neu aufgebaut, mit einer klaren Nachricht „Gerät nicht erreichbar… (Code: 6)“ angezeigt, als offline markiert und **können weiterhin registriert werden** — ihre Werte werden wieder hochgeladen, sobald sie wieder mit Strom versorgt werden.

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/c/c/ccea40a463fcd7c54ed1e197ac02ace88ba980be.png)

**2. [#2617 — Werte von null gehen nicht mehr verloren](https://github.com/GladysAssistant/Gladys/pull/2617)**  
0 mm Regen, 0 °C, Wind aus Nord (0°), Böen mit 0 km/h… wurden als „fehlende“ Werte behandelt (ersetzt durch möglicherweise unterschiedliche Backup-Daten oder als leere Zustände gesendet). Das ist korrigiert: eine Null ist ein echter Wert, und kein Phantomzustand wird mehr gespeichert, wenn die Daten tatsächlich fehlen.

**3. [#2618 — Robustheit der Verbindung](https://github.com/GladysAssistant/Gladys/pull/2618)**

- ein fehlgeschlagener Thermostatbefehl stürzt den Service nicht mehr lautlos ab: der Fehler wird jetzt korrekt weitergeleitet und protokolliert (Server-Logs + Service-Status sichtbar auf den Integrationsseiten). Anmerkung: Das Gladys-Dashboard zeigt noch keine Befehlsfehler an — das ist eine allgemeine Einschränkung des Gladys-Kerns (asynchrone Architektur der Aktionen), diese PR legt die Voraussetzung dafür, dass eine zukünftige visuelle Rückmeldung möglich wird;
- das Zugriffstoken wird bei 80 % seiner Lebensdauer aktualisiert (früher: genau bei Ablauf, mit einem Fenster für ein abgelaufenes Token);
- die Gerätewerte werden sofort nach der OAuth-Verbindung abgerufen (früher: bis zu 2 Minuten Wartezeit);
- Ende der Funktionen mit der Bezeichnung „Minimum in undefined“ für Module ohne Raum.

**4. [#2619 — Interne Refactorisierung](https://github.com/GladysAssistant/Gladys/pull/2619)** _(basierend auf #2617)_  
Die 8 duplizierten Update-Dateien werden durch eine einzige deklarative Tabelle ersetzt: **-370 Codezeilen** , keine Verhaltensänderung (die gesamte Testreihe läuft ohne eine einzige erwartete Wertänderung). Es ist vor allem die Grundlage, die die Hinzufügung zukünftiger Gerätetypen — die Kameras! — viel einfacher machen wird.

### Qualität

Testabdeckung von 100 % auf dem gesamten betroffenen Code, Checklisten abgearbeitet, CodeRabbit-Hinweise bearbeitet (3 korrigiert, der Rest mit Begründung abgelehnt).

@pierre-gilles alles ist bereit für die Überprüfung 🙂 Empfohlene Merge-Reihenfolge: **#2620 → #2617 → #2618 → #2619** (die #2620 ist in den drei anderen Branches enthalten, da sie für die Tests unerlässlich ist; sobald sie gemerged ist, werden ihre Diffs entsprechend reduziert. Die #2619 ist auf die #2617 gestapelt).

Fortsetzung im nächsten Kapitel: die Wiederaufnahme der **Netatmo-Kameras** , mit einem dedizierten Thema 📹

---

<div class="post-metadata">

**Author:** ![mutmut](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/mutmut/32/14064_2.png) [@mutmut](https://community.gladysassistant.com/u/mutmut)\
**Post date:** [4. Juli 2026 um 10:45 UTC](https://community.gladysassistant.com/t/service-netatmo/5910/375 "2026-07-04T10:45:26Z")

</div>

Super !!! Danke @Terdious für die Riesenarbeit, die du leistest 🤩

---

<div class="post-metadata">

**Author:** ![Terdious](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/terdious/32/6316_2.png) [@Terdious](https://community.gladysassistant.com/u/Terdious)\
**Post date:** [4. Juli 2026 um 10:51 UTC](https://community.gladysassistant.com/t/service-netatmo/5910/376 "2026-07-04T10:51:53Z")

</div>

Danke @mutmut,

Ich gestehe, heute weniger als früher eigentlich … Ich mache hauptsächlich Driving und Prompting für die KI. Korrekturlesen während des Codings, Testen im Flug, Feedback und Reflexion/Validierung!!^^ Danach vollständiges Testen und Angabe der Richtungen, die eingeschlagen werden sollen. Besonders viel Recherche in Foren und auf GitHub, um der KI immer wieder zu sagen, dass sie sich auf bereits geführte Diskussionen, Erfahrungen aus der Vergangenheit und Design-Entscheidungen beziehen soll.

Bei Netatmo konnte ich ihm viele Quellen aus der Vergangenheit geben, Reviews von Pierre-Gilles, Fehler von mir usw., damit wir diese nicht wiederholen oder den falschen Weg einschlagen. Es scheint gut zu funktionieren! Aber erst die Reviews zeigen es ^^ Denn er macht immer noch Fehler 😅 und vor allem wegen mir, verpasse ich welche. Aber weniger als wenn ich komplett alleine programmiert hätte.

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [6. Juli 2026 um 07:51 UTC](https://community.gladysassistant.com/t/service-netatmo/5910/377 "2026-07-06T07:51:22Z")

</div>

Genial, danke für diese PRs! Ich halte dich auf dem Laufenden, sobald ich sie mir angesehen habe 🙂

[Vorherige Seite](https://community.gladysassistant.com/t/service-netatmo/5910.md?page=18)
