Skip to content

Add Micro-Air EasyStart soft-starter integration and repo tooling - #59

Merged
ptr727 merged 7 commits into
mainfrom
develop
Jul 22, 2026
Merged

ptr727 merged 7 commits into
mainfrom
develop

Conversation

@ptr727

@ptr727 ptr727 commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Promotes the EasyStart integration and supporting tooling from develop.

EasyStart (Micro-Air soft-starter)

  • New ESPHome external component exposing a Micro-Air EasyStart over ble_client: current, estimated power, line frequency, last-start peak, short-cycle delay, system state, running (from BLE presence), and start / fault / learned-start counters.
  • Reusable per-module package templates/easystart.yaml, a uv-runnable bleak monitor utility, and the reverse-engineering write-up + protocol spec under easystart/.
  • Two compressors wired into office-bluetooth-proxy.yaml.
  • Hardware-validated on a GL-S10: both modules connect and decode (values match the frame math), and running flips on/off with compressor state. Needs esp32_ble: max_connections: 5 (3 proxy default + 2 clients) and a clean rebuild to take effect.

Tooling and hygiene

  • Python utility linting (ruff/pyright pyproject + CI ruff step + VS Code recommendations), ESPHome-aware YAML custom tags, cspell terms, README device entry, secrets._yaml keys, .gitignore tooling caches, and AGENTS.md operational learnings (compile vs upload, sdkconfig clean rebuild, esp32_ble / api connection caps, local Docker linting).

Also includes the pending Dependabot action bumps (#55, #57).

🤖 Generated with Claude Code

dependabot Bot and others added 3 commits July 20, 2026 06:21
Bumps the actions-deps group with 1 update: [DavidAnson/markdownlint-cli2-action](https://github.com/davidanson/markdownlint-cli2-action).


Updates `DavidAnson/markdownlint-cli2-action` from 24.0.0 to 24.1.0
- [Release notes](https://github.com/davidanson/markdownlint-cli2-action/releases)
- [Commits](DavidAnson/markdownlint-cli2-action@8de2aa0...6bf21b0)

---
updated-dependencies:
- dependency-name: DavidAnson/markdownlint-cli2-action
  dependency-version: 24.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions-deps
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
)

Bumps the actions-deps group with 1 update: [actions/checkout](https://github.com/actions/checkout).


Updates `actions/checkout` from 7.0.0 to 7.0.1
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@9c091bb...3d3c42e)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions-deps
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
EasyStart:
- New external component (easystart/components/easystart) exposing a
  Micro-Air EasyStart soft-starter over ble_client: current, estimated
  power, line frequency, last-start peak, short-cycle delay, system state,
  running (from BLE presence), and start/fault/learned-start counters.
- Reusable per-module package templates/easystart.yaml and a uv-runnable
  bleak monitor utility (easystart/python) with ruff/pyright config.
- Reverse-engineering write-up, protocol spec, and agent playbook under
  easystart/. Two compressors wired into office-bluetooth-proxy.yaml.
- Hardware-validated on a GL-S10: both modules connect and decode, and
  running flips on/off with compressor state.

Config fix found on hardware:
- bluetooth_proxy + 2 ble_clients need esp32_ble: max_connections: 5
  (3 proxy default + 2 clients); the option moved off esp32_ble_tracker
  and a change requires a clean rebuild to take effect.

Tooling and hygiene:
- Python utility linting: pyproject (ruff/pyright, fleet standard) plus a
  CI ruff step and VS Code recommendations; ESPHome-aware YAML custom tags.
- cspell terms, README device entry, secrets template keys, .gitignore
  caches, and AGENTS.md operational learnings (compile vs upload, sdkconfig
  clean rebuild, esp32_ble/api connection caps, local Docker linting).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings July 22, 2026 21:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR promotes a new Micro-Air EasyStart integration into this ESPHome configuration repo by adding an external BLE component (via ble_client), a reusable YAML package, a Python BLE monitor utility, and accompanying reverse-engineering documentation. It also updates repo tooling and CI linting to support the new Python utility and improves general hygiene.

Changes:

  • Add an ESPHome external component (easystart) plus a parameterized YAML package to expose EasyStart telemetry via Bluetooth proxy devices.
  • Add EasyStart reverse-engineering docs, protocol spec, and helper tooling (APK pull script, uv/bleak live monitor).
  • Update repo tooling/CI: ruff linting for the Python utility, YAML custom tags, cspell terms, gitignore entries, and workflow action bumps.

Reviewed changes

Copilot reviewed 20 out of 21 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
templates/easystart.yaml New reusable packages: include for EasyStart sensors bound to a ble_client.
secrets._yaml Adds placeholder secret keys for EasyStart module MACs.
README.md Documents the new EasyStart integration and where it is used.
office-bluetooth-proxy.yaml Wires two EasyStart modules into the office Bluetooth proxy and registers the external component.
ESPHome-Config.code-workspace Adds Python formatter settings, YAML custom tags for !include, and extension recommendations.
easystart/tools/pull-apk.sh Adds an adb helper script to extract APKs for reverse engineering.
easystart/README.md Adds project overview, workflow, and integration notes for EasyStart.
easystart/python/requirements.txt Adds a minimal dependency list for non-uv usage (bleak).
easystart/python/README.md Documents how to run and validate the live BLE monitor utility.
easystart/python/pyproject.toml Adds ruff/pyright tooling configuration for the monitor utility folder.
easystart/python/easystart_monitor.py New uv-runnable (PEP 723) live BLE monitor for discovery and frame decoding.
easystart/PROTOCOL.md Adds the reverse-engineered BLE protocol specification and validation notes.
easystart/components/easystart/easystart.h Adds the C++ ESPHome component implementation (BLE polling and frame parsing).
easystart/components/easystart/init.py Adds ESPHome codegen + config schema for the external component.
easystart/BLE-RE-PLAYBOOK.md Adds a generalized BLE reverse-engineering playbook derived from this effort.
easystart/AGENTS.md Adds project-specific agent notes, constraints, and verified tool invocations.
cspell.json Adds EasyStart and reverse-engineering/tooling terms to the spelling dictionary.
AGENTS.md Extends operational runbook (compile/upload/clean gotchas, lint commands, RE tooling policy).
.gitignore Ignores Python cache/artifact directories produced by the new utility tooling.
.github/workflows/test-pull-request.yml Bumps pinned actions and adds uv + ruff linting for the new Python utility; broadens cspell scope to all READMEs.
.github/workflows/publish-release.yml Bumps pinned actions/checkout to v7.0.1.

Comment thread easystart/python/easystart_monitor.py Resolved
- Remove the current_threshold config option end-to-end (schema, codegen,
  C++ setter and member). It was written but never read, so it advertised a
  non-functional knob; running is derived from BLE presence, not a threshold.
- Point the bleak ImportError message at 'uv run' (the recommended PEP 723
  path) instead of only 'pip install bleak'.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings July 22, 2026 21:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 20 out of 21 changed files in this pull request and generated 3 comments.

Comment thread easystart/tools/pull-apk.sh Resolved
ptr727 and others added 2 commits July 22, 2026 14:52
…ening

- easystart.h: add explicit includes for format_hex_pretty (core/helpers.h)
  and NAN (<cmath>) instead of relying on transitive includes.
- easystart.h: tighten the publish_offline_ comment - it blanks the live
  measurements and state text; cumulative counters keep their last value.
- pull-apk.sh: grep -iF -- for the package query so it is a literal substring
  match and tolerates a leading dash, not a regex.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The easystart external component is the only first-party code in the repo
(everything else is YAML over upstream components), so a refactor can break it
at compile time where lint cannot catch it. Add a CI job that compiles a
minimal, secret-free test config against the deployed ptr727/esphome-nonroot
image. It is change-gated to the component + its test config, since an esp-idf
build costs several minutes.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings July 22, 2026 21:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 22 changed files in this pull request and generated 1 comment.

Comment thread easystart/python/pyproject.toml Resolved
Compiling easystart/test/compile-test.yaml locally makes ESPHome auto-write a
boilerplate .gitignore (and a .esphome build dir) into the config directory.
Ignore both so they do not show as untracked; CI builds to /cache, unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings July 22, 2026 23:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 22 changed files in this pull request and generated 1 comment.

Comment thread easystart/test/compile-test.yaml Resolved
@ptr727
ptr727 merged commit d50bd0b into main Jul 22, 2026
6 checks passed
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.

2 participants