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
@@ -138,6 +138,16 @@ See README.md for the overview.
|
||||
- Bitmaps on LittleFS in the `spiffs` partition (`/bitmaps/<name>.bin`, 209 bytes). Names
|
||||
are restricted (`validBitmapName`), which also makes them safe in paths and JSON.
|
||||
- The display mirror comes from the driver's shadow buffer (`BROSE9323::shownPixel`).
|
||||
- Dynamic pages (`logic/page.h`): background per time slot + elements, stored as a
|
||||
versioned binary struct (`display/page_store.cpp`, bump `VERSION` when `DynamicPage`
|
||||
changes). They are drawn only on the ESP32 (`logic/page_render`), also for the web
|
||||
previews, so there is one renderer. Pages and bitmaps share one namespace (checked in
|
||||
`app.cpp`); things a page uses can't be deleted. The built-in page "Clock" replaces the
|
||||
old hardcoded clock (also the default and the HA "Clock" option).
|
||||
- Fonts use the "FDF1" format of `logic/font.h`; the web page writes the same format.
|
||||
`logic/builtin_fonts.cpp` is generated: change `tools/make_builtin_fonts.py` and rerun it.
|
||||
- Home Assistant values come from HA's REST API (`net/ha_api`), one blocking request per
|
||||
`loop()` with `HA_HTTP_TIMEOUT`. Keep it that way (watchdog, OTA).
|
||||
- Check the page's JavaScript after changes: extract the `<script>` part and run
|
||||
`node --check` on it (node is installed).
|
||||
|
||||
|
||||
Reference in new issue
Block a user