- Python 68.2%
- Shell 16.2%
- C++ 15.6%
- restore weather, three-hour forecast, indoor comfort and music display - correct display CS to GPIO46 using the manufacturer pin map - separate public HA package example from ignored local configuration - automatically include the local package when present via validate.sh - add anonymized HA forecast template and installation instructions - schedule fast whole-screen refresh every 5 minutes and full every 15 - force full refresh after boot and on manual requests - preserve audio guards, cooldown and coalescing of refresh requests - add forecast, comfort and refresh deadline regression tests - update validation, hardware, migration and rollback documentation Validation: eight tests and both complete firmware builds passed. Fast refresh transfers both color planes; red retention and hardware behavior remain unverified. No firmware was flashed. |
||
|---|---|---|
| docs | ||
| examples/home-assistant | ||
| packages | ||
| scripts | ||
| tools | ||
| .editorconfig | ||
| .gitignore | ||
| AGENTS.md | ||
| AUTHORS.md | ||
| CHANGELOG.md | ||
| CONTRIBUTING.md | ||
| dashboard.h | ||
| LICENSE | ||
| README.md | ||
| README.pl.md | ||
| requirements.txt | ||
| rockbase-voice-satellite.yaml | ||
| secrets.example.yaml | ||
| SOURCE.md | ||
RockBase Voice Satellite (ESPHome)
An open, configurable ESPHome project for the RockBase NM-EPD-420 board: push-to-talk Home Assistant Assist satellite, ES8311 microphone/speaker, on-board AHT20, and a 4.2-inch three-color e-paper display.
Polski poradnik instalacji / Polish setup guide
Original repository: https://code.devnull.com.pl/homeassistant/rockbase-voice-satellite.git
Author: Krzysztof "grenn" Pogorzelski
License: GNU GPL v3 or later (GPL-3.0-or-later). See LICENSE, AUTHORS.md and SOURCE.md. Forks and modified distributions must retain the applicable copyright/license notices, and redistributors must comply with GPL source availability requirements. GPL permits commercial redistribution and sale.
Project status: This repository is a reusable configuration derived from a tested hardware configuration. The public baseline passed static checks, ESPHome configuration validation and a full ESPHome 2026.10.0 firmware compile with disposable test credentials on 2026-11-04. This revision has not been tested on physical hardware; see validation results and acceptance matrix. Check the board pinout before flashing. Real rectangular partial refresh has not been confirmed for
depg0420/SSD1683.
Features
- Press the hardware USER button once to start listening; speech-end detection is performed by Home Assistant. No need to hold the button.
- Voice input: ES8311 over I²S at 32 kHz, resampled to 16 kHz for Home Assistant Assist.
- Voice output: TTS over speaker, DAC volume slider exposed to Home Assistant, amplifier switched on for TTS and off afterward.
- AHT20 temperature/humidity, raw diagnostic values, adjustable zero-default calibration offsets, and internal ESP32 temperature for diagnostics (not room temperature).
- 400 × 300 black/white/red dashboard: clock, optional current weather/three forecasts, calibrated indoor readings with comfort indicator, and a music footer. Manual refresh through Home Assistant; clock gets local timezone from Home Assistant.
- Native encrypted API and encrypted OTA for new ESPHome installations; Wi-Fi credentials and encryption key are read from a non-committed
secrets.yaml.
Get the source
git clone https://code.devnull.com.pl/homeassistant/rockbase-voice-satellite.git
cd rockbase-voice-satellite
Alternatively, extract the release ZIP and run the commands below from the extracted project directory.
Hardware and service requirements
- RockBase NM-EPD-420 with compatible ESP32-S3, ES8311, AHT20 and
depg0420-class 4.2-inch e-paper. Board revisions may vary; see pinout. - A USB data cable for initial firmware installation, 2.4 GHz Wi-Fi, and a reliable 5 V USB power supply.
- Home Assistant 2026.3 or newer for runtime timezone synchronization, with the ESPHome integration and a working Assist pipeline with STT and TTS. This project does not include a speech-to-text or text-to-speech server.
- A Linux computer with Internet access for the first build (ESPHome toolchain, e-paper component, and Google font download), Git, and Python 3.12–3.14.
1. Install build tools (Linux)
Fedora / current RHEL-family distributions
sudo dnf install -y python3 python3-pip python3-devel \
gcc gcc-c++ make cmake ninja-build pkgconf-pkg-config git unzip \
openssl openssl-devel libffi-devel
python3 --version
Use a supported Python 3.12–3.14 executable if your distribution's default python3 is older than 3.12. For example, when available in your distro's repositories:
sudo dnf install -y python3.12 python3.12-devel
PYTHON_BIN=python3.12 ./scripts/setup.sh
Debian / Ubuntu (with Python 3.12–3.14 available)
sudo apt update
sudo apt install -y python3 python3-venv python3-pip python3-dev \
build-essential cmake ninja-build pkg-config git unzip openssl libssl-dev libffi-dev
python3 --version
Older releases may ship an unsupported Python by default: install a supported Python via your distribution's official packages or use a newer distribution. Verify that the venv module is present for the Python you select.
USB serial access (both families)
Check which device appears after plugging in the board:
ls -l /dev/serial/by-id/ 2>/dev/null || true
ls /dev/ttyACM* /dev/ttyUSB* 2>/dev/null || true
If you receive Permission denied, grant your user access to the serial device group (commonly dialout), then log out and back in:
sudo usermod -aG dialout "$USER"
Use the group shown by ls -l SERIAL_DEVICE_PATH (replace the placeholder) if it differs from dialout. Avoid running ESPHome as root unless there is a specific, understood reason.
2. Create an isolated Python environment
From the project directory:
./scripts/setup.sh
source .venv/bin/activate
esphome version
The setup script creates .venv and installs the version pinned in requirements.txt, including the CLI and dependencies. Alternative manual installation:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
Do not run sudo pip install or change system Python packages. ESPHome 2026.10.0 is the only compile-verified baseline for this revision; other versions may change component behavior. Its package requires Python >=3.12 and <3.15. ESPHome is pinned, but transitive dependencies, the external driver and remote fonts are not a complete reproducibility lock.
3. Configure Wi-Fi and device encryption
cp secrets.example.yaml secrets.yaml
openssl rand -base64 32
Edit secrets.yaml: enter the 2.4 GHz Wi-Fi SSID/password and replace device_api_key with the entire newly generated Base64 key. Every newly provisioned device should use its own key. Never commit secrets.yaml.
Example file structure (not valid credentials):
wifi_ssid: "YOUR_2_4_GHZ_WIFI_SSID"
wifi_password: "YOUR_WIFI_PASSWORD"
device_api_key: "PASTE_A_UNIQUE_BASE64_32_BYTE_KEY_HERE"
The api: encryption key also secures OTA updates in this baseline. Existing flashed devices need migration care: do not rotate their API key or enable the new OTA encryption mode blindly; follow migration notes.
4. Validate and build
./scripts/validate.sh
.venv/bin/esphome compile rockbase-voice-satellite.yaml
validate.sh runs the independent duplicate-key/hardware/security checker and esphome config; add --compile to include the build. The first build downloads ESP-IDF toolchain packages and the external e-paper component, so Internet access is required. Neither command flashes the device.
For a public review or CI job that must not access operator credentials:
./scripts/validate.sh --public --compile
.venv/bin/python -m unittest discover -s tools -p 'test_*.py'
--public copies the same baseline and its dashboard support files to a temporary directory, generates disposable test credentials and cleans up that directory afterward. Build artifacts remain under .esphome/build/public-validation/; do not flash them. It neither reads nor overwrites your secrets.yaml. To compile the optional HA imports using public placeholders, run ./scripts/validate.sh --public --dashboard --compile; its artifacts use .esphome/build/public-dashboard-validation/. The checker alone can be run with .venv/bin/python tools/check_config.py rockbase-voice-satellite.yaml.
5. Flash firmware (first installation by USB)
Connect a USB data cable and identify the serial port. Replace SERIAL_DEVICE_PATH below with its actual device path, preferably the stable path from /dev/serial/by-id/:
.venv/bin/esphome run rockbase-voice-satellite.yaml --device SERIAL_DEVICE_PATH
The run command validates, builds, uploads, and opens logs. If USB flashing fails because the board does not enter download mode, consult the board documentation for its BOOT/RESET procedure; do not assume button functions are identical on every revision.
6. Add it to Home Assistant
- Wait for the ESPHome node to join Wi-Fi.
- In Settings → Devices & services → Add integration → ESPHome, connect to
rockbase-voice-satellite.localor the address assigned by your router. - Supply the API encryption key from
secrets.yamlif prompted. - In Settings → Voice assistants, create/select an assistant with the desired language, STT provider and TTS provider. Local Whisper/Piper services or configured cloud providers are options; test the pipeline in HA first. Under the device's Assist satellite settings, select that assistant/pipeline. The voice assistant needs a reachable Home Assistant API connection.
- Press USER briefly, say a command, and confirm a spoken response. Then test the Speaker Volume, Temperature Calibration Offset, Humidity Calibration Offset, and Refresh E-Paper entities.
7. Subsequent updates (OTA)
./scripts/validate.sh
.venv/bin/esphome compile rockbase-voice-satellite.yaml
.venv/bin/esphome run rockbase-voice-satellite.yaml --device rockbase-voice-satellite.local
If mDNS is unavailable, use the device's own assigned IP address instead of .local, e.g. --device DEVICE_IP after replacing the placeholder. OTA uses the same API encryption key under the encrypted OTA configuration. Keep backups of the YAML and secrets before upgrading firmware.
Inspect logs without flashing (redact network details and recognized speech before sharing):
.venv/bin/esphome logs rockbase-voice-satellite.yaml --device rockbase-voice-satellite.local
8. Basic operation
The display now uses fast whole-screen refresh every five minutes and full
refresh every fifteen minutes, with a full first refresh after boot. Deadlines
are checked every ten seconds, measured from actual refresh starts, and deferred
during audio. Fast mode still transfers both B/W and red planes; red retention
needs hardware testing. The manual button always requests full refresh, and
repeated clicks coalesce into one pending request behind the 60-second cooldown.
Set full_update_every: 1 for full-only waveforms; also set
display_auto_refresh: "false" for manual-only operation.
- Press USER once and release; speak when listening starts. Home Assistant ends recording using silence detection. If an e-paper refresh is already running, the request waits for it to finish; no hold or second press is required.
- The AHT20 reports a new sample every 60 seconds. The board can self-heat, so leave calibration offsets at 0 initially, then calibrate against a stable reference after thermal equilibrium. Offsets are saved by ESPHome.
- Use Refresh E-Paper in HA to request a full cycle ahead of the automatic schedule. Requests wait for the voice engine and speaker buffers, and repeated clicks coalesce into one pending full cycle behind the 60-second cooldown after completion.
- The shown time follows Home Assistant's timezone after synchronization with HA 2026.3+. Before that, the build computer's detected timezone is the fallback (UTC in
--publicchecks); older HA may retain that fallback. No installation timezone is hardcoded. The screen time is a snapshot and advances only on refresh. - For first acceptance, verify audible STT/TTS, volume persistence after reboot, raw versus corrected AHT20 readings, and black/white/red on a manual refresh. Run the complete hardware matrix before relying on the device.
- Weather/forecast/media imports are optional. Enable the dashboard HA package and replace its three public entity placeholders locally; the default firmware shows missing-data labels until configured. Existing local temperature/humidity IDs and calibration sliders are unchanged.
- E-paper CS is GPIO46, confirmed against the manufacturer pin map and working dashboard. The earlier GPIO3 assignment was incorrect (battery ADC). See hardware source and pinout.
For optional weather/media bindings, copy packages/dashboard-homeassistant-example.yaml
to packages/dashboard-homeassistant.yaml if the latter does not exist. Edit the
three entity substitutions in that local, Git-ignored file.
./scripts/validate.sh --compile automatically enables it when present and builds
the baseline when absent. Direct ESPHome compile/run commands require
-s dashboard_enabled true before the subcommand to enable it; see DISPLAY.md.
The --public --dashboard validation uses only the public example, not local bindings.
9. Troubleshooting and rollback
For missing dependencies or an unsupported Python version, rerun setup with a supported PYTHON_BIN. For USB permissions, use the serial device's group as described above. For API failures, check the existing encryption key and network reachability; for silence, verify the HA pipeline and TTS volume before changing hardware settings. Missing AHT20 readings require checking GPIO40 power and I²C address 0x38. See troubleshooting.
Before an update, save the working YAML, secrets, firmware binaries and exact dependency versions outside Git. A YAML backup alone cannot reproduce an older image when upstream dependencies have moved. Restore the known-good configuration and dependency versions, validate, then install via the currently supported OTA protocol; use USB if the device cannot boot or credentials/protocols differ. The rollback commands and existing-device migration guide describe the recovery path.
Repository layout
.
├── rockbase-voice-satellite.yaml # complete ESPHome firmware config
├── secrets.example.yaml # public template only
├── requirements.txt # pinned ESPHome toolchain version
├── AGENTS.md # instructions for Codex and contributors
├── README.pl.md # Polish setup guide
├── docs/ # hardware, display, testing, migration, issues
├── scripts/setup.sh # creates isolated Python environment
├── scripts/validate.sh # checks YAML and ESPHome config
├── tools/check_config.py # offline baseline guardrail
├── tools/test_check_config.py # negative regression tests for the guardrail
├── tools/test_dashboard.py # host C++ forecast/comfort tests
├── dashboard.h # forecast parser and descriptive comfort bands
├── packages/dashboard-homeassistant-example.yaml # public HA bindings template
├── packages/dashboard-homeassistant.yaml # local bindings, ignored; create from example
├── examples/home-assistant/weather-forecast-3h.yaml # HA forecast template
├── .gitignore
├── AUTHORS.md # original author(s) / rights-holder record
├── SOURCE.md # canonical upstream/source attribution
└── LICENSE # full unmodified GPLv3 text
License and attribution
The original project files in this repository are licensed under GNU General Public License, version 3 or any later version (GPL-3.0-or-later). The full, unmodified GPLv3 license text is in LICENSE. The source files carry SPDX-License-Identifier and SPDX-FileCopyrightText notices.
The original author and copyright holder is Krzysztof "grenn" Pogorzelski. The canonical project repository is https://code.devnull.com.pl/homeassistant/rockbase-voice-satellite.git. See AUTHORS.md and SOURCE.md for attribution. When redistributing, preserve applicable original copyright/license notices and identify the origin of the project. If you modify and distribute the project or a compiled GPL-covered firmware, follow the GPL's requirements concerning corresponding source and notices. This does not prohibit selling copies.
The ESPHome framework, external e-paper driver and Roboto font retain their own licenses; see the dependency record. SPDX headers remain on original source, scripts and Markdown documents. The simple requirements, secrets template and ignore file need no extra header; LICENSE is unmodified.
Caveats and upstream dependencies
- The
epaper_spidriver is fetched fromparkghost/esphome-epaper; it is an independent third-party project, not bundled here. It may change upstream: the separate pin proposal records the compile-tested commit. Hardware qualification is still required. - Fast refresh for
depg0420is not proof of physical rectangular partial refresh.full_update_every: 3enables the requested full/fast/fast cycle; set it to1for full-only rollback. See display research. - ES8311 register overrides and pinout target this board variant; verify on other revisions. High-frequency noises or sensor self-heating require hardware investigation, not random register changes.
- This repository is not affiliated with RockBase, ESPHome or Home Assistant. Their respective software and trademarks belong to their owners.
Publish as a Git repository
After checking that secrets.yaml is excluded (the .gitignore already covers it), initialize a repository or add these files to your own hosting service:
git init
git add README.md README.pl.md AGENTS.md CHANGELOG.md CONTRIBUTING.md \
AUTHORS.md SOURCE.md LICENSE .gitignore .editorconfig requirements.txt \
rockbase-voice-satellite.yaml secrets.example.yaml docs scripts tools
git status --short
git commit -m "Initial public RockBase voice satellite project"
The author and canonical repository are already recorded in AUTHORS.md and SOURCE.md. Inspect git status --short before the first commit. To push a newly initialized working tree to the canonical Forgejo repository, configure git remote add origin https://code.devnull.com.pl/homeassistant/rockbase-voice-satellite.git (only if an origin remote does not already exist), then push using your normal Forgejo credentials. Do not add secrets.yaml.