feat(ocpp): simulate Evify's in-stock chargers against the built-in CS - #1203
Conversation
Add sim-ocpp so every OCPP charger Evify currently stocks can dial FTW end-to-end: boot, smart charging, plug, 10 A set, and pause. Tesla Wall Connector is catalogued and skipped because it has no OCPP. Charge Amps, Aura and Zaptec quirks match what core already defends against. Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_2c2a245a-ed9f-4c2d-8e77-8460d032da30) |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bd7d76be6d
ℹ️ 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".
miravoss26
left a comment
There was a problem hiding this comment.
Reviewed sim-ocpp — a new OCPP 1.6J/2.0.1 charge-point simulator that dials FTW's built-in Central System as every OCPP model in Evify's current inventory (12 chargers, Tesla correctly excluded since it has no OCPP).
Correctness: self-contained under go/cmd/sim-ocpp/, no production code paths touched, reuses the existing lorenzodonini/ocpp-go dep already used by go/internal/ocpp — no new dependency. The vendor quirks (Charge Amps ack-but-keep-charging on RemoteStop, Aura's connector-0 rejection + retry on connector 1, Zaptec dialing on its serial) match what core already defends against, and TestEvifyOCPPInventoryE2E actually dials all 12 models against a real local CS and exercises plug → steer → pause, not just unit-level mocks.
One non-blocking nit: stopTx()'s 2.0.1 branch always sends TriggerReasonEVCommunicationLost on Unplug() — that reason reads odd for a clean cable-out (StopAuthorized would be closer). Only matters if a future test starts asserting on TransactionEvent trigger reasons.
Security: local-only by default (127.0.0.1 binds, dev-only basic-auth creds), no secrets in the diff, no new external network destinations, no authz surface touched — it's a test double dialing a local dev server, not a production client.
Safe to merge from my read.
…im-e2e-4cca Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
…im-e2e-4cca Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_5d459b32-73c8-44d6-b733-c6a4a14aabf3) |
…im-e2e-4cca Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_dbc85c86-40a6-475f-ba79-43b5e966a214) |
Add a local OCPP charge-point simulator for the Evify catalogue recorded on 11 September 2026: twelve OCPP models plus a Tesla Wall Connector entry that is skipped because it uses HTTP. It talks to Core's actual OCPP 1.6J and 2.0.1 server, including the modeled Charge Amps, Aura and Zaptec quirks.
The review findings are fixed. The network test now lives in
go/test/e2e, gated byFTW_E2E=1, so ordinary unit tests do not start twelve charge points. Each transaction event gets a new sequence number. Accepted profiles preserve configured response lag; zero elapsed time no longer jumps current to its target.Validation: sequence and lag regression tests fail on the original PR code and pass with the fix.
make verifypasses. The explicit E2E run passes for all twelve models through boot/adoption, plug-in, 10 A profile and 0 A pause, including Aura's connector retry and Zaptec serial identity. An unadopted charger remains pending. After merging #1199 locally, the generated driver snapshot was synced to its new pin before the final verification. Native bundle integrity passes; worker execution is unavailable on this Mac.This is simulator and Core integration evidence. It does not qualify the physical charger models, their firmware or their cloud paths. No production control path, hardware, release or install changed.
Run the bounded integration suite with:
Note
Low Risk
New dev binary, example config, and opt-in E2E tests only; no production OCPP control or install path changes.
Overview
Adds
sim-ocpp, a local OCPP 1.6J / 2.0.1 charge-point client that dials FTW’s built-in Central System as every Evify in-stock OCPP model (twelve units), with Tesla Wall Connector listed in the catalog but skipped (HTTP-only).The
ocppcppackage models boot, transactions, periodic metering, smart-charging profile handling, and simple current/energy physics with configurable lag. Vendor quirks FTW already handles are simulated: Charge Amps remote-stop ACK without stopping, Aura connector-0 profile rejection, absolute profiles without start accepted but ignored, Zaptec identity = serial.make sim-ocppruns all models with-all -plug;make buildemitsbin/sim-ocpp. Localconfig.local.example.yamlturns OCPP on with credentials aligned to the simulator. Docs describe the workflow and theFTW_E2E=1integration tests ingo/test/e2e(full inventory steer/pause, pending quarantine, Aura retry, Zaptec serial).Reviewed by Cursor Bugbot for commit 8e7268d. Bugbot is set up for automated code reviews on this repo. Configure here.