Skip to content

Ship the full Plug Mini hardware profile in the first-install image - #3

Merged
WiFiGUY512 merged 1 commit into
mainfrom
feat/plug-mini-hardware-profile
Nov 22, 2026
Merged

WiFiGUY512 merged 1 commit into
mainfrom
feat/plug-mini-hardware-profile

Conversation

@WiFiGUY512

Copy link
Copy Markdown
Owner

A converted plug now reports power, voltage, current and energy as soon as it joins Wi-Fi. No second flash is needed before it is useful.

What changed

  • firmware/esphome/plug-mini.yaml (new): the plug's hardware as one public package. Relay output with a restart latch, button, both LEDs, BL0937 power monitoring with calibration and range checks, lifetime and daily energy, chip temperature. No Wi-Fi, API, OTA, names or secrets.
  • Power, current and voltage are measured every 2 seconds and stay available on the plug for lambdas. Home Assistant gets rate-limited copies (1 W, 0.05 A, 1 V change, plus a heartbeat).
  • sbplug-common.yaml includes the hardware package and adds the bootstrap defaults: the "Relay" switch, the button scripts, an sntp time source, and the ESPHome project info and dashboard_import so Device Builder and Home Assistant offer Adopt.
  • firmware/esphome/addon-ble-proxy.yaml (new): an optional Bluetooth proxy to add over OTA. It is not in any payload.
  • Version 0.4.0, README and CHANGELOG.

Checked

  • All three configs validate and the portal and direct images build with ESPHome 2026.5.1.
  • Sizes: portal 988,016 bytes, direct 988,224 bytes. The flasher limit is 1,511,424.
  • switchback firmware --firmware-dir passes on the built images.
  • The direct image still has its Wi-Fi placeholders, and a patched image verifies.
  • Unit tests and ruff pass.

Not yet tested

No real plug has been converted with these images. The Adopt link points at the v0.4.0 tag, so it works only once that tag exists.

🤖 Generated with Claude Code

A converted plug now reports power, voltage, current and energy as soon
as it joins Wi-Fi, so no second flash is needed before it is useful.

- plug-mini.yaml: the hardware as one public package (relay output with
  a restart latch, button, both LEDs, BL0937 with calibration and range
  checks, lifetime and daily energy, chip temperature). Raw readings
  stay internal at 2 s; Home Assistant gets rate-limited copies.
- sbplug-common.yaml includes it and adds the bootstrap defaults, the
  ESPHome project info and dashboard_import, so the plug can be adopted.
- addon-ble-proxy.yaml: optional Bluetooth proxy, not in any payload.
- Version 0.4.0, README and CHANGELOG.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@WiFiGUY512
WiFiGUY512 merged commit 548f45a into main Nov 22, 2026
8 checks passed
@WiFiGUY512
WiFiGUY512 deleted the feat/plug-mini-hardware-profile branch November 22, 2026 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant