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:
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>
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user