Add OCPP control for the Anker Solix EV charger (Own/Proxy CSMS)
The Anker Solix connector was read-only (cloud monitoring only). Add an
OCPP 1.6J control path with a per-user, cascading control mode:
- off monitoring only (default, unchanged behavior)
- own DriverVault is the charger's Central System (full control)
- proxy DriverVault relays to Anker's cloud and injects commands
New internal/ocpp subsystem (stdlib-only, hand-rolled RFC 6455): a CSMS
with session management, inbound dispatch, and typed control commands
(RemoteStart/Stop, SetChargingProfile current limit, ChangeAvailability,
Reset, UnlockConnector, TriggerMessage, Get/ChangeConfiguration). Own- and
proxy-mode paths are verified end-to-end against a simulated charge point.
The charger connects to /ocpp/{serial}, authenticated with OCPP Basic auth
(serial + a per-charger control token) resolved to the owning user via an
in-memory token index. Control REST endpoints mirror the monitoring ones and
reuse the same cascade gate plus a live-session check. controlMode is a new
cascade field (global -> org -> user) advertised as a select on the plugin.
Frontend: control-mode select + provisioning card in Settings, and a real
Start/Stop/limit/reset control panel in Charging, gated on the active mode.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
367113f538
commit
a1519f6e89
22 files changed
+2850
-11
No files matched your search
@@ -47,6 +47,22 @@
|
||||
"idle": "Not charging",
|
||||
"idleHint": "Plug in at a station to start a session."
|
||||
},
|
||||
"control": {
|
||||
"title": "Charger control",
|
||||
"connected": "Connected",
|
||||
"disconnected": "Offline",
|
||||
"serialPlaceholder": "Charger serial (e.g. A5191-XXXXXXXX)",
|
||||
"refresh": "Refresh",
|
||||
"status": "Connector",
|
||||
"meter": "Energy",
|
||||
"start": "Start charging",
|
||||
"stop": "Stop charging",
|
||||
"limit": "Current limit",
|
||||
"applyLimit": "Apply limit",
|
||||
"clearLimit": "Clear limit",
|
||||
"reset": "Reset charger",
|
||||
"connectHint": "Enter your charger's serial and refresh. The charger must be connected to DriverVault's OCPP backend (set up in Settings → Integrations)."
|
||||
},
|
||||
"stations": {
|
||||
"heading": "Nearby",
|
||||
"count": {
|
||||
@@ -222,7 +238,23 @@
|
||||
"ankerEmail": "Anker account email",
|
||||
"ankerPassword": "Anker account password",
|
||||
"country": "Country",
|
||||
"countryHint": "Two-letter country code of your Anker account (e.g. DE, GB, US)."
|
||||
"countryHint": "Two-letter country code of your Anker account (e.g. DE, GB, US).",
|
||||
"controlMode": "Control mode",
|
||||
"controlModeHint": "How DriverVault controls the charger over OCPP.",
|
||||
"controlOff": "Off (monitoring only)",
|
||||
"controlOwn": "Own CSMS (full control)",
|
||||
"controlProxy": "Proxy CSMS (relay + control)",
|
||||
"controlTitle": "Charger control (OCPP)",
|
||||
"controlOwnHint": "The charger connects directly to DriverVault as its Central System. Point the charger's OCPP backend at the endpoint below.",
|
||||
"controlProxyHint": "DriverVault relays to Anker's cloud and can inject commands. Point the charger's OCPP backend at the endpoint below.",
|
||||
"controlProvisionSteps": "In the Anker app (or the charger's OCPP settings), set the OCPP backend URL to the endpoint and the authorization key to the token above.",
|
||||
"chargerSerial": "Charger serial",
|
||||
"controlCheck": "Check status",
|
||||
"controlGenerate": "Generate token",
|
||||
"controlEndpoint": "OCPP endpoint",
|
||||
"controlToken": "Auth token",
|
||||
"controlConnected": "Connected to control backend",
|
||||
"controlDisconnected": "Not connected"
|
||||
},
|
||||
|
||||
"privacy": {
|
||||
|
||||
Reference in new issue
Block a user