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
@@ -14,7 +14,9 @@ WiFi updates and Home Assistant control.
|
||||
- UniClock's web page for all settings
|
||||
- Firmware updates over WiFi (ArduinoOTA)
|
||||
- Home Assistant over MQTT discovery: tubes on/off, day/night brightness, auto dim, backlight
|
||||
(on/off, brightness, colour), LED effect, cathode protect, light and WiFi-signal sensors
|
||||
(on/off, brightness, colour), LED effect, cathode protect, SignalRGB on/off, light and
|
||||
WiFi-signal sensors
|
||||
- SignalRGB: the backlight can show up in SignalRGB as a WLED device (see below)
|
||||
|
||||
## The hardware
|
||||
|
||||
@@ -70,6 +72,21 @@ and restart the clock; it then shows up under Settings > Devices > MQTT.
|
||||
Optional passwords for the web page and OTA updates go in
|
||||
`firmware/uniclock/ESP32_UniClock2/secrets.h` (see `secrets.h.example`; the file is gitignored).
|
||||
|
||||
## SignalRGB
|
||||
|
||||
Turn on **SignalRGB (WLED)** on the RGB page of the web UI (or the SignalRGB switch in Home
|
||||
Assistant). The clock then answers like a WLED device with one LED per tube, LED 0 = left tube:
|
||||
mDNS `_wled._tcp`, `/json/info` and `/json/state` without a password, and colour frames over UDP
|
||||
(WLED realtime on port 21324, DDP on 4048). SignalRGB should find it by itself; if not, add it by
|
||||
IP address. SignalRGB only drives as many LEDs as the component on the device's channel has, so
|
||||
give the channel a component with 4 LEDs. While SignalRGB sends colours it controls the LEDs (at most 30 frames per second,
|
||||
`WLED_MAX_FPS` in `clocks.h`); 2.5 s after it stops, the normal effect comes back. The alarm
|
||||
flash always wins. Two more switches on the same page:
|
||||
|
||||
- **SignalRGB off with tubes**: the LEDs stay dark at night and while the tubes are off.
|
||||
- **SignalRGB uses RGB Brightness**: colours are scaled by the RGB brightness and auto dim;
|
||||
off = colours as SignalRGB sends them.
|
||||
|
||||
## Changes to ESP_UniClock
|
||||
|
||||
Besides the new driver and configuration:
|
||||
@@ -77,6 +94,8 @@ Besides the new driver and configuration:
|
||||
- NeoPixels on any ESP8266 pin, sent only when they change and between tube slots (the
|
||||
bit-banged update blocks interrupts and made the tubes flicker)
|
||||
- ArduinoOTA; Home Assistant integration rewritten for ArduinoHA 2.1
|
||||
- WLED emulation for SignalRGB (`wled.ino`); its settings are stored after the UniClock
|
||||
settings in EEPROM, so the update keeps all existing settings
|
||||
- EU summer-time rules (upstream ended summer time on the US date); switching DST on no longer
|
||||
shifts the clock by an hour in winter
|
||||
- Saving the firmware URL no longer starts an HTTP update; optional web password
|
||||
|
||||
Reference in new issue
Block a user