Update docs and firmware for ESPHome bridge migration

- Replace gauge.py (MicroPython) references with gaugecontroller.yaml (ESPHome)
- Update CLAUDE.md and README.md to document ESPHome-native API integration
- Update LED wiring docs for separate main/indicator strips (D22/D36)
- Refactor Arduino firmware to drive two WS2812 strips independently
- Add per-gauge physical offset caching for main and indicator LEDs
- Frame-limit breathe effect (16ms) to reduce unnecessary strip refreshes
This commit is contained in:
2026-04-29 19:03:22 +02:00
parent 361cf52252
commit 8bdae1da9b
13 changed files with 130 additions and 72 deletions

View File

@@ -7,7 +7,7 @@ A dedicated gauge controller for Arduinos.
This repository contains:
- `Gaugecontroller/Gaugecontroller.ino`: the Arduino Mega firmware for the stepper gauges, LEDs, and integrated HV5812-based VFD
- `gauge.py`: the ESP32 / MicroPython MQTT bridge that exposes the controller to Home Assistant
- `gaugecontroller.yaml`: the ESPHome-based ESP32 firmware that exposes the gauges and VFD to Home Assistant via the native API
## VFD Support
@@ -48,16 +48,19 @@ Rules:
- shorter values are right-aligned
- leading zeroes are preserved if they are part of the input
## Home Assistant Entities
## Home Assistant Integration
The MQTT bridge publishes Home Assistant discovery entities for the VFD:
The ESPHome firmware in `gaugecontroller.yaml` exposes entities to Home Assistant via the native API:
- `VFD Display`
text entity for the displayed value
- `VFD Decimal Point`
switch entity
- `VFD Alarm`
switch entity
### Gauge Controls
- Number entities for each gauge's target value (with unit conversion)
- Number entities for speed and acceleration (diagnostic)
- Rezero buttons for each gauge and all gauges
### VFD Display
- `VFD Display`: text entity for the displayed value
- `VFD Decimal Point`: switch entity
- `VFD Alarm`: switch entity
The display is intentionally exposed as a text entity rather than a numeric entity so that:
@@ -65,27 +68,12 @@ The display is intentionally exposed as a text entity rather than a numeric enti
- hexadecimal values like `DEAD` or `BEEF` work
- clearing the display is possible with an empty value
## MQTT Topics
### LED Controls
- RGB light entity for each gauge's backlight with effects (Blink, Breathe, Double Flash)
- Binary light entities for each gauge's red/green indicators and status lights
Using the configured `mqtt_prefix` from `config.json`, the VFD topics are:
- `<prefix>/vfd/set`
- `<prefix>/vfd/state`
- `<prefix>/vfd/decimal_point/set`
- `<prefix>/vfd/decimal_point/state`
- `<prefix>/vfd/alarm/set`
- `<prefix>/vfd/alarm/state`
Example with the default prefix `gauges`:
- `gauges/vfd/set`
- `gauges/vfd/decimal_point/set`
- `gauges/vfd/alarm/set`
Example payloads:
- publish `0123` to `gauges/vfd/set`
- publish `ON` to `gauges/vfd/decimal_point/set`
- publish `OFF` to `gauges/vfd/alarm/set`
The MQTT bridge then converts that into the correct Arduino serial command such as `VFD 0123.`.
### Diagnostics
- WiFi signal sensor
- Uptime sensor
- IP address and SSID text sensors
- Arduino Last Message sensor