Commit Graph
6 Commits
Author SHA1 Message Date
dfritzandClaude Fable 5.2 cdbb0f6ac5 Document the cloud fallback, reconfigure step, and availability rules
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-14 21:54:47 -06:00
dfritzandClaude Fable 5.2 298df5864a Make spa entities unavailable when the spa is not reporting
A module that is online but cut off from the control box keeps serving and
publishing a full document of blank and default values. Read literally that
is an idle spa: no temperatures, salt level 0, lights and jets off, and
controls that accept a value and snap back.

- The spa counts as reporting only while telemetry is fresh (something
  arrived in the last five minutes) and carries control-box data. Otherwise
  every entity is unavailable, and the reason is logged once per change.
- The entry still loads in that state, so entities return on their own when
  the spa reports again.
- A watchdog catches silence between updates, and reloads the entry when the
  broker connection stays down for three minutes. The broker is the only
  control path and its credentials rotate; paho reconnects with the old ones,
  so only a fresh sign-in recovers it.
- Version 0.2.0.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-14 21:16:20 -06:00
dfritzandClaude Fable 5.2 3ba61e9c0b Read from the cloud when the local status URL stops answering
The dongle has no DNS name and takes its address from DHCP, so a configured
local /status URL goes stale when the lease changes. Setup treated that as
fatal: every entity went unavailable and control (which never used the local
path) went down with it.

- A local URL that does not answer at setup no longer fails the entry; the
  coordinator subscribes to the cloud broker for telemetry instead and logs a
  warning.
- After four consecutive failed local polls the coordinator switches to the
  cloud the same way, instead of holding the last local values forever.
- When the local URL answers again it takes over: the cloud subscription is
  dropped along with what it delivered, so a stale cloud value cannot shadow a
  fresh local one.
- New reconfigure step changes the local URL without signing in again.
- Version 0.1.1.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-14 20:07:18 -06:00
dfritz 46a353071d Merge pull request '[bug-41mqxddz7zeh] Lights/jets/salt control, app-traffic mimicry, optional local read path' (#1) from ops/bug-41mqxddz7zeh/spa-controls-headers-local-read into main
Reviewed-on: #1
2026-09-01 15:15:15 +00:00
Hank MuellerandClaude Opus 5 cde2bbc772 Add lights/jets/salt control, app-traffic mimicry, and optional local read path
- New entities: number (salt output level 0-10), switch (lights, jets); the
  read-only salt sensor is replaced by the settable number.
- Look identical to the official app on the wire: send the app's Dalvik UA on
  REST, okhttp/4.12.0 on the mTLS creds fetch, and "mqtt-<uuid>" client ids.
- Consolidate every constant value into constants.py (well commented); protocol.py
  keeps only the command builders; const.py removed.
- Optional local read path: a `local_status_url` config option polls the dongle's
  local /status endpoint for telemetry instead of the cloud MQTT subscription
  (control stays cloud MQTT). State getters handle both schemas.

No private/internal values in the repo (the spa IP is runtime config only).

Fixes bug-41mqxddz7zeh

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F6B8b3iYNv6QUftK2FDfYb
2026-09-01 15:12:24 +00:00
Hank MuellerandClaude Opus 5 8cda06f7f3 Add Hot Spring Connected Spa integration
Unofficial cloud integration for Watkins/Hot Spring "Connected Spa" hot tubs.
Reverse-engineered from the official Android app.

- climate entity (setpoint + current water temp) via heater/control
- sensors: water temperature, salt output level, salt cartridge
- REST (JWT) login + spa discovery; mTLS fetch of rotating HiveMQ broker creds;
  MQTT subscribe (telemetry) / publish (control)
- config flow prompts for account email + password (stored encrypted, never in repo)
- no secrets committed: vendor mTLS client cert is loaded from host PEM files
  (see README); .gitignore blocks pem/p12/der/key/env

Fixes bug-41mqxddz7zeh

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F6B8b3iYNv6QUftK2FDfYb
2026-09-01 14:22:37 +00:00