General Community
Testers wanted: more room for tiles on ESP Screens (unofficial branch, report issues to me)
What this is
I've been working on how ESP Screens firmware uses memory. On screens with PSRAM, a tile's lists and longer texts, and the data behind energy, calendar, vacuum, light preset and section cards, now go to PSRAM first. Five of each tile's settings also take one byte instead of a text. That leaves more internal RAM, and so more room for tiles.
Note: This is all vibe coded. I've validated it on my own hardware, but I haven't properly reviewed the code, beyond having a second agent review it independently.
On my 7 inch Waveshare (ESP32-S3 with PSRAM, 2 pages, 15 tiles), measured against 0.64.0 at the same uptime with the same YAML:
| 0.64.0 | This branch | |
|---|---|---|
| Room for tiles | 18 KB (102 % used) | 24 KB (79 % used) |
| Heap Free | 37.3 KB | 44.3 KB |
| Heap Minimum Free | 18.8 KB | 27.7 KB |
| Psram Free | 3,829 KB | 3,825 KB |
It stayed flat over 13 hours, and every page and tile still drew and responded to taps.
This is not an official release. It lives on my fork, branch
ao/esp-memory/memory-optimisation, based on 0.64.0. Please report anything about it to me only, as an issue on https://github.com/keyz182/homeassistant_espscreen/issues. Please don't report it to the upstream project's issues or Discord unless and until it's merged there.
Who I'd like to hear from
- Any board with PSRAM. Does the room for tiles go up for you too?
- Boards without PSRAM (for example the CYD). I have none, so this is untested on real hardware. The code builds for them, but I need to know nothing broke.
How to test
You build the branch from your screen's own YAML in ESPHome Builder. Your screen keeps its name, keys, Wi-Fi and plugins.
-
Take the "before" numbers first (see "What to look for" below).
-
In ESPHome Builder, open your screen's YAML. Back it up.
-
Find your board's key in this line:
files: [packages/<key>.yaml](for examplewaveshare7). -
Open that file on my branch:
https://github.com/keyz182/homeassistant_espscreen/blob/ao/esp-memory/memory-optimisation/packages/<key>.yamlNote the files under itspackages:section. -
Replace the
display:package in your YAML with the one below. Put your board's files infiles:, each withpackages/in front. This example is for the 7 inch Waveshare:packages: display: url: https://github.com/keyz182/homeassistant_espscreen ref: ao/esp-memory/memory-optimisation refresh: 0s files: - packages/core.yaml - packages/boards/waveshare-esp32s3-7.yaml - packages/features/hotspot.yaml
Discussion 1
Add a commentΒ· Edited
Sorry, that got cut off, continuing:
5.Replace thedisplay:package in your YAML with the one below. Put your board's files infiles:, each withpackages/in front. This example is for the 7 inch Waveshare:6.Add these two blocks. They make the code and fonts come from the same branch:If your YAML already has a substitutions: block, add the FONT_DIR line to it. Don't make a second one.
7.Select Install, then Wirelessly. The first build takes a while.8.Wait 15 minutes, then take the "after" numbers.The firmware row will still say 0.64.0. To check the new build is running, look for today's compile time on the screen's device page.
Don't press Update or Install for this screen in ESP Screen Manager, or "Update available" in Home Assistant, while testing. Either one puts the released firmware back. That is also how you go back when you're done.
What to look for Take each reading before and after, at the same time after boot (15 minutes is fine) and on page 1.
What to send me
Thanks for testing!