DCC/MQTT Light Decoder Library U2.9 INA226
=====================================

Requires:
- ESP32
- ProjectUNION Core 0.3.1, ProjectUNION MQTT 0.3.1 and ProjectUNION DCC 0.3.0
- NmraDcc
- PubSubClient
- FastLED
- Adafruit GFX
- Adafruit SSD1306

Hardware:
- DCC input: GPIO26
- Setup button: GPIO27, hold 3 seconds during startup
- OLED SDA/SCL: GPIO32 / GPIO33
- Strip A: GPIO5
- Strip B: GPIO18
- Strip C: GPIO19
- Strip D: GPIO21
- Strip E: GPIO22
- Up to 50 LEDs per strip

ProjectUNION owns:
- WiFi, setup hotspot, hostname and mDNS
- common web layout and firmware update
- MQTT broker, TLS, reconnect and test
- DCC parser, address correction and diagnostics

Light Decoder owns:
- input mode: DCC, MQTT or both
- five WS2812 strips
- 20 colour/effect modes
- per-LED address and brightness
- random-house function
- OLED pages
- mapping of DCC/MQTT addresses to LEDs

Legacy migration:
- WiFi is read from namespace: wifi
- decoder configuration is read from namespace: dcc-led
- MQTT settings and base topic are migrated
- old configuration is not deleted

MQTT topic format:
  <base topic>/<address>/set

Payload:
  2 / ON / TRUE / HIGH = ON
  1 / 0 / OFF / FALSE / LOW = OFF

Recommended first test:
1. Upload by USB
2. Verify WiFi and hostname
3. Verify strip counts and LED configuration
4. Test one LED from the web page
5. Verify DCC packet counter and switching
6. Verify MQTT connection and switching
7. Check compiled flash usage


Changes in U2.1 Modular
-----------------------
- Updated for the modular ProjectUNION architecture.
- Uses ProjectUNION Core 0.3.1.
- Uses ProjectUNION MQTT 0.3.1.
- Uses ProjectUNION DCC 0.3.0.
- MQTT, DCC, OLED, WS2812 effects, web configuration and OTA are unchanged.


Changes in U2.2 Language
------------------------
- Project-specific LED-strip, LED-configuration, random-lighting and Status texts translated.
- Danish, English and German supported.
- No ProjectUNION libraries were changed.
- No functional changes.


U2.7 INA226:
- INA226 power monitor at I2C address 0x40 on SDA GPIO32 / SCL GPIO33.
- External 0.022 ohm shunt used in parallel with module R100 (0.100 ohm), effective approx. 0.01803 ohm.
- Voltage, current and power shown on OLED and Status page.
- Initial current calibration factor = 1.000; calibrate later against ammeter.


U2.7 changes:
- Selected LED strip A-E is highlighted clearly.
- Added All on / All off buttons on LED configuration page.
- LED test buttons now use AJAX, so the page no longer reloads or jumps to the top.

U2.7 fix:
- Individual LED test control changed from anchor link to type=button.
- Prevents the AJAX click from being followed by the original /preview navigation, which toggled the LED twice.

U2.8 changes:
- LED configuration: brightness percentage is shown below each slider.
- Percentage updates immediately while the slider is moved, without page refresh.

U2.9 change:
- MQTT menu is always visible, also when input mode is set to DCC only.
