Skip to content

EphEmberLocal: cloud-free mode (0.5.0) - #5

Merged
roberty99 merged 5 commits into
masterfrom
cloud-free
Nov 22, 2026
Merged

roberty99 merged 5 commits into
masterfrom
cloud-free

Conversation

@roberty99

Copy link
Copy Markdown
Owner

Adds EphEmberLocal, a cloud-free mode on top of the local broker from 0.4.16. It needs no Ember account.

  • Zones, readings and schedules are built from the gateway's own reports: upload/zoneType, upload/pointdata, upload/programme, upload/thermostat. They come out in the same format as the cloud's, so all the existing helpers work unchanged.
  • Commands go straight to the gateway over the open connection. The gateway doesn't need the Ember user ID.
  • The gateway only sends its zone list and schedules when it connects. tools/ember_state_keeper.py keeps the latest reports as retained messages under <productId>/<uid>/state/..., and EphEmberLocal reads those first.
  • Zone names: names={mac: name}, otherwise "Hot Water" / "Heating" (numbered). Zone ids are the macs.
  • The cloud code's schedule linking moved, unchanged, into build_zone_programs(), which both modes use.
  • Docs: README, docs/local-broker.md. Changelog and version 0.5.0.

Tested live on an EMBER-PS through a local broker with the state keeper:

  • All zones, readings and today's schedule were ready straight away from the retained state, and matched the cloud.
  • A no-op target command was confirmed by the gateway in 0.29 s, without a user ID.

61 tests pass, 8 of them new. They use the gateway's real reports with the IDs replaced. No new flake8 warnings.

🤖 Generated with Claude Code

roberty99 and others added 5 commits November 22, 2026 17:25
Zones, readings and schedules come from the gateway's reports on a local
broker (retained copies under state/ from tools/ember_state_keeper.py,
or live upload/ reports); commands go straight to the gateway. No Ember
account needed. Schedule linking moved to build_zone_programs(), shared
with the cloud code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The gateway often reports only the points that changed; keeping just the
last message lost the rest (found live: no current temperature).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A command sent while the gateway was reconnecting was accepted by the
broker and silently lost (found live: a hot water boost). Commands now
wait up to confirm_timeout for the gateway's report of the changed point
and return False otherwise, without touching the cached zone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without the bridge nobody answers the gateway's regular gettime requests;
it then dropped its connection after about half an hour. Answering them
as the cloud does (downtime, time in ms) kept it connected (45 min, 5
requests answered, live).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@roberty99
roberty99 merged commit a2a22a7 into master Nov 22, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant