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

@@ -320,6 +320,32 @@
<label for="rgbSpeed">Animation Speed</label>
<input type="range" min="1" max="255" class="slider" id="rgbSpeed">
</div>
<div class="control-holder wled-holder">
<label>SignalRGB (WLED)</label>
<input id="wledEnable" type="checkbox" class="switch">
<span class="switcher-text left non-selectable" for="wledEnable">off</span>
<span class="switcher non-selectable" for="wledEnable"></span>
<span class="switcher-text right non-selectable" for="wledEnable">on</span>
</div>
<div class="control-holder wled-holder">
<label>SignalRGB off with tubes</label>
<input id="wledDarkWithTubes" type="checkbox" class="switch">
<span class="switcher-text left non-selectable" for="wledDarkWithTubes">off</span>
<span class="switcher non-selectable" for="wledDarkWithTubes"></span>
<span class="switcher-text right non-selectable" for="wledDarkWithTubes">on</span>
</div>
<div class="control-holder wled-holder">
<label>SignalRGB uses RGB Brightness</label>
<input id="wledUseBrightness" type="checkbox" class="switch">
<span class="switcher-text left non-selectable" for="wledUseBrightness">off</span>
<span class="switcher non-selectable" for="wledUseBrightness"></span>
<span class="switcher-text right non-selectable" for="wledUseBrightness">on</span>
</div>
<div class="control-holder wled-holder">
<label>SignalRGB active</label>
<span id="wledLive" class="info medium"></span>
</div>
</div>
<!-- WiFi settings -->
<div page=wifi>