Skip to content

Ha integration#1

Open
andy-81 wants to merge 17 commits intologicethos:mainfrom
andy-81:HAIntegration
Open

Ha integration#1
andy-81 wants to merge 17 commits intologicethos:mainfrom
andy-81:HAIntegration

Conversation

@andy-81
Copy link
Copy Markdown

@andy-81 andy-81 commented Apr 7, 2026

No description provided.

andy-81 and others added 17 commits March 28, 2026 16:18
Replacing with updated code to respond to Octopus better as well as sending the details regularly like Octopus ask for.
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
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.

2 participants