Add the Elecrow CrowPanel 7.0" as a third board, and take the packages and the add-on from Gitea (0.2.93)
A board file for the Elecrow CrowPanel 7.0" (DIS08070H, ESP32-S3-WROOM-1-N4R8): 800x480 through mipi_rgb, GT911 on the ESP32-S3's USB pins (elecrow_usb_phy.h frees them, behind a flag only this board sets), the Guition's vertical sizes across a wider page, no rotation. Its 4 MB of flash take the CYD's budget: a partition table of the component's (smart_display: partitions: 4mb_wide_slots, 1,984 KB slots), the icon fonts at 2 bits a pixel and the TLS client only bring the firmware to 1,865,440 bytes, 91.8 % of a slot, with camera images kept. docs/ELECROW.md has the numbers and the trade. The add-on reads a large board's name from the type sensor's value, the editor offers the board under New screen and draws the wide preview, tools/check.sh builds it with the budget, render_topbar and capture_ui take the panel's size. Firmware 0.2.79; the CYD image is unchanged (1,633,760 bytes). This fork builds from gittea.trippedonmy.name/Xandrossian/homeassistant_espscreen: the packages, the fonts, the component and the add-on repository point there instead of GitHub.
This commit is contained in:
+2
-1
@@ -1,6 +1,7 @@
|
||||
# Camera images on a Guition
|
||||
|
||||
App 0.2.66 with firmware 0.2.57 shows camera images on a Guition 4848S040:
|
||||
App 0.2.66 with firmware 0.2.57 shows camera images on a Guition 4848S040 (and, from app 0.2.93 with firmware
|
||||
0.2.79, on an Elecrow CrowPanel 7.0" at its own 800×480 size, docs/ELECROW.md; "Guition" below reads for both):
|
||||
|
||||
- **A camera tile.** Add a `camera.*` or `image.*` entity as a tile. A tap opens the image full
|
||||
screen, with the round back key at the top left like every card, and a spinner until the first
|
||||
|
||||
+4
-3
@@ -15,6 +15,7 @@ ESPHome Device Builder is optional:
|
||||
| --- | --- |
|
||||
| CYD | ESP32-2432S028, 320×240, ILI9341 and XPT2046 |
|
||||
| Guition | ESP32-S3-4848S040, 480×480, ST7701S and GT911 |
|
||||
| Elecrow CrowPanel 7.0" | DIS08070H, ESP32-S3-WROOM-1-N4R8, 800×480 RGB and GT911 ([ELECROW.md](ELECROW.md)) |
|
||||
|
||||
Other screens with roughly the same name can have different pins. Use
|
||||
the board profile that matches the hardware. Use a USB cable that supports data.
|
||||
@@ -38,8 +39,8 @@ Use the GitHub version for updates; a local test add-on is a separate app.
|
||||
1. Connect the screen with a **USB data cable** to the machine running Home
|
||||
Assistant. With multiple boards: connect them one at a time for the first
|
||||
installation, or check which port belongs to this screen.
|
||||
2. Click **New screen** in the sidebar of ESP Screens, under your screens. Choose CYD
|
||||
or Guition and give the screen a name, for example `Kitchen`. The device name
|
||||
2. Click **New screen** in the sidebar of ESP Screens, under your screens. Choose CYD,
|
||||
Guition or Elecrow CrowPanel and give the screen a name, for example `Kitchen`. The device name
|
||||
(`kitchen`) follows from that; use **customize** to choose a different one.
|
||||
3. Wi-Fi: if `wifi_ssid` and `wifi_password` are already in the ESPHome `secrets.yaml`,
|
||||
the screen uses them automatically. If they're missing, or the file doesn't
|
||||
@@ -88,7 +89,7 @@ and survives OTA updates. Use the HA device button **Calibrate touch** to
|
||||
measure again later. For a panel that stays off, or for a measurement report over
|
||||
USB, see [CALIBRATING.md](CALIBRATING.md).
|
||||
|
||||
**Guition:** the GT911 touch mapping is baked into the board profile; there's no ADC calibration.
|
||||
**Guition and Elecrow:** the GT911 touch mapping is baked into the board profile; there's no ADC calibration.
|
||||
|
||||
## 3. Pair the screen with Home Assistant
|
||||
|
||||
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
# Elecrow CrowPanel 7.0" — 800 × 480
|
||||
|
||||
The **Elecrow CrowPanel ESP32 HMI 7.0-inch** (product code **DIS08070H**, hardware V2.0 and V3.0) has a board file of
|
||||
its own, next to the CYD's and the Guition's: an 800 × 480 IPS panel on the ESP32-S3's own RGB bus, **GT911
|
||||
capacitive touch**, an **ESP32-S3-WROOM-1-N4R8** with 4 MB of flash and 8 MB of octal PSRAM, and a backlight on
|
||||
GPIO 2. It is the Guition's kind of screen, a big RGB panel with capacitive touch, in a wider, landscape form: every
|
||||
card, the camera images and album covers, the page swipe from the glass edge, the settings on the screen. Two things
|
||||
differ in kind, and both are below: the **4 MB of flash** (the CYD's budget, not the Guition's 16 MB) and a panel
|
||||
that is not square, so it **does not turn** (no Rotation entity).
|
||||
|
||||
Hardware source: [Elecrow's wiki](https://www.elecrow.com/wiki/esp32-display-702727-intelligent-touch-screen-wi-fi26ble-800480-hmi-display.html)
|
||||
and the [ESPHome devices page for the CrowPanel 7.0"](https://github.com/esphome/esphome-devices/pull/1494), whose
|
||||
panel timings, pins and pitfalls this board file follows. The **CrowPanel *Advance* 7.0"** is a different board with
|
||||
other pins (ESPHome's `CROWPANEL-ADVANCE-7` model); this file is for the plain CrowPanel 7.0".
|
||||
|
||||
## Files
|
||||
|
||||
- `packages/boards/elecrow-crowpanel7.yaml`: the board file (hardware, the 800 × 480 sizes, the flash measures); the
|
||||
interface itself is `packages/core.yaml`, shared with both other boards (docs/PROFILES.md).
|
||||
- `packages/elecrow.yaml`: what a screen builds from over GitHub; `elecrow-crowpanel7.yaml` in the root is the same for
|
||||
a build from a checkout; `installers/elecrow.yaml` the block for a hand-written ESPHome configuration.
|
||||
- `components/smart_display/elecrow_usb_phy.h`: frees the USB pins for the touch I2C (below).
|
||||
- `components/smart_display/partitions.py`: the partition table that makes the firmware fit (below).
|
||||
- `tools/verify_gt911.py`: physical pixel check, as on the Guition; no resistive calibration.
|
||||
|
||||
Choose **Elecrow CrowPanel · 7 inch** under **New screen** in ESP Screens (app 0.2.93+). The Guition's own parts (the
|
||||
Rotation choice) stay off for it; everything the Guition can show, it shows.
|
||||
|
||||
## Interface
|
||||
|
||||
Six tiles of **378 × 108 pixels** per page in two columns, the Guition's rows and fonts across a wider page: the
|
||||
vertical sizes are the Guition's to the pixel, the tiles and the cards take the extra width. The top bar, the tile
|
||||
labels, the alert card (560 wide, its camera picture 532 × 220), the colour and climate titles and the page keys are
|
||||
sized for 800 px; the cards that are a share of the page (the setpoint card, the mode keys) simply widen. A camera
|
||||
opens full screen at 800 × 480; ESP Screens serves the picture in that box (`camera_feed.BOXES['elecrow']`).
|
||||
|
||||
At 133 pixels an inch the Guition's 42 px icons are a shade larger on this panel than on the 4-inch (170 ppi), which
|
||||
suits a screen that stands further away.
|
||||
|
||||
### Touch
|
||||
|
||||
The GT911 is polled every 20 ms over I2C at 400 kHz, with no interrupt pin and no reset: the **V3.0** has a PCA9557
|
||||
I/O expander (I2C 0x18) on the GT911's reset and interrupt lines, and writing it during boot is what breaks the touch
|
||||
on that revision. It powers up with every pin as an input, a pull-up brings the GT911 out of reset before the firmware
|
||||
starts, and the driver finds it ready. A bus scan at boot upsets the GT911 too, so `scan: false`.
|
||||
|
||||
The GT911 takes I2C address **0x5D** when GPIO 38 reads low at power-on and **0x14** when it reads high; on this
|
||||
board it is 0x5D on most units, and a unit that never reports a touch may be a 0x14. Give that screen an Override YAML
|
||||
in ESP Screens (Screen settings → Override YAML) with:
|
||||
|
||||
```yaml
|
||||
touchscreen:
|
||||
address: 0x14
|
||||
```
|
||||
|
||||
**GPIO 19 and 20, the touch I2C, are the ESP32-S3's USB D- and D+.** The ROM leaves the USB PHY on those pads and
|
||||
ESP-IDF's I2C driver cannot take them back: the bus reads as `I2C software timeout` and the touch never answers
|
||||
(esphome/esphome#15356, ESPHome 2026.3+). `elecrow_usb_phy.h` runs before any component, as a static constructor,
|
||||
and lets the pads go; it is behind the build flag `ESP_SCREENS_FREE_USB_PADS`, which only this board file sets, because
|
||||
ESPHome includes every header of the component in every build and the Guition, an ESP32-S3 too, keeps its USB. The board's USB-C port is a CH340 on UART0, so flashing and the log are unaffected; the
|
||||
`GPIO19 is used by the USB-Serial-JTAG interface` warnings at build time are expected.
|
||||
|
||||
### Rotation
|
||||
|
||||
A landscape panel with a layout 800 px wide: it does not turn. `ROTATION_SUPPORTED` is `false`, the settings page
|
||||
shows no rotation row, and the app offers none for this board.
|
||||
|
||||
## Flash
|
||||
|
||||
The ESP32-S3-WROOM-1-**N4**R8 has **4 MB** of flash (the N4; 16 MB in the YAML boot-loops with no log). The firmware
|
||||
is the Guition's, with camera images; with the Guition's fonts it is **2,028 KB**, and ESPHome's own partition table for
|
||||
4 MB, two update slots of 1,792 KB with 448 KB kept for NVS, does not hold it. Three measures make it fit with room for
|
||||
updates, all in the board file, measured with ESPHome 2026.9.0 (the add-on's):
|
||||
|
||||
| Measure | Saves | Where |
|
||||
|---|---|---|
|
||||
| Two update slots of **1,984 KB** and 64 KB of NVS instead of 448 KB (the preferences take a few KB; ESP-IDF's own two-slot example keeps 16 KB) | 192 KB more room a slot | `smart_display: partitions: 4mb_wide_slots`, `components/smart_display/partitions.py` |
|
||||
| The four icon fonts (the 314 tile icons at 42, 26 and 18 px, the 31 big icons at 64 px) at **2 bits a pixel** instead of 4; the text fonts keep their 4 | 156 KB | `font:` in the board file (`!extend` on the core's fonts) |
|
||||
| The TLS client only; nothing serves TLS | 7 KB | `sdkconfig_options` in the board file |
|
||||
|
||||
That is **1,865,456 bytes, 91.8 %** of a slot: within the CYD's rules (docs/RELEASING.md step 2), in the *tight* band,
|
||||
and `tools/check.sh --firmware` applies the same budget to this board. Without camera images it is about 1,754 KB,
|
||||
86 %: drop the `online_image`, `http_request` and `preview_camera` sections, the alert's picture frame and the
|
||||
`camera_image_seed` image, and empty the camera hooks (`BOOT_CAMERA_HOOKS`, `BOARD_PAINT_FILL`, `CLOSE_CARDS_HOOK`,
|
||||
`MAY_OPEN_EXTRA`, `TICK_HOOK`, `AWAY_EXTRA`, `ALERT_SHOW_HOOK`) as the CYD's board file has them. The icons at 4 bits
|
||||
a pixel are the Guition's 156 KB back; they fit only without the camera images, and then at 94 %.
|
||||
|
||||
The partition table is part of the firmware and **never changes once a screen is flashed**: an update over Wi-Fi
|
||||
writes into the other slot of the table the screen has, and only a USB install (ESP Screens' New screen, or ESPHome
|
||||
Web with the factory image) lays the flash out anew. A screen flashed with this table keeps it through every update.
|
||||
|
||||
## Panel
|
||||
|
||||
ESPHome's `mipi_rgb` driver with the `RPI` model: the panel takes the pixels straight from the ESP32-S3's LCD
|
||||
peripheral and needs no initialisation, so the timings are the whole configuration: 15 MHz pixel clock, inverted
|
||||
(`pclk_inverted: true`, without it the picture tears), horizontal porches 40/48/13 and vertical 1/31/13, the 16 data
|
||||
pins of Elecrow's schematic. The frame buffer is in PSRAM; LVGL draws in a buffer of 15 % of the screen, the same
|
||||
number of pixels as the Guition's 25 % of 480 × 480.
|
||||
|
||||
## Checks
|
||||
|
||||
- `python3 tools/check_packages.py`, `esphome config elecrow-crowpanel7.yaml`, `tools/check.sh --firmware`.
|
||||
- The touch test page and `tools/verify_gt911.py` for the corners; the ghost-touch filter at (0, 0) of the Guition's
|
||||
GT911 applies here too.
|
||||
- `diagnostics/capture_ui.py` saves the LVGL render at 400 × 240 (half the panel) as a PNG; `ui_self_test` renders
|
||||
every card without touching a device.
|
||||
- A build is not a flash, and a render is not a touch: the owner checks the picture and taps the corners.
|
||||
+10
-6
@@ -10,8 +10,9 @@ already drifted apart in small ways.
|
||||
| `packages/core.yaml` | Everything every board shares: the LVGL tree (tiles, cards, overlays, the touch test page), the scripts, the API actions, the entities, the fonts, the globals, and Wi-Fi that never dozes (`power_save_mode: none`, firmware 0.2.74+; the network itself stays in the screen's own YAML). It contains no number that depends on the board: every such value is a `${NAME}` the board file defines. |
|
||||
| `packages/boards/cyd-2432s028.yaml` | The CYD: its hardware (ILI9341 over SPI, XPT2046 resistive touch, backlight, LED), its sizes and font sizes, the code the shared lambdas take from it (the *hooks*, below), and what only a CYD has: the calibration wizard, a page swipe by LVGL's gesture, `ui_self_test`, the two scripts that drive the backlight as a light action, its climate card layout. |
|
||||
| `packages/boards/guition-4848s040.yaml` | The Guition: its hardware (ST7701S RGB, GT911, PSRAM), its sizes, its hooks, and what only a Guition has: camera images (`online_image`, the alert's picture frame), the Rotation entity, the page swipe from the glass edge, the snapshot diagnostics, the climate card with its fan and swing card, the wider tile labels (`!extend` on each tile). |
|
||||
| `packages/cyd.yaml`, `packages/guition.yaml` | What a screen installed from ESP Screens builds from over GitHub, unchanged in name and place: ESP Screen Manager writes every screen's YAML with `files: [packages/<board>.yaml]`. Each is a few lines: where the fonts are, the components from GitHub, and `packages: {core: !include core.yaml, board: !include boards/<board>.yaml}`. |
|
||||
| `home-like-2432s028.yaml`, `guition-4848s040.yaml` | The same two files for a build from a checkout (the bench, the manual route of README_EXTENDED.md): the components of the checkout, the fonts from `fonts/`, and the secrets from `secrets.yaml`. |
|
||||
| `packages/boards/elecrow-crowpanel7.yaml` | The Elecrow CrowPanel 7.0" (app 0.2.93): the Guition's kind at 800×480 on 4 MB of flash. Its hardware (the RGB panel through `mipi_rgb`, GT911, the USB pins freed for the touch I2C), the Guition's vertical sizes across a wider page, the same hooks and sections as the Guition's file except the Rotation (a landscape panel does not turn), and what the flash asks for: a partition table of the component's (`smart_display: partitions`), the icon fonts at 2 bits a pixel (`font:` with `!extend`). docs/ELECROW.md has the numbers. |
|
||||
| `packages/cyd.yaml`, `packages/guition.yaml`, `packages/elecrow.yaml` | What a screen installed from ESP Screens builds from over GitHub, unchanged in name and place: ESP Screen Manager writes every screen's YAML with `files: [packages/<board>.yaml]`. Each is a few lines: where the fonts are, the components from GitHub, and `packages: {core: !include core.yaml, board: !include boards/<board>.yaml}`. |
|
||||
| `home-like-2432s028.yaml`, `guition-4848s040.yaml`, `elecrow-crowpanel7.yaml` | The same files for a build from a checkout (the bench, the manual route of README_EXTENDED.md): the components of the checkout, the fonts from `fonts/`, and the secrets from `secrets.yaml`. |
|
||||
|
||||
ESPHome merges them in this order: the core, then the board file on top of it, then the entry file on top of both.
|
||||
A mapping merges key by key, a list of components with ids merges by id (`!extend` adds to an existing widget or
|
||||
@@ -41,11 +42,14 @@ the board file replaces the core's. `esphome config home-like-2432s028.yaml` sho
|
||||
`assertion_level: SILENT` in its `esp32:` block (firmware 0.2.75+): every board builds its firmware the same way,
|
||||
and `tests/test_easy_package.py` checks it.
|
||||
2. Fill the sizes table for the new resolution, and go through the hooks: keep, change or empty each one.
|
||||
3. Add `packages/<board>.yaml` and `<board>.yaml` after the existing entries, `<board>` to `ENTRIES` in
|
||||
3. Add `packages/<board>.yaml` and `<board>.yaml` after the existing entries, `<board>` to `BOARDS` and `ENTRIES` in
|
||||
`tools/profiles.py` and to `REFS` in `screen_manager/app/core.py` (the boards `installation_yaml()` writes a
|
||||
profile for), and a `BANDS` entry to `tools/render_topbar.py`. The add-on and the editor still know two boards,
|
||||
a Guition or not: the board a screen is (`core.py`), `ALERT_LIMITS`, the camera sizes in `camera_feed.py`, and
|
||||
the editor's New screen choices and `BAR_METRICS` (`web/src`) need the new board too.
|
||||
profile for), and a `BANDS` entry to `tools/render_topbar.py`. The add-on and the editor know a board as small (the
|
||||
CYD) or large (`LARGE_BOARDS` in `core.py` and `web/src/store.ts`: a Guition or an Elecrow, the ones that draw
|
||||
images and take the large cards); a large board reports its name in the value of the "Guition screen type" sensor
|
||||
(`discover_screens`). `ALERT_LIMITS`, the camera sizes in `camera_feed.py`, the editor's New screen choices
|
||||
(`InstallerView.vue` and `board_<name>` in every translation) and `BAR_METRICS` need the new board too, and
|
||||
`tools/check.sh` builds it (with the flash budget when it has 4 MB). The Elecrow (app 0.2.93) is the worked example.
|
||||
4. `python3 tools/check_packages.py`, `esphome config <board>.yaml`, `tools/check.sh --firmware`.
|
||||
|
||||
The tiles per page (two columns of three) are still fixed in the firmware, the add-on and the editor
|
||||
|
||||
Reference in New Issue
Block a user