New "Wake at night" setting (prmExt.wledWakeAtNight, web UI only): while
WLED frames arrive, the night schedule is ignored and the clock runs as by
day. Night mode returns as soon as the frames time out. The manual night
toggle, radar and HA Tubes switch still win.
The field uses the former padding byte of prmExt; MAGIC_VALUE_EXT is now
0x5702 and 0x5701 settings are migrated, so existing SignalRGB settings
are kept.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first NTP attempt after boot usually fails and the retry waited a
flat 5 minutes, so the clock showed 00:00 (1970) for 5 minutes after
every restart or OTA update. Retries now back off 15 s, 30 s, 1 min ...
up to 5 min. Measured after an OTA update: time set at 30 s uptime.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The upstream jQuery page (147 KB, 3-column grid, slider values hidden,
help behind label clicks, no save feedback) is replaced by
firmware/uniclock/web/index.html: one file, no jQuery, gzipped by
web/gzip_web.py to data/index.html.gz (12 KB) before every build.
- Tabs Home / Tubes / Light / Network / System, rows with label, help
line and control; sliders always show their value
- "Saved" / "Not saved" after each change, reverted on failure; offline
indicator with automatic retry (the old poll stopped after one error)
- WiFi and MQTT settings only save with a Save button, then offer a
restart; password fields are write-only
- Controls for hardware this clock lacks (alarm, radar, sensors) hidden
- Runs on sample data when opened from disk
Firmware: one serveStatic route (gzip, no-cache + ETag) replaces the
per-file routes; /getConfiguration no longer returns passwords and adds
ip, hasAlarm, hasRadar and the real cathProtMin; /getCurrentInfos adds
currentSec and mqtt state and sends "lux" instead of "lx" when there is
no sensor; /cathodeProtect and /firmwareupdate now answer.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
- The bit-banged WS2812 update disables interrupts (about 30 us per
pixel), which made the lit tube stay on longer and flash. neoShow()
now only sends when the pixels changed (fixed colour was resent every
second) and waits for the dark gap between tubes; the bit-bang strip
has no headroom pixels. This also fixed digits that seemed to hang.
- 4 WS2812 on this board, one per tube (not 8)
- Saving the firmware URL in the web UI no longer starts an HTTP
update; never update from an empty URL
- Restart once after the first switch from AP mode to WiFi, so
ArduinoOTA and MQTT start on the real network
- Optional web UI password (WEB_USER/WEB_PASSWORD in secrets.h);
/getConfiguration returns the stored WiFi and MQTT passwords
- Cathode protect: random mode now starts at a random tube (the +-1
start digits were swapped and then overwritten)
- Apply the unused gamma table to wheel colours
- LOOP_DIAG (off by default): main-loop stalls in /getCurrentInfos,
which now also reports uptime and free heap
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Upgrade ArduinoHA from 1.3.0 to 2.1.0 and rewrite mqtt.ino for it.
The clock now shows up in Home Assistant (discovery prefix
"homeassistant") with:
- switches Tubes (blank the display, runtime only) and Auto dim
- numbers Day/Night brightness
- light Backlight (on/off, brightness, RGB mapped to the colour wheel)
- select LED effect, button Cathode protect
- sensors Light (LDR) and WiFi signal, plus the upstream sensors when
the clock has them; master-clock subscriptions are kept
Settings changed from HA are saved to EEPROM 3 s after the last change.
Fixes the unbounded memcpy in the MQTT message handler.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds CLOCK_90 and the nixie595.ino driver: two 74HC595s on hardware
SPI (GPIO13/14, latch GPIO15), multiplexed from an IRAM-only timer1
ISR. Neon dots on P1; P2 is the decimal-point line on this board.
Also:
- NeoPixel on any ESP8266 pin via bit-bang (GPIO12), and take the pin
back after SPI.begin() claimed it as MISO
- ArduinoOTA (USE_ARDUINO_OTA), with an OTA upload env in platformio.ini
- DST: EU end date (last Sunday of October) instead of the first Sunday
of November, and recompute the time from the rules when DST is
toggled instead of shifting it by 1 h
- forward declarations so PlatformIO's .ino conversion compiles
- FIRMWARE_SERVER can be overridden; empty for CLOCK_90
Verified on the clock: tubes, order, dots, LEDs, LDR, NTP time with DST.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Disassembled the SV1.3 app image and confirmed the shift-register
(HSPI 13/14 + latch 15), WS2812 (12), LDR (A0) and button pins, the
16-bit bit map and the tube order. The stock firmware has no I2C code
and drives a DFPlayer on UART0. Adds the ELF/xref helper tools.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Core/SDK version, flash layout, settings files and the hidden /d
hardware page whose Debug mode enables web OTA at /u.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Notes on the RetroModding IN-12 v2 clock (pinout, programming header,
plan for ESP_UniClock) and the maker's v2 schematic.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>