Skip to content

fix: reserve EV pulse on-power and stop cold-start house load - #1227

Merged
frahlg merged 2 commits into
masterfrom
fix/live-plan-load-and-battery-20260913
Sep 13, 2026
Merged

frahlg merged 2 commits into
masterfrom
fix/live-plan-load-and-battery-20260913

Conversation

@frahlg

@frahlg frahlg commented Sep 13, 2026

Copy link
Copy Markdown
Member

Reserve EV on-power on the fuse, keep forecast learning across charger packaging, overlay live house load on the current slot, and treat both-zero battery watts as 0.5C. Companion Energyplan 0.4.4 is on fix/ev-target-duty-and-shared-fuse.

Copy LoadpointMaxPowerW through the plan adapter so fuse sharing
reserves the charger on-step, not Wh/slot. Keep house and PV
forecast learning when only a charger package changes. Overlay live
house load on the current planning slot. Treat both-zero battery
watts as the same 0.5C limit in dispatch. Say when charging waits
because the ready time has passed.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 13, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-13T08:56:40.273117Z fa1daae PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

switch flow.DerType {
case telemetry.DerMeter, telemetry.DerPV, telemetry.DerBattery:

P2 Badge Preserve charger measurement changes in the learning revision

When an EV/V2X Lua update changes how charger watts are decoded—or its driver configuration changes measurement scaling—this filter excludes that driver from both Drivers and Scripts in baseRevision. ForecastMeasurement nevertheless subtracts DerEV and DerV2X power when deriving HouseholdW, so observations learned under the old decoding are reused with new readings rather than rebinding the model; exclude only packaging-only inputs while retaining measurement-affecting charger inputs in the hash.

AGENTS.md reference: AGENTS.md:L42-L48


if s == nil || s.Tele == nil || s.SiteMeter == "" || !s.driverOnline(s.SiteMeter) {
return 0, false
}
m := s.Tele.Get(s.SiteMeter, telemetry.DerMeter)

P2 Badge Snapshot SiteMeter under the service mutex

During config hot reload, SetSiteMeter writes this field under s.mu while scheduled or reactive replanning calls this helper without the mutex. These repeated reads race with the write and can also use different driver names for the health check and telemetry lookup; take one SiteMeter snapshot under RLock before accessing telemetry.

AGENTS.md reference: AGENTS.md:L84-L88


def host_key():
machine = {"aarch64": "arm64", "arm64": "arm64", "x86_64": "amd64", "amd64": "amd64"}.get(platform.machine().lower())
key = f"{platform.system().lower()}-{machine}"
return key if key in KNOWN_PLATFORMS else None

P2 Badge Verify an optional host artifact exists before selecting it

On an arm64 Mac with a valid Linux-only bundle, which verify_bundle and test_linux_only_bundle explicitly allow, host_key now returns darwin-arm64; main then indexes the absent manifest["artifacts"][host] and exits with a KeyError. Check that the detected host is present in the verified manifest so an omitted optional worker remains a supported unavailable state rather than breaking native-solver-check and native-solver-test.

AGENTS.md reference: AGENTS.md:L53-L56

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

The worker duty-cycles a binary charger remainder below a full step
and returns a feasible plan with shortfall when two EVs share a tight
import limit. Source commit 7251b348fe5bfec38104288f967fcc65732933d4.
@frahlg
frahlg merged commit fc1c7af into master Sep 13, 2026
17 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