v2.2.0
What's new in v2.2.0
End-to-end TX power telemetry with two hardware variants and boot-time auto-detect — the system now tells you not just how much battery is left, but whether the panel is harvesting, how many mA are flowing, and how much power your TX is actually drawing.
Hardware variants (TX)
- Variant A — voltage divider only (legacy, simplest BOM): VBAT → 100k → ADC → 100k → GND on GPIO0.
- Variant B — INA219 over I²C: bidirectional shunt sensor in the battery+ lead. Bus voltage from register 0x02, signed shunt current from 0x01, power computed as V·I in software (no calibration register needed). Default I²C address 0x40 on GPIO1 (SDA) / GPIO2 (SCL).
Both variants run the same firmware binary. At boot the TX probes 0x40 — if found, INA219 mode; otherwise falls back to ADC. An NVS-stored override (pwr_mode_ovr = auto / voltage / ina219 / disabled) lets you force a specific mode via the TX's wifi-OTA web UI (5s button hold → connect to TankSync-<addr> AP → SETTINGS card has a Power Sensor dropdown).
LoRa packet format (forward-compatible)
TANK:<dist>:<bat_pct>:<bat_v>:<msg_id>:<fw_version>:<MODE>:<CURR>:<POW>
Where MODE is a single char (v / i / n), CURR is signed mA (positive = discharging, negative = charging), POW is signed mW. Older RXs ignore the new optional fields; older TXs send 5 fields and new RXs default to ?/0/0. Old/new mix works in any direction.
RX changes (DevKit + C3 SuperMini)
lora_rx_packet_tand the per-TXtx_data_tregistry extended withpower_mode,current_ma,power_mw,charging.GET /api/transmittersJSON exposes the new fields per TX.- MQTT publishes 4 new HA-style sub-topics per tank:
tanksync/<slug>/power_mode(string),.../current_ma(signed int),.../power_mw(signed int),.../charging(ON/OFF). Skipped for unknown mode (pre-v2.0.4 TX).
Hardware docs + BOM
hardware/wiring.md— canonical wiring reference for both RX targets and TX (Variant A + Variant B), with full power chain (panel → CN3791 MPPT → 18650 → MT3608 boost → 5V rail).hardware/BOM.csv— replaced TP4056 (linear, wrong for solar) with CN3791 MPPT charger for proper solar harvesting under variable Indian sun. Two SKU totals listed: Variant A and Variant B.
Firmware versions
| Component | Version |
|---|---|
| Transmitter (ESP32-C3 SuperMini) | 2.0.4 |
| Receiver — ESP32 DevKit | 2.2.0 |
| Receiver — ESP32-C3 SuperMini | 2.2.0 |
Backward compatibility
- New TX → old RX: works (extra fields ignored).
- Old TX → new RX: works (defaults populated).
- New RX → existing PWA / Home Assistant: power topics added cleanly alongside existing ones; old subscribers unaffected.
Firmware Binaries
| Binary | Board | Description |
|---|---|---|
| `tanksync-receiver-v2.2.0.bin` | ESP32 DevKit | Receiver firmware |
| `tanksync-receiver-c3-v2.2.0.bin` | ESP32-C3 SuperMini | Receiver firmware (C3 variant) |
| `tanksync-transmitter-v2.2.0.bin` | ESP32-C3 SuperMini | Transmitter firmware |
Flashing
```bash
Receiver (ESP32 DevKit)
esptool.py --chip esp32 -b 460800 write_flash 0x10000 tanksync-receiver-v2.2.0.bin
Receiver (ESP32-C3 SuperMini)
esptool.py --chip esp32c3 -b 460800 write_flash 0x10000 tanksync-receiver-c3-v2.2.0.bin
Transmitter (ESP32-C3 SuperMini)
esptool.py --chip esp32c3 -b 460800 write_flash 0x10000 tanksync-transmitter-v2.2.0.bin
```
Or use OTA update via the receiver's web UI.
Full Changelog: v2.1.0...v2.2.0