Add SignalRGB control via WLED emulation

The clock answers like a WLED device (mDNS _wled._tcp, /json/info,
/json/state, realtime UDP on 21324 and DDP on 4048), so SignalRGB can
drive the 4 backlight LEDs, one per tube, LED 0 = left tube. Frames are
shown at most 30 times a second (WLED_MAX_FPS); the normal effect
returns 2.5 s after they stop, and the alarm flash still wins.

Three new settings on the RGB page: enable (also a Home Assistant
switch), stay dark while the tubes are off, and scale by the RGB
brightness. They are stored in EEPROM after prm with their own magic
value, so the update does not factory-reset the clock.

page.js and site.css are now sent with no-cache: browsers kept them
for a year and ran the old script after a web UI update.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mangavalkandClaude Opus 5.5 committed 2026-10-25 23:32:25 +01:00
1 parent c4e0c29791
commit ae87849e75
9 files changed
+446 -20

No files matched your search

@@ -147,6 +147,8 @@ byte tubePixels[] = {0, 1, 2, 3}; //4 WS2812, one per tube (chain order not ve
//#define LOOP_DIAG //report main-loop stalls in /getCurrentInfos ("stalls"); for debugging only
#define USE_ARDUINO_OTA
#define OTA_HOSTNAME "nixie-in12"
#define USE_WLED_REALTIME //SignalRGB: shows up as a WLED device (switch on the web page / in HA), wled.ino
#define WLED_MAX_FPS 30 //lower (e.g. 15) if the tubes flicker while SignalRGB is running
#if __has_include("secrets.h")
#include "secrets.h" //optional, gitignored: DEFAULT_SSID, DEFAULT_PSW, OTA_PASSWORD (see secrets.h.example)
#endif