Follow the cloud's platform migration of 2026-09-14 #13

Merged
nexus merged 1 commit from fix/cloud-migration-2026-09 into main 2026-09-14 09:16:52 +02:00
Owner

Beniferro moved the WifiPool cloud to a new platform in the night of 13→14 September. The app works again; the tool did not: login only looked fine because of a stale cookie, discovery found no channels, and the realtime socket reconnected every two minutes.

What changed on the cloud (verified live)

Before Since 2026-09-14
Session cookie connect.sid x-antelopejs-token (JWT, 7 days)
getStats timestamps ISO-8601 strings epoch milliseconds
getStats payload filtered to the IO's channel whole device telemetry in every entry
Socket heartbeat client had to ping server pings; a client ping closes the socket
Domain id harvest from /groups/accessible mobile_group_id

What this PR does

  • Accepts whatever cookie the login sets and expires the jar before every login (a leftover connect.sid hid the breakage for hours).
  • Parses timestamps as strings or numbers.
  • Reads every getStats entry by the IO's key (GetStatsKey, ParseSamplesKey), threaded through discovery and the poller backfill. Without it Flow and Level came back as copies of the pH value.
  • Removes the client-side ping loop; the client only answers server pings.
  • Tries the advertised mobile_group_id first, keeps UUID harvesting as fallback.
  • Masks credential-like fields at any nesting depth in debug logs (the new login response echoes a password hash and push tokens).
  • Documents the new platform in docs/wifipool-api.md and adds a troubleshooting row to the README.

Verification

  • go test ./... green, new tests for every change (captured payloads).
  • Live against the migrated cloud with the production .env: discover maps all eight channels with the right kinds and values (pH 7.256, redox 668.7 mV, flow/level switches, both pumps), run stayed connected to the realtime stream for over three minutes without a single disconnect and published 12 Home Assistant entities.

After merging: wait for the image job, then on the NAS docker compose pull && docker compose up -d.

🤖 Generated with Claude Code

Beniferro moved the WifiPool cloud to a new platform in the night of 13→14 September. The app works again; the tool did not: login only looked fine because of a stale cookie, discovery found no channels, and the realtime socket reconnected every two minutes. ## What changed on the cloud (verified live) | | Before | Since 2026-09-14 | |---|---|---| | Session cookie | `connect.sid` | `x-antelopejs-token` (JWT, 7 days) | | `getStats` timestamps | ISO-8601 strings | epoch milliseconds | | `getStats` payload | filtered to the IO's channel | whole device telemetry in every entry | | Socket heartbeat | client had to ping | server pings; a client ping closes the socket | | Domain id | harvest from `/groups/accessible` | `mobile_group_id` | ## What this PR does - Accepts whatever cookie the login sets and expires the jar before every login (a leftover `connect.sid` hid the breakage for hours). - Parses timestamps as strings or numbers. - Reads every `getStats` entry by the IO's `key` (`GetStatsKey`, `ParseSamplesKey`), threaded through discovery and the poller backfill. Without it Flow and Level came back as copies of the pH value. - Removes the client-side ping loop; the client only answers server pings. - Tries the advertised `mobile_group_id` first, keeps UUID harvesting as fallback. - Masks credential-like fields at any nesting depth in debug logs (the new login response echoes a password hash and push tokens). - Documents the new platform in `docs/wifipool-api.md` and adds a troubleshooting row to the README. ## Verification - `go test ./...` green, new tests for every change (captured payloads). - Live against the migrated cloud with the production `.env`: `discover` maps all eight channels with the right kinds and values (pH 7.256, redox 668.7 mV, flow/level switches, both pumps), `run` stayed connected to the realtime stream for over three minutes without a single disconnect and published 12 Home Assistant entities. After merging: wait for the image job, then on the NAS `docker compose pull && docker compose up -d`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Follow the cloud's platform migration of 2026-09-14
All checks were successful
CI / test (push) Successful in 2m31s
CI / test (pull_request) Successful in 1m48s
CI / image (push) Successful in 1m24s
CI / image (pull_request) Successful in 52s
CI / publish-commit-tag (push) Has been skipped
CI / publish-version-tag (push) Has been skipped
CI / publish-commit-tag (pull_request) Has been skipped
CI / publish-version-tag (pull_request) Has been skipped
6b9554b875
Beniferro moved the WifiPool cloud to a new platform overnight. The
endpoints and the io[] metadata are unchanged, but four details broke
the tool and one more hid the breakage:

- The session cookie is now x-antelopejs-token (a JWT), no longer
  connect.sid. The client treats whatever cookie the login sets as the
  session instead of checking the name, and expires the jar before
  every login: a connect.sid left over from the old platform had made
  the login look successful for hours after the switch.
- getStats timestamps are epoch milliseconds instead of ISO-8601
  strings. Both are accepted now.
- Every getStats entry carries the device's complete telemetry (analog
  and all switches) whichever IO was asked for. Values are picked by
  the IO's key from getInfo (GetStatsKey / ParseSamplesKey); without it
  the flow and level switches read as copies of the pH value. The key
  is threaded through discovery and the poller's backfill.
- The socket heartbeat is server-driven as engine.io v4 specifies; the
  new server closes the connection the moment a client ping arrives.
  The client-side ping loop is gone.
- /groups/accessible advertises mobile_group_id; it is tried first,
  with the UUID harvesting kept as the fallback for the old shape.

Debug logging now masks credential-like fields at any nesting depth,
because the new login response echoes the account record including a
password hash and push tokens.

Verified live against the migrated cloud: discovery maps all eight
channels correctly, the realtime stream stays connected, values match
the app. docs/wifipool-api.md documents the new platform and notes the
old behaviour where a client may want to support both.
nexus merged commit 425bfbaf8a into main 2026-09-14 09:16:52 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nexus/WifiPoolToMQTT!13
No description provided.