Open
Conversation
Replacing with updated code to respond to Octopus better as well as sending the details regularly like Octopus ask for.
Replacing ChargerClient.cs
MeterSample lives in the OcppSimulator namespace but the using directive was absent, causing the build to fail with CS0246. https://claude.ai/code/session_01WMUoER43pGRCgJxTkar5wc
OCPP 1.6 schema only accepts "Hertz" in the UnitOfMeasure enum; "Hz" is not a valid value and the server was rejecting every MeterValues message that included the Frequency measurand. https://claude.ai/code/session_01WMUoER43pGRCgJxTkar5wc
…shot OCPP 1.6 StopTransaction.req supports a transactionData field containing a final meter snapshot with context "Transaction.End". Wallbox chargers include this so the CSMS (Octopus) can confirm the total energy delivered and verify the charging target was reached. Without it, Octopus cannot reconcile the session and reports "Charge unsuccessful". The measurands are taken from StopTxnSampledData config, falling back to MeterValuesSampledData, then Energy.Active.Import.Register. https://claude.ai/code/session_01WMUoER43pGRCgJxTkar5wc
Current.Offered should report what the charger is offering the vehicle (the limit set by Octopus via ChangeConfiguration chargingALimitConn1), not the actual charging current. Power.Offered is derived from that same offered current × NominalVoltage rather than falling back to actual import power. Also fixed Current.Import to use actual measured current rather than the HA-provided CurrentAmpsOffered field (which is the offered limit, not the draw). Priority chain: - Current.Offered: HA override → chargingALimitConn1 → MaxCurrentAmps (32A) - Power.Offered: HA override → offeredAmps × 230V / 1000 - Current.Import: HA power / 230V → simulated current https://claude.ai/code/session_01WMUoER43pGRCgJxTkar5wc
…porting Current.Import now uses ext.CurrentAmpsImport from HA directly, falling back to the simulated current. Previously it derived amps from PowerKwImport which was a workaround. HA can now POST currentAmpsImport to /api/meters. https://claude.ai/code/session_01WMUoER43pGRCgJxTkar5wc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.