3326c8d16c
Ingests the 2026-07-09 live session (source page + raw GetConfiguration dump): charger identified as SimpleCharge MultiSocketCharger, 60 kW DC dual-standard (gun 1 EU/CCS, gun 2 GB/T); RFID and remote start/stop verified; by-vehicle auth closed as not supported (three escalating tests incl. MacEnabled=true after power-cycle); touchscreen-shows-VIN observation with the DataTransferVendorId long-shot lead. Adds/updates: architecture plan (FastAPI + PWA, phases 1-3 done), backend entity, wifi-relays entity (Tuya local-control path + key extraction steps), authorization concept (API user/scope model, per-gun cards), overview, runbook, index, log.
3.0 KiB
3.0 KiB
type, updated, tags
| type | updated | tags | ||
|---|---|---|---|---|
| entity | 2026-07-11 |
|
CSMS Toolkit (../discovering/)
The Python scripts that play the CSMS (backend) side of the ocpp link. Currently discovery/tester-grade; station.py is the seed of the real controller. Per 2026-07-09-findings-and-requirements:
[!warning] Superseded for production (2026-07-11):
station.pywas ported into the backend package (../backend/), which adds allowlist CRUD, optional API token auth, and wifi-relays control.discovering/stays as the discovery/diagnostic toolkit (csms.py,rawlisten.py, fake charge point) — don't runstation.pyand the backend at the same time; both bind port 9000.
| File | Purpose |
|---|---|
csms.py |
Minimal OCPP 1.6J server — accepts everything, logs raw frames. Discovery/tester. |
rawlisten.py |
Dumb TCP listener on :9000 — shows whether any bytes arrive. Fallback diagnostic. |
station.py |
The real controller. Allowlist-based auth + learn mode + hooks for remote start/stop. |
station_config.json |
{ "learn_mode": bool, "authorized": { "<idTag>": {name, kind} } } |
seen_tags.json |
Auto-recorded log of every idTag observed (discovery / Autocharge testing). |
- Runtime: Python venv with
fastapi+uvicorn+ocpp(2026-07-09:station.pymoved from rawwebsocketsto a single FastAPI/uvicorn process — the phase-1 shape from architecture-plan). - Single port 9000: the OCPP WebSocket (
ws://0.0.0.0:9000/<chargePointId>, any path) and the discovery HTTP API share it, so the hardcoded touchscreen URL never changes. - The one gate: every authorization method funnels through
decide(id_tag)instation.py— Accepted/Rejected against the allowlist. - Host requirements: inbound TCP 9000 open (Windows firewall silently drops otherwise — see troubleshooting) and a stable IP, since the anfu-charger URL is hardcoded.
Discovery API (in station.py, docs at http://<host>:9000/docs)
- Auto-interrogation on every charger connect:
GetConfiguration(all keys) +TriggerMessage(StatusNotification)→ saved todiscovery_<id>.json(first real capture: 2026-07-09-discovery-eu092025) - Event journal: every OCPP event (connect/disconnect, boot, status, authorize, start/stop transaction, meter values) is appended as one JSON line to
events.jsonl— permanent, restart-proof, greppable; tail it viaGET /events?limit=N&event=<kind> GET /status(chargers, guns, transactions, auth events) ·GET /tags(seen + authorized)POST /probe·/start·/stop[/{tx}]·/trigger/{status|meter|heartbeat|boot}·/unlock/{connector}·/setconfig?key=&value=- With one charger connected,
?cp=may be omitted. ✅ Verified end-to-end against both a fake charge point and the real charger.
Still to build
The web control panel (remote start/stop, live status, allowlist management) served behind netbird — now on the backend, see overview for the plan and open host decision.