Ok, I’ve updated the Gladys PR with 3 changes:
1. « Your device isn’t on the list? » banner — it now highlights Matter and community external integrations: « anyone can create one and publish it in the store, it then appears in this list »,
2. Announced deprecation of Tuya, MELCloud, Telegram, and Netatmo — I did both to make it unambiguous:
- a red « Soon to be deprecated » badge on their catalog card (flag
deprecatedin the integration JSONs, rendered inIntegrationTags); - a warning at the top of each of the four integrations’ page (shared component
DeprecationWarning): « will soon be deprecated in favor of an equivalent external integration… both versions will coexist in the catalog during the transition — you can continue to use this one for now ».
3. Authentication errors on restart (close code 4000) — diagnosis confirmed, and it was even worse than that: without an env var JWT_SECRET, the secret is regenerated at every Gladys boot, and as start() restarted the existing container with the JWT token frozen in its env (signed with the old secret), the integration looped on the refusal without ever self-repairing. Two fixes:
- the supervisor now signs integration JWTs with its own secret, generated once and persisted as a variable (
EXTERNAL_INTEGRATION_JWT_SECRET) — it survives restarts and backup restorations, in line with the containers it validates; - self-repair in
start(): before restarting an existing container,verifyContainerTokeninspects the token in its env (signature with the current secret + correct service + correcttoken_version); if it’s expired, the container is recreated with a fresh token instead of being restarted for nothing. This also fixes, from the next boot, containers created before this fix.
