Add Home Assistant controls over MQTT

Upgrade ArduinoHA from 1.3.0 to 2.1.0 and rewrite mqtt.ino for it.
The clock now shows up in Home Assistant (discovery prefix
"homeassistant") with:
- switches Tubes (blank the display, runtime only) and Auto dim
- numbers Day/Night brightness
- light Backlight (on/off, brightness, RGB mapped to the colour wheel)
- select LED effect, button Cathode protect
- sensors Light (LDR) and WiFi signal, plus the upstream sensors when
  the clock has them; master-clock subscriptions are kept

Settings changed from HA are saved to EEPROM 3 s after the last change.
Fixes the unbounded memcpy in the MQTT message handler.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mangavalkandClaude Opus 5.5 committed 2026-10-25 21:37:25 +01:00
1 parent 0d3e878051
commit 9a7061383c
108 files changed
+11482 -6567

No files matched your search

+2
View File
@@ -7,6 +7,8 @@ Peter Gautier (GPL-3.0-or-later), vendored from upstream commit `1189810` (2026-
It keeps the upstream layout, so it still opens in the Arduino IDE.
- `lib/`: the library versions bundled upstream (`libraries/*.zip`), only those the ESP8266 build
needs. The upstream manuals, datasheets, photos and ESP32-only libraries were left out.
Exception: `arduino-home-assistant` is v2.1.0 (upstream bundles 1.3.0, which has no light,
number, select or button entities); `mqtt.ino` was rewritten for it.
- `platformio.ini`: PlatformIO build for the ESP-12 (4 MB flash, 2 MB SPIFFS).
Local changes are separate commits on top of the import (`git log -- firmware/uniclock`).