Skip to content

feat(zap): treat Zap as the P1/HAN meter only - #82

Merged
frahlg merged 1 commit into
mainfrom
zap/p1-han-meter-signed
Aug 13, 2026
Merged

feat(zap): treat Zap as the P1/HAN meter only#82
frahlg merged 1 commit into
mainfrom
zap/p1-han-meter-signed

Conversation

@frahlg

@frahlg frahlg commented Aug 13, 2026

Copy link
Copy Markdown
Member

Summary

  • Zap 3.0.0 is the P1/HAN site meter for FTW. It no longer ingests PV, battery or V2X from devices attached to the gateway.
  • If Zap lists an inverter, battery or charger, the driver logs that and emits other_resources so the operator adds those devices in FTW with their own drivers.
  • disable_pv / disable_battery / disable_v2x are gone because those DERs are no longer read.

People have been adding an inverter to Zap and then using the Zap integration in FTW as a proxy. That is unnecessary and not recommended.

Replaces #81 (DCO: the first commits lacked Signed-off-by).

Breaking

Sites that used Zap as the only path for an inverter, battery or charger lose that telemetry until they add the native FTW driver.

Test plan

  • make test-driver ID=zap
  • Full driver/test suite: 3571 passed
  • FTW pin move after this merges

FTW must not ingest inverters, batteries or chargers through Zap.
Those devices belong in FTW with their own drivers. If Zap lists
any of them, the driver now says so and leaves them unread.

BREAKING CHANGE: sites that used Zap as a proxy for PV, battery or
V2X lose that telemetry until they add the native driver.

Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
@frahlg
frahlg merged commit 4fb8608 into main Aug 13, 2026
6 checks passed
@frahlg
frahlg deleted the zap/p1-han-meter-signed branch August 13, 2026 07:33

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6a54a1831a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread manifests/zap.yaml
Comment on lines +15 to +16
notes: "P1/HAN site meter from a Sourceful Zap. Inverters, batteries and chargers found on Zap must be added in FTW with their own drivers."
min_driver_version: "3.0.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Record the Zap API under upstream_docs

The rewritten driver explicitly depends on the Zap Local API, but the updated manifest still omits upstream_docs. This prevents the repository's weekly watcher from detecting changes or disappearance of the API contract that defines these discovery and meter payloads; add the durable API-reference URL already named in drivers/lua/zap.lua.

AGENTS.md reference: AGENTS.md:L60-L66

Useful? React with 👍 / 👎.

Comment thread drivers/lua/zap.lua
Comment on lines +239 to +242
local msg = other_resources_message(other_resources)
if msg and not warned_other then
host.log("warn", "Zap: " .. msg)
warned_other = true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Re-warn when the discovered resource set changes

When a site already has an extra resource at startup and later attaches a different inverter, battery, or charger, periodic discovery updates other_resources but this process-wide boolean remains true, so the new resource is never named in the operator log. The emitted metric contains only a count—which can remain unchanged when one resource type replaces another—so the operator receives no actionable instruction for the newly discovered device; suppress only repeated warnings for an unchanged resource set.

Useful? React with 👍 / 👎.

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