Skip to content

Commit 16bda27

Browse files
author
Maksym Shtembuliak
committed
Release 0.1.5: fix BLE example boot-loop, PN-named setup AP, changelog
Fixes - examples/esp32-ble.yaml overflowed the default 4 MB app slot (BLE + Wi-Fi + api: + captive_portal: + select:) and silently boot-looped. Drop api:, captive_portal: and the baud select: so the real image fits with headroom (BLE provisioning replaces the captive portal; the integration uses its own protocol, not the ESPHome API). OTA still works. CI does not compile this example, so the overflow had gone unnoticed. - ble_provisioning config-validation error referenced a non-existent examples/esp32-c3-ble.yaml; now points at examples/esp32-ble.yaml. Features - Fallback setup AP SSID defaults to the synthetic collector PN (V00…) when wifi: ap: is left empty (ap: {}); a user-set ap: ssid: is still respected. Chores - Bump BRIDGE_VERSION to 0.1.5 and the matching AT+VDTU strings in the host tests. - Add CHANGELOG.md. - Remove maintainer-local paths (.venv/.local) from CONTRIBUTING.md and docs/RELEASING.md; document the version-bump + changelog steps. - Clarify the BLE-profile flash-size constraints in FLASHING.md / FLASHING.uk.md. - Update GitHub Actions to current major versions in CI/release workflows. - Make components/eybond_collector/eybond_collector.h self-sufficient for <vector>.
1 parent 015f46c commit 16bda27

20 files changed

Lines changed: 205 additions & 112 deletions

‎.github/workflows/ci.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ jobs:
1111
env:
1212
ESPHOME_VERSION: "2025.7.5"
1313
steps:
14-
- uses: actions/checkout@v4
15-
- uses: actions/setup-python@v5
14+
- uses: actions/checkout@v7
15+
- uses: actions/setup-python@v6
1616
with:
1717
python-version: "3.11"
1818
- name: Install ESPHome

‎.github/workflows/release.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ jobs:
2020
env:
2121
ESPHOME_VERSION: "2025.7.5"
2222
steps:
23-
- uses: actions/checkout@v4
24-
- uses: actions/setup-python@v5
23+
- uses: actions/checkout@v7
24+
- uses: actions/setup-python@v6
2525
with:
2626
python-version: "3.11"
2727
- name: Install ESPHome
@@ -31,13 +31,13 @@ jobs:
3131
- name: Build web release
3232
run: python tools/build_web_release.py --compile --local-source --version "${GITHUB_REF_NAME}"
3333
- name: Upload release artifacts
34-
uses: softprops/action-gh-release@v2
34+
uses: softprops/action-gh-release@v3
3535
with:
3636
files: |
3737
dist/web-release/web/firmware/*.bin
3838
dist/web-release/web/manifest-*.json
3939
- name: Upload Pages artifact
40-
uses: actions/upload-pages-artifact@v3
40+
uses: actions/upload-pages-artifact@v5
4141
with:
4242
path: dist/web-release/web
4343

@@ -47,4 +47,4 @@ jobs:
4747
steps:
4848
- name: Deploy Pages
4949
id: deployment
50-
uses: actions/deploy-pages@v4
50+
uses: actions/deploy-pages@v5

‎CHANGELOG.md‎

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Changelog
2+
3+
All notable changes to this project are documented here. The format is based on
4+
[Keep a Changelog](https://keepachangelog.com/), and this project adheres to
5+
[Semantic Versioning](https://semver.org/).
6+
7+
## [0.1.5] - 2026-06-23
8+
9+
### Added
10+
- Fallback setup access point: when the YAML leaves `wifi: ap:` empty (`ap: {}`),
11+
the bridge now names the setup network after its synthetic collector PN
12+
(for example `V00…`) instead of a fixed string. A user-provided `ap: ssid:` is
13+
still respected.
14+
15+
### Fixed
16+
- **ESP32 BLE example (`examples/esp32-ble.yaml`) no longer overflows the flash
17+
partition and boot-loops.** BLE (Bluedroid) + Wi-Fi plus `api:`, `captive_portal:`
18+
and the baud `select:` exceeded the default 4 MB app slot (the real image is
19+
~12 KB larger than ESPHome's reported "Flash %"), so the board silently looped on
20+
boot. Those three are now omitted (BLE provisioning replaces the captive portal;
21+
the integration uses its own protocol, not the ESPHome API); OTA still works.
22+
- The `ble_provisioning` config-validation error pointed at a non-existent example
23+
file (`esp32-c3-ble.yaml`); it now references `examples/esp32-ble.yaml`.
24+
25+
### Changed
26+
- `BRIDGE_VERSION` bumped to `0.1.5` (advertised in the `AT+VDTU` capability string).
27+
- Documentation: clarified the BLE-profile flash-size constraints in `FLASHING.md`
28+
and `FLASHING.uk.md`; removed maintainer-local paths from `CONTRIBUTING.md` and
29+
`docs/RELEASING.md`; added this changelog.
30+
- CI / release workflows: updated GitHub Actions to current major versions.
31+
32+
## [0.1.0] – [0.1.4] - 2026-06-21 … 2026-06-23
33+
34+
Initial public releases of the virtual eybond/SmartESS Wi-Fi collector as an
35+
ESPHome external component for **ESP8266, ESP32 (incl. C3) and BK72xx/LibreTiny**,
36+
fully compatible with the [EyeBond Local](https://github.com/groove-max/ha-eybond-local)
37+
Home Assistant integration. Highlights:
38+
39+
- UDP `58899` discovery + reverse TCP `8899`, periodic heartbeats, and the AT
40+
command dictionary, with a byte-for-byte cross-check against the integration.
41+
- FC=2 / FC=3 / FC=4 with a transparent inverter UART bridge and honest timeouts
42+
(inverter silence → no reply, never a synthesized answer).
43+
- Synthetic, neutral collector identity (`V00…` PN derived from the MAC).
44+
- Runtime inverter-UART baud/format change (select entity, `AT+UART=`, FC=3 param 34).
45+
- Writable, NVS-persisted reverse-TCP server endpoint.
46+
- ESP32 BLE Wi-Fi provisioning compatible with the SmartESS Bluetooth pairing.
47+
- Status LED indication and the `AT+VDTU` virtual-bridge capability probe.
48+
- Web installer (GitHub Pages) for the ESP8266 and ESP32 presets.
49+
50+
[0.1.5]: https://github.com/groove-max/esp-eybond-collector/compare/v0.1.4...v0.1.5
51+
[0.1.0]: https://github.com/groove-max/esp-eybond-collector/releases/tag/v0.1.0
52+
[0.1.4]: https://github.com/groove-max/esp-eybond-collector/releases/tag/v0.1.4

‎CONTRIBUTING.md‎

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ components/eybond_collector/ # flat layout: ESPHome does not copy a componen
4242

4343
## Protocol Contract
4444

45-
The behavioral specification is the integration's own fake collector:
46-
`ha-eybond-local/tests/helpers/fake_collector.py` and `.local/tools/fake_collector_lib.py`. The firmware is a port of that logic. When those files change, re-run `cross_check.py`.
45+
The behavioral specification is the **EyeBond Local** integration's own reference
46+
fake collector (`fake_collector.py` / its `fake_collector_lib.py` helper). The
47+
firmware is a port of that logic. When those files change, re-run `cross_check.py`.
4748

4849
- **Discovery**: UDP `58899`, `set>server=IP:PORT;` → reply `rsp>server=2;` + reverse TCP to Home Assistant.
4950
- **Heartbeat**: FC=1 on connect, then periodic (default 60 s); payload is the PN truncated to 14 bytes. A server FC=1 is answered with its own `tid`.
@@ -71,39 +72,52 @@ EyeBond Local probes this on link-up. The `esp-collector,` prefix identifies a v
7172

7273
## Validation Pipeline
7374

74-
Four levels, fastest first. The bench cycle runs them in order.
75+
Run the checks below from fastest to slowest. The first three are hardware-free
76+
and are the normal validation path for public contributions.
77+
78+
> Test 1 needs only `g++`. Tests 2–3 import the **EyeBond Local** integration, so
79+
> check out [`ha-eybond-local`](https://github.com/groove-max/ha-eybond-local) as a
80+
> sibling directory of this repo. Run the Python/ESPHome commands in an environment
81+
> with `esphome` installed and on `PATH` (an activated virtualenv is easiest).
7582
7683
```bash
7784
# 1. Core host unit tests (plain g++, no hardware)
7885
cd host_tests && make test
7986

8087
# 2. Byte-for-byte cross-check against the integration's own builders
81-
../../.venv/bin/python3 cross_check.py
88+
python3 cross_check.py
8289

8390
# 3. Linux end-to-end: the real core (host_sim: POSIX sockets + a PTY in place of
8491
# the UART) against the integration's protocol code — discovery, heartbeat, AT,
8592
# the FC4 bridge, and timeouts
86-
../../.venv/bin/python3 e2e_sim.py
93+
python3 e2e_sim.py
8794

88-
# host_sim can also run standalone — the real integration in Home Assistant
89-
# (or .local/tools) can talk to it, with a fake inverter on the PTY:
95+
# host_sim can also run standalone — the real EyeBond Local integration (in Home
96+
# Assistant) can talk to it, with a fake inverter on the PTY:
9097
make build/host_sim && ./build/host_sim --udp-port 58899
9198

92-
# Build the firmware (esphome lives in the project-local .venv)
93-
.venv/bin/esphome compile examples/esp8266-d1-mini.yaml # ESP8266 release preset
94-
.venv/bin/esphome compile examples/esp32-devkit.yaml # ESP32 release preset
95-
96-
# 4. FULL autonomous bench cycle (unit → cross-check → compile → OTA → hardware E2E)
97-
./bench_cycle.sh [device-address]
99+
# 4. Optional: compile the release presets
100+
esphome compile examples/esp8266-d1-mini.yaml # ESP8266 release preset
101+
esphome compile examples/esp32-devkit.yaml # ESP32 release preset
98102
```
99103

100-
### Hardware-in-the-loop bench (no inverter required)
104+
### Optional maintainer hardware checks
105+
106+
The repository still contains a few low-level scripts that can help maintainers
107+
test a live board, but they are not part of the public validation contract and
108+
they expect a local hardware setup.
101109

102-
An ESP8266 connected to the host by USB only. The same USB bridge that flashes the board exposes UART0, so the host plays the inverter: `host_tests/fake_pi30_serial.py` answers PI30 commands on `/dev/ttyUSB0` (`2400 8N1`) with the values from the integration's PI30 driver tests. `host_tests/bench_e2e.py` plays the Home Assistant side (discovery, reverse TCP, AT, FC4, collector parameters, baud switching) using the integration's own builders. The bench config is `examples/bench-esp8266.yaml` (synthetic PN hard-coded so no MAC-derived identity reaches logs; faster timings for quick iteration).
110+
One useful setup is an ESP board connected to the host by USB only. The same USB
111+
bridge that flashes the board exposes UART0, so the host can play the inverter:
112+
`host_tests/fake_pi30_serial.py` answers PI30 commands on `/dev/ttyUSB0`
113+
(`2400 8N1`) with values from the integration's PI30 driver tests.
114+
`host_tests/bench_e2e.py` can then play the Home Assistant side (discovery,
115+
reverse TCP, AT, FC4, collector parameters, baud switching) using the
116+
integration's own builders.
103117

104118
`host_tests/bench_probe.py` runs the integration's real `Pi30Driver.async_probe()` against the live device — the same detection step the Home Assistant config flow performs.
105119

106-
Bench gotchas worth knowing:
120+
Hardware-check gotchas worth knowing:
107121

108122
- The first flash is over USB; every later flash is OTA, leaving the USB port free for the fake inverter.
109123
- Opening the serial port pulses DTR/RTS and reboots the board, so `bench_e2e` retries discovery until Wi-Fi is back (~10–15 s).

0 commit comments

Comments
 (0)