This document tracks all differences between this fork (basmeerman/SmartEVSE-3.5) and the upstream repository (dingo35/SmartEVSE-3.5).
For feature details and configuration, see Features.
These are structural changes that affect the entire codebase — not specific features.
| Change | Upstream state | Fork state |
|---|---|---|
| State machine location | Inline in main.cpp (~3,000 lines) |
Extracted to evse_state_machine.c (pure C) |
| State representation | ~70 scattered globals | evse_ctx_t context struct |
| Hardware abstraction | Direct GPIO calls in logic | Function pointers via HAL callbacks |
| Global synchronization | No protection | evse_bridge.cpp with spinlock/mutex |
| Native testability | Not possible (Arduino dependencies) | 1,096 tests compile with plain gcc |
| CI pipeline | PlatformIO build only | 10-job pipeline (tests, sanitizers, valgrind, cppcheck, builds, BDD, traceability, OCPP, Modbus) |
| Test methodology | None | Specification-by-Example (SbE) with traceability |
Addresses upstream issues #327, #335, #316.
| Improvement | Why | Details |
|---|---|---|
| EMA current smoothing | Oscillation in smart/solar modes | Features: Solar & Smart Mode |
| Dead band regulation | Micro-adjustments cause unnecessary switching | Features: Solar & Smart Mode |
| Symmetric ramp rates | Overshoot/undershoot from asymmetric regulation | Features: Solar & Smart Mode |
| Tiered phase switching timers | Rapid 1P/3P cycling | Features: Solar & Smart Mode |
| Stop/start cycling prevention | Solar mode stops and restarts unnecessarily | Features: Solar & Smart Mode |
| Multi-node SolarStopTimer fix | Upstream threshold scales with ActiveEVSE, unreachable for 2+ nodes (commit 94ca08e) |
PR #119 |
| Slave mode sync via setMode() | Upstream SETITEM(MENU_MODE) skips phase switching and error clearing on slaves |
PR #121 |
| Slow EV compatibility | Renault Zoe stalls on rapid current changes | Features: Solar & Smart Mode |
Addresses upstream issue #316.
| Improvement | Why | Details |
|---|---|---|
| Oscillation dampening | Current hunting between nodes | Features: Load Balancing |
| EMA filter on Idifference | Measurement noise causes false triggers | Features: Load Balancing |
| Distribution smoothing | Sudden jumps stress contactors and EV controllers | Features: Load Balancing |
| Diagnostic snapshot | No visibility into load balancing decisions | Features: Load Balancing |
| 126 convergence tests | Algorithm changes blocked by regression risk | Features: Load Balancing |
| Improvement | Why | Details |
|---|---|---|
| RFID toggle bug fix | Next RFID swipe toggles OFF instead of ON after Tesla disconnect | Features: OCPP & Authorization |
| Bridge transaction mutex | Daily OCPP session failures from concurrent task corruption | Features: OCPP & Authorization |
| Pure C OCPP logic extraction | OCPP logic untestable (85 tests added) | Features: OCPP & Authorization |
| LoadBl exclusivity enforcement | OCPP limits silently ignored when LoadBl toggled at runtime | Features: OCPP & Authorization |
| FreeVend solar safety | Auto-authorize bypasses solar surplus checks | Features: OCPP & Authorization |
| OCPP settings validation | Invalid URLs/IDs accepted silently | Features: OCPP & Authorization |
| OCPP connection telemetry | No diagnostics for connection drops | Features: OCPP & Authorization |
| IEC 61851 → OCPP status mapping | EVCC integration needs standard status codes | Features: OCPP & Authorization |
Addresses upstream issues #320, #294, PR #338.
| Improvement | Why | Details |
|---|---|---|
| Change-only publishing | 70-97% MQTT message reduction | Features: MQTT & HA |
| Fixed HA discovery payloads | Corrupted long-term statistics | Features: MQTT & HA |
| Energy zero-value guard | Phantom consumption in HA dashboard | Features: MQTT & HA |
| Entity naming cleanup | HA 2025.10+ compatibility | Features: MQTT & HA |
| New entities | Missing diagnostics (FreeHeap, MQTTMsgCount, etc.) | Features: MQTT & HA |
| Per-phase power/energy via MQTT | No per-phase visibility | Features: MQTT & HA |
| Metering diagnostic counters | No insight into meter communication health | Features: MQTT & HA |
| Improvement | Why | Details |
|---|---|---|
| Orno WE-517/516 meter support | Community-requested meters | Features: Metering |
| Pure C Modbus frame decoder | Modbus logic untestable | Features: Metering |
| Pure C meter byte decoder | 30 test scenarios for all endianness/data types | Features: Metering |
| Pure C HomeWizard P1 parser | P1 parsing untestable | Features: Metering |
| Meter telemetry counters | No visibility into communication errors | Features: Metering |
| Modbus frame event logger | No debugging capability for Modbus issues | Features: Metering |
| API/MQTT staleness detection | Stale API data causes incorrect charging | Features: Metering |
| HomeWizard P1 energy data | HA energy dashboard incomplete | Features: Metering |
| HomeWizard P1 manual IP fallback | mDNS unreliable on some networks | Features: Metering |
| Improvement | Why | Details |
|---|---|---|
| IEC 61851-1 state mapping | EVCC needs standard state letters (A-F) | Features: EVCC |
| Phase switching via HTTP | EVCC needs to control 1P/3P switching | Features: EVCC |
| Charging state derivation | EVCC needs charging_enabled boolean |
Features: EVCC |
| Ready-to-use EVCC template | No documentation for EVCC setup | Features: EVCC |
| Feature | Purpose | Details |
|---|---|---|
| Ring buffer event capture | Captures state machine events, errors, meter readings | Features: Diagnostics |
| LittleFS persistence | Diagnostics survive reboots | Features: Diagnostics |
| WebSocket live stream | Real-time diagnostic viewer in web UI | Features: Diagnostics |
| Test replay framework | Replay recorded sessions through test suite | Features: Diagnostics |
| MQTT profile control | Remote diagnostic capture control | Features: Diagnostics |
| Feature | Purpose | Details |
|---|---|---|
| Charge session tracking | Automatic per-charge session recording | Features: ERE |
| ERE-compatible output | Dutch ERE certificate submission format | Features: ERE |
| MQTT session publish | Retained JSON on session complete | Features: ERE |
| REST endpoint | GET /session/last for integrations | Features: ERE |
| Zero flash wear | MQTT-only persistence, no flash writes | Features: ERE |
| Feature | Purpose | Details |
|---|---|---|
| 15-minute quarter-peak averaging | Matches Belgian DSO metering interval | Features: Capacity Tariff |
| Monthly peak tracking | Records highest 15-min average per month | Features: Capacity Tariff |
| Automatic current reduction | Clamps IsetBalanced to stay under limit | Features: Capacity Tariff |
| LCD/Web/MQTT/REST configuration | Full configuration from all interfaces | Features: Capacity Tariff |
| Home Assistant integration | 4 auto-discovered entities | Features: Capacity Tariff |
| Feature | Purpose | Details |
|---|---|---|
| Subpanel breaker protection | Limits EV charging to stay within breaker rating | Features: CircuitMeter |
| ERE 2027 compliance support | Circuit-level energy measurement for Dutch ERE Path B | Features: CircuitMeter |
| Reuses existing Meter class | Supports all 19 meter types with zero new meter code | Features: CircuitMeter |
| MQTT + HA auto-discovery | Circuit current, power, energy, and MaxCircuitMains | Features: CircuitMeter |
| Feature | Purpose | Details |
|---|---|---|
| MQTT SoC topics | InitialSoC, FullSoC, EnergyCapacity, EnergyRequest, EVCCID | Features: MQTT & HA |
| WiCAN OBD-II integration | Direct SoC reading from car CAN bus | MQTT docs: WiCAN |
| Session-scoped values | Auto-clear on EV disconnect | MQTT docs: SoC Injection |
| Improvement | Why | Details |
|---|---|---|
| Offline-first web UI | CDN dependencies break isolated networks | Features: Web |
| WebSocket data channel | HTTP polling is slow and wasteful | Features: Web |
| Dashboard card redesign | Outdated UI | Features: Web |
| Dark mode | Community demand | Features: Web |
| Load balancing node overview | No multi-node visibility | Features: Web |
| Diagnostic telemetry viewer | No way to view diagnostics in browser | Features: Web |
| LCD widget modernization | Old layout, not responsive | Features: Web |
When contributing improvements back to upstream:
- Submit small, focused PRs — dingo35 is conservative about large changes
- Do not bundle test infrastructure with feature changes
- Follow upstream conventions — they may differ from this fork
- Never modify upstream repos without explicit user approval