feat: bootstrap wiki for Anfu home EV charger OCPP integration project

- Created initial wiki structure with CLAUDE.md schema, index.md, and log.md.
- Ingested findings and requirements document into the wiki.
- Added concepts for authorization methods, network topology, OCPP protocol, and troubleshooting.
- Documented entities including the Anfu charger, JC-6620 controller, and CSMS toolkit.
- Established configuration files for Obsidian app settings and workspace layout.
- Implemented core plugins and appearance settings for the wiki.
This commit is contained in:
2026-07-09 15:29:26 +02:00
commit 2e5960fae3
26 changed files with 1431 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
---
type: concept
updated: 2026-07-09
tags: [auth, requirements]
---
# Authorization Methods
The three planned ways to authorize a charging session. Architecturally they all collapse to one gate: **`decide(id_tag)` in `station.py`** ([[csms-toolkit]]) returns Accepted/Rejected against the allowlist in `station_config.json`. Per [[2026-07-09-findings-and-requirements]]:
## 1. RFID cards — ✅ mechanism built, enrollment pending
Use the cards already owned. Flow: enable learn mode → tap each card once → harvest its idTag from `seen_tags.json` → add to `authorized` with a name (`kind: "card"`) → set `learn_mode=false` to enforce.
## 2. By vehicle / chassis — ⚠️ needs a physical test
True VIN-based **ISO 15118 Plug & Charge is unlikely** on a basic AC unit. The realistic option is **Autocharge**: some chargers automatically send a per-vehicle idTag when a car plugs in, no card tap needed.
**The test:** plug the car in *without* tapping a card. If a stable idTag shows up in `seen_tags.json`, whitelist it as `kind: "car"` and "by vehicle" works. If nothing appears, this method is not achievable on the [[anfu-charger|Anfu hardware]] — drop it.
## 3. Mobile / web app — 📋 to build
A mobile-friendly web control panel (no app store):
- Start/Stop via OCPP `RemoteStartTransaction` / `RemoteStopTransaction`
- Live charger status
- Clickable allowlist management
- Bound to `0.0.0.0`, reached only over [[netbird|NetBird]]; optional PIN/token for defense-in-depth (❓ open decision, see [[overview]])
+26
View File
@@ -0,0 +1,26 @@
---
type: concept
updated: 2026-07-09
tags: [network]
---
# Network Topology
How the [[anfu-charger|charging pile]]'s internal network sits behind the household network. Per [[2026-07-09-findings-and-requirements]]:
```
10.0.10.0/24 (upstream / WAN — main gateway lives here)
│
┌──┴────────────────┐
│ Four-Faith router │ WAN gets a 10.0.10.x address; NAT boundary
└──┬────────────────┘
│ LAN = 192.168.2.1 (mask 255.255.255.0)
├── 192.168.2.228 JC-6620 OCPP controller ← the OCPP client
├── 192.168.2.118 EV charging controller (main board), DHCP
└── 192.168.2.114 maintenance PC (LAN side)
```
- Wiring is the manufacturer's **star** topology: the EV controller and the [[jc-6620|JC-6620]]'s fixed-IP (right) port each plug into a router LAN1–4 port.
- **Traffic direction matters:** the JC-6620 dials *outbound* to the CSMS, so NAT just works — ✅ no port-forwarding needed on the Four-Faith router. Port-forwarding would only matter for inbound connections, which don't occur.
- A CSMS can live either on the charger LAN (`192.168.2.x`) or upstream on the WAN subnet (`10.0.10.x`) — both ✅ verified — **provided** the JC-6620's default gateway is `192.168.2.1` (it shipped pointing at itself; see [[troubleshooting]]).
- The CSMS host itself must allow inbound TCP 9000 and keep a stable IP (see [[csms-toolkit]]).
+20
View File
@@ -0,0 +1,20 @@
---
type: concept
updated: 2026-07-09
tags: [protocol]
---
# OCPP 1.6J
**Open Charge Point Protocol**, version 1.6, JSON variant ("J") — the protocol between a charge point and its backend (**CSMS**, Charging Station Management System). Messages are JSON frames over a WebSocket that the *charge point* opens toward the CSMS.
How it maps onto this project:
- **Charge point / client:** the [[jc-6620|JC-6620]] inside the [[anfu-charger|Anfu pile]]
- **CSMS / server:** the [[csms-toolkit]] scripts, listening on `ws://0.0.0.0:9000/<chargePointId>`
- **Messages in play so far:**
- `BootNotification` — ✅ full exchange verified in both LAN and WAN setups (per [[2026-07-09-findings-and-requirements]])
- `Authorize` — carries the idTag that `decide(id_tag)` accepts/rejects; the heart of [[authorization]]
- `RemoteStartTransaction` / `RemoteStopTransaction` — the CSMS-initiated calls the future web panel will use
Because the charge point is always the connecting party, the CSMS needs a reachable, stable address — but the charger network needs no inbound rules (see [[network-topology]]).
+19
View File
@@ -0,0 +1,19 @@
---
type: concept
updated: 2026-07-09
tags: [troubleshooting, gotchas]
---
# Troubleshooting Checklist
Hard-won gotchas from getting the first connection working. **If the charger "never connects," check these in order.** Per [[2026-07-09-findings-and-requirements]]:
1. **CSMS host firewall** — inbound TCP 9000 must be allowed. Windows silently drops otherwise; looks identical to "charger never dials."
2. **`Billing Mode` must be `BackgroundBilling`** — until it is, the [[jc-6620|JC-6620]] never dials out *at all* (zero TCP SYNs on the wire). This was the blocker for the very first connection.
3. **`Communication Method` must be `Ethernet`** — not 4G/SIM.
4. **Power-cycle after changes** — URL / network changes on the [[anfu-charger|touchscreen]] only take effect after power-cycling the pile.
5. **JC-6620 default gateway must be `192.168.2.1`** — it shipped as `192.168.2.228` (itself). Symptom: a same-subnet (`192.168.2.x`) CSMS works but an off-subnet (`10.0.10.x`) one silently doesn't.
6. **No port-forwarding needed** — the JC-6620 is the client and dials outbound; see [[network-topology]]. Don't waste time on the router's forwarding rules.
7. **CSMS host IP must be stable** — the touchscreen URL is hardcoded; a DHCP-shifted host looks like a dead CSMS.
Diagnostic ladder (from [[csms-toolkit]]): `rawlisten.py` (do *any* bytes arrive?) → `csms.py` (does OCPP handshake complete?) → `station.py` (full controller).