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

+14 -3
View File
@@ -54,7 +54,11 @@ var controlInfos = {
"rgbBrightness": "RGB leds brightness 0..255",
"rgbFixColor": "RGB color, if FixColor Effect is used",
"rgbSpeed": "RGB animation speed",
"wledEnable": "Let SignalRGB control the LEDs: the clock shows up there as a WLED device",
"wledDarkWithTubes": "LEDs stay dark while the tubes / backlight are off, also when SignalRGB is running",
"wledUseBrightness": "Scale SignalRGB colours by RGB Brightness (and auto dim). Off: colours as sent",
"wledLive": "SignalRGB is sending colours right now",
//Wifi settings
"wifiSsid": "WiFi network SSID to connect",
"wifiPsw": "WiFI password",
@@ -132,7 +136,11 @@ var configuration = {
"rgbBrightness": 100,
"rgbFixColor": 150,
"rgbSpeed": 50,
"wledEnable": false,
"wledDarkWithTubes": true,
"wledUseBrightness": true,
"wledLive": false,
//Wifi settings
"wifiSsid": "mywifi",
"wifiPsw": "mypsw",
@@ -232,6 +240,7 @@ function setCurrentInfos(){
$('#currentTime').html(getCurrentDate(configuration["currentDate"]) + " " + configuration["currentTime"]);
$('#lux').html(configuration["lux"]);
$('#rssi').html(configuration["rssi"]);
$('#wledLive').html(configuration["wledLive"] ? "yes" : "no");
$('#pressure').html(round(configuration["pressure"],1));
$('#humidity').html(round(configuration["humidity"],1));
$('#humidity2').html(round(configuration["humidity2"],1));
@@ -420,7 +429,8 @@ function Init(){
index == 'rgbDir' || index == 'manualOverride' ||
index == 'enableAutoDim' || index == 'enableRadar' ||
index == 'enableDoubleBlink' || index == 'enableTimeDisplay' ||
index == 'mqttEnable' || index == 'tempCF' || index == "wifiMode"
index == 'mqttEnable' || index == 'tempCF' || index == "wifiMode" ||
index == 'wledEnable' || index == 'wledDarkWithTubes' || index == 'wledUseBrightness'
) && !!value
){
$('#'+index).prop('checked',true);
@@ -438,6 +448,7 @@ function Init(){
$('.temperature-holder').toggleClass('hidden',configuration['temperature'] == 255);
$('.temperature-holder2').toggleClass('hidden',configuration['temperature2'] == 255);
$('.rgb-holder').toggleClass('hidden',configuration['rgbEffect'] == 255);
$('.wled-holder').toggleClass('hidden',configuration['wledEnable'] === undefined); //firmware without USE_WLED_REALTIME
$('.tube-holder').toggleClass('hidden',configuration['tubeDriver'] == "DUMMY");
$('.wordclock-holder').toggleClass('hidden',configuration['tubeDriver'] == "WORDCLOCK");
$('.sensors-holder').toggleClass('hidden',configuration['temperature'] == 255);