Skip to content

feat: MQTT SoC injection topics (#112)#115

Merged
basmeerman merged 3 commits intomasterfrom
work/plan-15-mqtt-soc
Mar 25, 2026
Merged

feat: MQTT SoC injection topics (#112)#115
basmeerman merged 3 commits intomasterfrom
work/plan-15-mqtt-soc

Conversation

@basmeerman
Copy link
Copy Markdown
Owner

@basmeerman basmeerman commented Mar 24, 2026

Summary

  • Add Set/InitialSoC, Set/FullSoC, Set/EnergyCapacity, Set/EnergyRequest, and Set/EVCCID MQTT topics to mqtt_parser.c
  • Enables WiCAN OBD-II dongles and Home Assistant automations to inject SoC data via MQTT (previously HTTP-only via POST /ev_state)
  • 26 native tests with full SbE annotations (REQ-SOC-001 through REQ-SOC-026)
  • Plan 15, Increment 1 of 3 (parser only — firmware dispatch in Increment 2)

Closes #112

Test plan

  • All 46 native test suites pass (incl. 26 new mqtt_soc tests)
  • Address + UB sanitizers clean
  • ESP32 firmware build passes (85.6% flash, 23.9% RAM)
  • CH32 firmware build passes (63.5% flash, 20.8% RAM)
  • CI pipeline validates on push

🤖 Generated with Claude Code

basmeerman and others added 3 commits March 24, 2026 17:59
Add Set/InitialSoC, Set/FullSoC, Set/EnergyCapacity, Set/EnergyRequest,
and Set/EVCCID MQTT topics to mqtt_parser.c for WiCAN and Home Assistant
SoC injection. 26 native tests with SbE annotations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…113)

Wire MQTT_CMD_INITIAL_SOC, MQTT_CMD_FULL_SOC, MQTT_CMD_ENERGY_CAPACITY,
MQTT_CMD_ENERGY_REQUEST, and MQTT_CMD_EVCCID_SET to existing SoC variables
in esp32.cpp. Calls RecomputeSoC() after each SoC update.

Guarded with #if MODEM since the SoC variables (InitialSoC, FullSoC,
EnergyCapacity, EnergyRequest, EVCCID) and RecomputeSoC() are only
compiled when MODEM=1 (v4 hardware and CH32 builds).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ent 3) (#114)

Document Set/InitialSoC, Set/FullSoC, Set/EnergyCapacity, Set/EnergyRequest,
and Set/EVCCID MQTT topics. Include WiCAN and Home Assistant automation examples.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@basmeerman basmeerman merged commit e736960 into master Mar 25, 2026
13 checks passed
@basmeerman basmeerman deleted the work/plan-15-mqtt-soc branch March 25, 2026 22:03
basmeerman added a commit that referenced this pull request Mar 25, 2026
- Add Capacity Tariff, CircuitMeter, SoC Injection to Key Features table
- Add Plans 13-15 to Roadmap table (PRs #115, #116, #117)
- Update test stats: 47 suites, 1,046 native tests, 1,200+ total
- Add Plans 13-15 sections to upstream-differences.md
- Update quality.md test metrics
- Update CLAUDE.md priority table and test infrastructure count

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

[Plan-15] Increment 1: MQTT parser SoC topics (Pure C + Tests)

1 participant