Skip to content

fix(app): show EV charging instead of folding it into the house - #965

Merged
frahlg merged 1 commit into
masterfrom
ev-live-split-from-faulted-charger
Aug 20, 2026
Merged

fix(app): show EV charging instead of folding it into the house#965
frahlg merged 1 commit into
masterfrom
ev-live-split-from-faulted-charger

Conversation

@frahlg

@frahlg frahlg commented Aug 20, 2026

Copy link
Copy Markdown
Member

Summary

A charger that is still drawing but cannot take a command was treated as offline for live power. The LAN page still showed the car; the phone app showed 0 W EV and house+car as house, and the battery could discharge into the car with cover-EV off.

  • Count watchdog-live EV/V2X telemetry for the app snapshot, the house/car split, and BatteryCoversEV.
  • StatusOffline still drops a stale last-known reading.
  • Settings → FTW app now says this is not the Sourceful (Zap) app, and that LAN use needs no pairing.

The phone UI overlay already shipped in srcfl/ftw-webapp#51 / #52. This is the box-side source of truth.

Test plan

  • go test on cmd/ftw, internal/telemetry, internal/control
  • make verify (pre-commit)
  • app-link tab copy test
  • On a site with a charging EV whose driver is in device-fault: LAN and the app stream both show EV kW, house is house-only, battery does not dump into the car when cover-EV is off.

A charger that is still drawing but cannot take a command was treated as
offline for live power. The LAN page still showed the car; the phone app
showed 0 W EV and house+car as house, and the battery discharged into the
car with cover-EV off.

Count watchdog-live EV/V2X telemetry for the app snapshot, load split, and
BatteryCoversEV. StatusOffline still drops a stale last-known reading.

@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: 135bcec1e0

ℹ️ 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".

}
h, ok := s.health[r.Driver]
if !ok || !h.IsOnline() {
if !ok || !h.TelemetryLive() {

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 Exclude uncommandable EV draw from the surplus budget

When a DeviceFault charger is still drawing, this now includes its power in every SumOnlineEVW caller, including main.go's SetSiteSurplusForEV calculation -gridW + batW + evW. That formula adds EV draw back because it assumes the controller can reduce or redistribute that draw, but SetDriverOnline separately prevents dispatch to the faulted charger. With a faulted/unmanaged charger drawing alongside a healthy surplus-only loadpoint, the faulted draw is therefore reported as reclaimable PV surplus and the healthy charger can be commanded to import that amount from the grid, breaking the surplus-only guarantee. Keep the telemetry-inclusive sum for display and battery protection, but use a control-online EV sum for this reclaimable-surplus calculation.

Useful? React with 👍 / 👎.

@frahlg
frahlg merged commit 77c9514 into master Aug 20, 2026
14 checks passed
@frahlg
frahlg deleted the ev-live-split-from-faulted-charger branch August 20, 2026 11:10
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