Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/test-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,15 @@ jobs:
echo "Templates that no example device in test/ includes: ${missing[*]}"
exit 1
fi
# A flashed example device runs on a bench with no Home Assistant and maybe no network, so it must not reboot for lack of either.
rebooting=()
for path in test/*.yaml; do
grep -qE "^ api_reboot_timeout: [\"']?0s[\"']?( *#.*)?\$" "$path" && grep -qE "^ wifi_reboot_timeout: [\"']?0s[\"']?( *#.*)?\$" "$path" || rebooting+=("$path")
done
if (( ${#rebooting[@]} > 0 )); then
echo "Example devices not setting api_reboot_timeout and wifi_reboot_timeout to 0s: ${rebooting[*]}"
exit 1
fi
CONFIGS="$(basename -a -s .yaml test/*.yaml | jq -Rsc 'split("\n") | map(select(length > 0))')"
echo "Template matrix: $CONFIGS"
echo "template-configs=$CONFIGS" >> "$GITHUB_OUTPUT"
Expand Down
1 change: 1 addition & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ ESPHome configuration templates and projects.
- Added M5Stack CoreS3 support, with an LVGL touch screen example device.
- Added M5Stack GC0308 camera overlay support.
- Added M5Stack Dial support, with an LVGL and rotary encoder example device.
- Changed the example devices to disable the API and WiFi reboot timeouts, so a flashed one runs on a bench without Home Assistant.
- Version 2.3:
- Changed OTA to encryption only, using the API key, so only the upgrade bridge build still needs the `ota_password` secret.
- Fixed the compile warnings the templates and the EasyStart component can address.
Expand Down
3 changes: 2 additions & 1 deletion OPERATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ fi
- **Point `config_dir` at a checkout rather than at the deployed tree.** The dashboard's container already serves that tree, so compile it there with `docker exec` rather than in a second container.
- **`latest` gives CI parity, not dashboard parity.** CI pulls `latest` fresh on every run, so run `docker pull ptr727/esphome-nonroot:latest` first for parity. That can be newer than the dashboard's last pull. Before an install, rerun with the image tag set to the dashboard's ESPHome version, per [Running the ESPHome CLI][running-the-esphome-cli]. The image's Docker Hub tag list carries each ESPHome release as a tag, such as `2026.9.1`.
- **Compile a [`test/`][test] example device to gate a template change.** A top-level device config works the same way, but the example device is what CI builds.
- **An example device sets `api_reboot_timeout` and `wifi_reboot_timeout` to `0s`.** A flashed one then keeps running on a bench with no Home Assistant and no network, rather than rebooting every 15 minutes. Every template that sets a reboot timeout reads the matching substitution. A template with no `wifi:` block, such as an ethernet-only board's, ignores the WiFi half. CI's change-detection job fails an example device that leaves either one out.
- **`secrets.yaml` belongs at the repository root**, not beside the config being compiled, because [`templates/secrets.yaml`][secrets-template] re-exports the root file and every template resolves `!secret` through it. Generate one from [`secrets._yaml`][secrets-example], and the guard above keeps a real one from being overwritten.
- **`/entrypoint/cache.sh` runs first**, and it prepares the `/cache` mount the image expects.
- **`/cache` holds the toolchain and the build tree, so keep it between runs.** A fresh directory each time makes every local compile a cold ESP-IDF build of several minutes. It also holds ESPHome's ccache store, `home/.cache/esphome/idf/ccache`, so a kept directory turns most repeat compiles into cache hits. CI uses one regardless, since it discards the runner.
Expand Down Expand Up @@ -303,7 +304,7 @@ Do not `!remove` blocks from Apollo's package without checking what depends on t
- **The 15% figure applies to a raw count read against the hardware scale.** A framework that normalizes a calibrated reading onto a fixed 1100mV scale is a separate case, and its constant is correct there. Check which scale a count is on before applying either number.
- **The status LED is dark when healthy, deliberately.** ESPHome drives the pin low when healthy, which lights an active low LED. This board's LED is active high and bright white on a unit that runs from a cell. It blinks through a PWM output capped at `status_led_brightness`, 50% by default, since full drive glares.
- **The SX1262 cannot be driven through ESPHome on this board.** The `sx126x` component reaches an RF switch only through the radio's own DIO2. The KCT8103L front-end is wired to three ESP32 pins instead, one selecting the transmit or receive path per packet. Those pins are documented and left unclaimed.
- **A bench unit needs both reboot timeouts disabled.** Override `api_reboot_timeout` and `wifi_reboot_timeout` to `0s`. Every template that sets a reboot timeout reads the matching substitution, so this reaches far more than this board. An ethernet board carries no `wifi:` block, so the WiFi half does nothing there. A unit on a desk with no Home Assistant restarts part way through a cold GNSS acquisition.
- **A bench unit needs both reboot timeouts disabled**, as every example device does per [Compiling the Way CI Does][compiling-the-way-ci-does]. On this board a unit on a desk with no Home Assistant otherwise restarts part way through a cold GNSS acquisition.

### M5Stack CoreS3

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ ESPHome configuration templates and projects.
- Added M5Stack CoreS3 support, with an LVGL touch screen example device.
- Added M5Stack GC0308 camera overlay support.
- Added M5Stack Dial support, with an LVGL and rotary encoder example device.
- Changed the example devices to disable the API and WiFi reboot timeouts, so a flashed one runs on a bench without Home Assistant.

See [Release History][history] for complete release notes and older versions.

Expand Down
2 changes: 2 additions & 0 deletions test/adafruit-esp32-s3-feather.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
substitutions:
device_name: adafruit-esp32-s3-feather-test
device_friendly_name: "Adafruit ESP32-S3 Feather Test"
api_reboot_timeout: 0s
wifi_reboot_timeout: 0s

packages:
device: !include ../templates/adafruit-esp32-s3-feather.yaml
2 changes: 2 additions & 0 deletions test/aoycocr-x5p.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
substitutions:
device_name: aoycocr-x5p-test
device_friendly_name: "Aoycocr X5P Test"
api_reboot_timeout: 0s
wifi_reboot_timeout: 0s

packages:
device: !include ../templates/aoycocr-x5p.yaml
2 changes: 2 additions & 0 deletions test/apollo-plt-1b.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
substitutions:
device_name: apollo-plt-1b-test
device_friendly_name: "Apollo PLT-1B Test"
api_reboot_timeout: 0s
wifi_reboot_timeout: 0s

packages:
device: !include ../templates/apollo-plt-1b.yaml
2 changes: 2 additions & 0 deletions test/easystart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
substitutions:
device_name: easystart-test
device_friendly_name: "EasyStart Test"
api_reboot_timeout: 0s
wifi_reboot_timeout: 0s

packages:
device: !include ../templates/waveshare-esp32-s3-eth.yaml
Expand Down
2 changes: 2 additions & 0 deletions test/efun-sh331.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
substitutions:
device_name: efun-sh331-test
device_friendly_name: "EFUN SH331 Test"
api_reboot_timeout: 0s
wifi_reboot_timeout: 0s

packages:
device: !include ../templates/efun-sh331.yaml
2 changes: 2 additions & 0 deletions test/elecrow-thinknode-m7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
substitutions:
device_name: elecrow-thinknode-m7-test
device_friendly_name: "Elecrow ThinkNode M7 Test"
api_reboot_timeout: 0s
wifi_reboot_timeout: 0s

packages:
device: !include ../templates/elecrow-thinknode-m7.yaml
2 changes: 2 additions & 0 deletions test/esp32-s3-devkitc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
substitutions:
device_name: esp32-s3-devkitc-test
device_friendly_name: "ESP32-S3-DevKitC Test"
api_reboot_timeout: 0s
wifi_reboot_timeout: 0s

packages:
device: !include ../templates/esp32-s3-devkitc.yaml
2 changes: 2 additions & 0 deletions test/esp32-s3-wroom-1-n16r8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ substitutions:
device_friendly_name: "ESP32-S3-WROOM-1-N16R8 Test"
# Third-party N16R8 boards commonly follow the DevKitC-1 v1.0 layout, RGB LED on GPIO48 not GPIO38.
rgb_led_pin: GPIO48
api_reboot_timeout: 0s
wifi_reboot_timeout: 0s

packages:
device: !include ../templates/esp32-s3-devkitc.yaml
Expand Down
2 changes: 2 additions & 0 deletions test/esp32-s3-wroom-2-n16r8v.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
substitutions:
device_name: esp32-s3-wroom2-n16r8v-test
device_friendly_name: "ESP32-S3-WROOM-2-N16R8V Test"
api_reboot_timeout: 0s
wifi_reboot_timeout: 0s

packages:
device: !include ../templates/esp32-s3-devkitc.yaml
Expand Down
2 changes: 2 additions & 0 deletions test/esp32-s3-wroom-2-n32r8v.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
substitutions:
device_name: esp32-s3-wroom2-n32r8v-test
device_friendly_name: "ESP32-S3-WROOM-2-N32R8V Test"
api_reboot_timeout: 0s
wifi_reboot_timeout: 0s

packages:
device: !include ../templates/esp32-s3-devkitc.yaml
Expand Down
2 changes: 2 additions & 0 deletions test/gls10-bluetooth-proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
substitutions:
device_name: gls10-bluetooth-proxy-test
device_friendly_name: "GL-S10 Bluetooth Proxy Test"
api_reboot_timeout: 0s
wifi_reboot_timeout: 0s

packages:
device: !include ../templates/gls10-bluetooth-proxy.yaml
2 changes: 2 additions & 0 deletions test/heltec-wifi-lora32-v4-r8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
substitutions:
device_name: heltec-wifi-lora32-v4-r8-test
device_friendly_name: "Heltec WiFi LoRa 32 V4-R8 Test"
api_reboot_timeout: 0s
wifi_reboot_timeout: 0s

packages:
device: !include ../templates/heltec-wifi-lora32-v4-r8.yaml
Expand Down
2 changes: 2 additions & 0 deletions test/kincony-kc868-asr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
substitutions:
device_name: kincony-kc868-asr-test
device_friendly_name: "Kincony KC868-ASR Test"
api_reboot_timeout: 0s
wifi_reboot_timeout: 0s

packages:
device: !include ../templates/kincony-kc868-asr.yaml
2 changes: 2 additions & 0 deletions test/konnected-blaq.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
substitutions:
device_name: konnected-blaq-test
device_friendly_name: "Konnected blaQ Test"
api_reboot_timeout: 0s
wifi_reboot_timeout: 0s

packages:
device: !include ../templates/konnected-blaq.yaml
2 changes: 2 additions & 0 deletions test/m5stack-cores3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
substitutions:
device_name: m5stack-cores3-test
device_friendly_name: "M5Stack CoreS3 Test"
api_reboot_timeout: 0s
wifi_reboot_timeout: 0s

packages:
device: !include ../templates/m5stack-cores3.yaml
Expand Down
2 changes: 2 additions & 0 deletions test/m5stack-dial.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
substitutions:
device_name: m5stack-dial-test
device_friendly_name: "M5Stack Dial Test"
api_reboot_timeout: 0s
wifi_reboot_timeout: 0s

packages:
device: !include ../templates/m5stack-dial.yaml
Expand Down
2 changes: 2 additions & 0 deletions test/norvi-enet-ae06-r.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
substitutions:
device_name: norvi-enet-ae06-r-test
device_friendly_name: "Norvi ENET-AE06-R Test"
api_reboot_timeout: 0s
wifi_reboot_timeout: 0s

packages:
device: !include ../templates/norvi-enet-ae06-r.yaml
Expand Down
2 changes: 2 additions & 0 deletions test/rocket-astra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
substitutions:
device_name: rocket-astra-test
device_friendly_name: "RocketController ASTRA Test"
api_reboot_timeout: 0s
wifi_reboot_timeout: 0s

packages:
device: !include ../templates/rocket-astra.yaml
2 changes: 2 additions & 0 deletions test/smarthome-ceilsense.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
substitutions:
device_name: smarthome-ceilsense-test
device_friendly_name: "SmartHomeShop CeilSense Test"
api_reboot_timeout: 0s
wifi_reboot_timeout: 0s

packages:
device: !include ../templates/smarthome-ceilsense.yaml
2 changes: 2 additions & 0 deletions test/sonoff-s31.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
substitutions:
device_name: sonoff-s31-test
device_friendly_name: "Sonoff S31 Test"
api_reboot_timeout: 0s
wifi_reboot_timeout: 0s

packages:
device: !include ../templates/sonoff-s31.yaml
2 changes: 2 additions & 0 deletions test/sonoff-th10.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
substitutions:
device_name: sonoff-th10-test
device_friendly_name: "Sonoff TH10 Test"
api_reboot_timeout: 0s
wifi_reboot_timeout: 0s

packages:
device: !include ../templates/sonoff-th10.yaml
2 changes: 2 additions & 0 deletions test/unexpectedmaker-pros3d.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
substitutions:
device_name: unexpectedmaker-pros3d-test
device_friendly_name: "Unexpected Maker ProS3D Test"
api_reboot_timeout: 0s
wifi_reboot_timeout: 0s

packages:
device: !include ../templates/unexpectedmaker-pros3d.yaml
2 changes: 2 additions & 0 deletions test/waveshare-esp32-s3-eth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
substitutions:
device_name: waveshare-esp32-s3-eth-test
device_friendly_name: "Waveshare ESP32-S3-ETH Test"
api_reboot_timeout: 0s
wifi_reboot_timeout: 0s

packages:
device: !include ../templates/waveshare-esp32-s3-eth.yaml
Expand Down
2 changes: 2 additions & 0 deletions test/wemos-lolin32-lite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
substitutions:
device_name: wemos-lolin32-lite-test
device_friendly_name: "WEMOS LOLIN32 Lite Test"
api_reboot_timeout: 0s
wifi_reboot_timeout: 0s

packages:
device: !include ../templates/wemos-lolin32-lite.yaml
Loading