Public Access
Add dynamic pages with clock, date, Home Assistant values and fonts
The hardcoded clock is now the built-in dynamic page "Clock". A dynamic page has a background bitmap per time of day and up to 8 elements (clock, date, Home Assistant value, text), each with position, alignment, font and overlay. Pages are drawn on the ESP32, also for the web previews. - Pages tab in the web UI: page editor with drag and drop, font upload (TTF/OTF converted in the browser to the FDF1 dot font format) - Built-in fonts Small, Normal, Large and Full height (generated by tools/make_builtin_fonts.py), built-in bitmaps Pikachu and Pikachu yawning - Home Assistant values over the REST API (URL and token in the HA tab) - Settings version 4: evening settings removed (now time slots of the Clock page), old records are converted - HA Mode dropdown lists the dynamic pages and bitmaps Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1d3b084de1
commit
0411804a2f
49 files changed
+3058
-331
No files matched your search
@@ -23,7 +23,7 @@ too, and it boots again each time the relay switches on. Only the ESP32 runs all
|
||||
| Part | Folder | What it does |
|
||||
|------|--------|--------------|
|
||||
| **Arduino Nano** | [src/nano](src/nano/README.md) | Drives the panel's row and column electronics directly. Keeps a frame buffer and flips only the dots that changed. Takes simple text commands over serial. |
|
||||
| **ESP32** | [src/esp32](src/esp32/README.md) | Connects to WiFi, gets the time over NTP, shows a clock with Pikachu bitmaps or your own bitmaps, has a [web UI](#web-ui), exposes switches to Home Assistant over MQTT, switches display power with a relay and supports OTA updates. |
|
||||
| **ESP32** | [src/esp32](src/esp32/README.md) | Connects to WiFi, gets the time over NTP, shows dynamic pages (a background per time of day with a clock, the date, Home Assistant values or text) or your own bitmaps, has a [web UI](#web-ui), exposes switches to Home Assistant over MQTT, switches display power with a relay and supports OTA updates. |
|
||||
| **ESP32 recovery app** | [src/recovery](src/recovery/README.md) | Small second app: WiFi setup page and OTA, so the ESP32 stays reachable when the clock firmware fails. |
|
||||
| **BROSE9323 driver** | [lib/BROSE9323](lib/BROSE9323/README.md) | Shared `Adafruit_GFX` display driver. On the Nano it toggles GPIO pins. On the ESP32 (`-D ESPSERIAL`) it turns every drawing call into a serial command for the Nano. |
|
||||
|
||||
@@ -94,21 +94,27 @@ view of the display: it shows what the dots show right now, updated every 1.5 s.
|
||||
|
||||
| Tab | What you can do |
|
||||
|-----|-----------------|
|
||||
| **Show** | Choose what the display shows during the day: the clock (Pikachu with the time) or any bitmap. The schedule still decides when the display is on. |
|
||||
| **Bitmaps** | All bitmaps with a preview: show one as the page, send it live, open it in the editor, delete it. The built-in Nintendo logo can't be deleted. |
|
||||
| **Show** | Choose what the display shows during the day: a dynamic page (e.g. the built-in Clock: Pikachu with the time) or any bitmap. The schedule still decides when the display is on. |
|
||||
| **Pages** | Dynamic pages: a background bitmap per time of day (e.g. Pikachu from 00:00, yawning Pikachu from 17:00) with up to 8 elements on top: clock (`08:05` / `8:05`), date (7 formats, Dutch or English), Home Assistant value (entity or attribute, text before and after, decimals) and text. Each element has a position (drag it on the preview), alignment, font and overlay (on top, box that clears the dots behind it, inverted). The preview is drawn by the ESP32, so it is exactly what the display shows. Built-in pages can be copied, not changed. Fonts: Small (3x5), Normal (5x7), Large (5x7 doubled), Full height (19 dot digits), and your own: upload a TTF/OTF, choose the height in dots, the browser converts it. |
|
||||
| **Bitmaps** | All bitmaps with a preview: show one as the page, send it live, open it in the editor, delete it. The built-in ones (Nintendo, Pikachu, Pikachu yawning) can't be deleted, nor can a bitmap that a page uses as background. |
|
||||
| **Draw / Live** | Draw on an 84 x 19 canvas (click or drag), or load an image: it is converted in the browser (threshold, invert, dithering, fit / fill / stretch). "Show on display now" sends it to the display right away (*live mode*); with "live while drawing" every change appears on the dots. Save it as a bitmap with a name. |
|
||||
| **Settings** | Schedule on/off, when the display is on, the late-evening quarter-hour mode, when it switches off; yawning Pikachu and its time; the "No WiFi" screen; the flip time, the pause after each pulse, pulses per dot and the refresh effect (instant, sparkle, wipe, rain, from the middle out, diagonal, spiral, flip all then reveal, push, random; optionally only for small changes like the clock's minutes); test patterns; the status LED. |
|
||||
| **Home Assistant** | On/off, broker, port, user, password. Saving restarts the ESP32. An empty broker uses `secrets.h`. |
|
||||
| **Settings** | Schedule on/off, when the display is on, the late-evening quarter-hour mode, when it switches off; the "No WiFi" screen; the flip time, the pause after each pulse, pulses per dot and the refresh effect (instant, sparkle, wipe, rain, from the middle out, diagonal, spiral, flip all then reveal, push, random; optionally only for small changes like the clock's minutes); test patterns; the status LED. |
|
||||
| **Home Assistant** | On/off, broker, port, user, password (changing these restarts the ESP32; an empty broker uses `secrets.h`). The URL and long-lived access token for the values on dynamic pages (REST API, plain http; empty URL: `http://<broker>:8123`). |
|
||||
| **System** | Firmware status, uptime, WiFi, storage; restart; start the recovery app. |
|
||||
|
||||
**Live mode** shows the image at once, also at night or before the time is known. It
|
||||
ends with "Back to normal", or 30 minutes after the last image. The Home Assistant Power
|
||||
switch still wins: when it is off, nothing is shown.
|
||||
|
||||
**Bitmaps** are stored on the ESP32 (LittleFS, 320 KB, room for well over a thousand). They
|
||||
need the new flash layout from the [one-time installation](#one-time-installation-usb);
|
||||
**Bitmaps, pages and fonts** are stored on the ESP32 (LittleFS, 320 KB, room for well over
|
||||
a thousand bitmaps, 50 pages, 20 fonts). Pages and bitmaps share their names. They need
|
||||
the new flash layout from the [one-time installation](#one-time-installation-usb);
|
||||
before that, only the built-in ones are available.
|
||||
|
||||
**Home Assistant values** on the shown page are read every minute (one entity per loop,
|
||||
at most about 3 s). An unknown or unreachable value shows `--`. The display only changes
|
||||
when the shown text changes, so round values with the decimals setting.
|
||||
|
||||
Settings are stored in the ESP32's NVS. The defaults are the original behaviour. There is
|
||||
no login: anyone on your WiFi can use the page, as with OTA.
|
||||
|
||||
@@ -289,16 +295,16 @@ The ESP32 talks to the Nano on **UART2** (`Serial2`, 115200 baud). The ESP32's o
|
||||
connects to MQTT.
|
||||
2. **Clock.** Once the time is synced, the ESP32 sends a new frame whenever the screen
|
||||
changes, mostly once a minute:
|
||||
- **08:00–22:00:** Pikachu with a thought bubble showing `HH:MM`. A yawning Pikachu is
|
||||
shown from 17:00.
|
||||
- **08:00–22:00:** the page, by default the built-in Clock page: Pikachu with a thought
|
||||
bubble showing `HH:MM`, a yawning Pikachu from 17:00 (its time slots).
|
||||
- **22:00–23:30:** the clock is only shown during the minutes :00, :15, :30 and :45.
|
||||
30 seconds after each of those minutes, the relay turns the display off.
|
||||
- **23:31–08:00:** the screen is cleared (or shows the off image chosen in the web UI)
|
||||
and power is cut after 30 seconds.
|
||||
3. **Home Assistant** (MQTT discovery):
|
||||
- `FlipDot Display Power` switch: off clears the display and cuts power through the relay.
|
||||
- `FlipDot Display Mode` dropdown: what is shown during the day, the clock or one of the
|
||||
bitmaps (the same choice as in the web UI).
|
||||
- `FlipDot Display Mode` dropdown: what is shown during the day, a dynamic page ("Clock"
|
||||
first) or one of the bitmaps (the same choice as in the web UI).
|
||||
- `FlipDot Display Off image` dropdown: what is left on the dots when the display
|
||||
switches off (at night or with the Power switch): blank or one of the bitmaps.
|
||||
- `FlipDot Display IP` sensor: the ESP32's IP address.
|
||||
@@ -316,6 +322,9 @@ The serial protocol is described in [src/nano/README.md](src/nano/README.md).
|
||||
Assistant sensor shows "no recovery app".
|
||||
- [X] **Test the web UI on the real hardware**: live view, uploading and drawing a bitmap,
|
||||
live mode, choosing a page, settings, Home Assistant settings (restart).
|
||||
- [ ] **Test the dynamic pages on the real hardware**: the Clock page after the update
|
||||
(same as before, yawning from 17:00), a new page with date and Full height clock, an
|
||||
uploaded font, a Home Assistant value (token in the Home Assistant tab).
|
||||
- [ ] **Test the recovery app on the real hardware**: the Home Assistant button, the setup
|
||||
WiFi with a wrong WiFi password, 3 quick power cycles, and an OTA upload into it.
|
||||
|
||||
|
||||
Reference in new issue
Block a user