From ea3f41b3f950da62e8933141f979a8d3cdca014e Mon Sep 17 00:00:00 2001 From: Alex Hope-O'Connor Date: Mon, 7 Sep 2026 20:46:00 +1000 Subject: [PATCH] release: prepare ArduinoHA v3.2.0 --- .github/workflows/release.yml | 29 +++++++++++++++++++++++++++++ CHANGELOG.md | 14 ++++++++++++++ README.md | 2 +- docs/getting-started.md | 2 +- library.json | 2 +- library.properties | 2 +- src/ArduinoHADefines.h | 2 +- 7 files changed, 48 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 00d3392..afdae2c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,8 +9,37 @@ permissions: contents: write jobs: + test_harness: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - home_assistant: "2024.11.3" + - home_assistant: stable + env: + HA_VERSION: ${{ matrix.home_assistant }} + TEST_HARNESS_EXPECT_DISABLED_CLEANUP: "0" + COMPOSE_FILE: tests/ha-test-harness/compose.yaml + steps: + - uses: actions/checkout@v4 + - name: Start broker and Home Assistant + run: docker compose up -d mqtt homeassistant + - name: Check single-to-device migration + run: docker compose run --rm tests + - name: Restart Home Assistant from retained data + run: docker compose restart homeassistant + - name: Check retained discovery after restart + run: docker compose run --rm -e TEST_HARNESS_MODE=retained-restart tests + - name: Collect Home Assistant logs on failure + if: failure() + run: docker compose logs --no-color homeassistant mqtt + - name: Remove test harness volumes + if: always() + run: docker compose down -v publish: runs-on: ubuntu-latest + needs: test_harness steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a34f29..bf5c05a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## 3.2.0 + +**Discovery publication and resilience:** + +- Batch direct MQTT discovery writes into bounded 128-byte chunks, avoiding hundreds of tiny TCP writes while preserving streaming payload generation. +- Treat allocation or streaming failure as a failed discovery publication, discard the unfinished payload, and reconnect before the next retained update. +- Allocate device-discovery component serializers only for sizing and emission, reducing peak heap use; make serializer allocation failure safe. + +**Compatibility, tests, and documentation:** + +- Add the reusable, Docker-based HA/MQTT testkit and run ArduinoHA migration and retained-restart checks against Home Assistant 2024.11.3, stable, and dev. +- Make the fixed baseline and current stable test-harness lanes release gates; keep the rolling dev lane scheduled/manual. +- Add maintained, credential-free PlatformIO ESP8266/ESP32 example projects and compile them in CI. + ## 3.1.0 **Home Assistant MQTT compatibility:** diff --git a/README.md b/README.md index a065b1a..f6b8458 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ Build [ESP Sensor](examples/01-esp-sensor/) for a complete ESP8266/ESP32 project ```ini lib_deps = - home-assistant-integration=https://github.com/alexhopeoconnor/arduino-home-assistant.git#v3.1.0 + home-assistant-integration=https://github.com/alexhopeoconnor/arduino-home-assistant.git#v3.2.0 ``` PlatformIO clones the Git repository and checks out the ref after `#`; that ref is a release tag, not a GitHub Release asset. Arduino IDE is supported through the included [`library.properties`](library.properties). diff --git a/docs/getting-started.md b/docs/getting-started.md index 93e3fe6..c09c9b4 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -11,7 +11,7 @@ ArduinoHA talks to Home Assistant over **MQTT** (TCP). You need an MQTT broker r ```ini lib_deps = - home-assistant-integration=https://github.com/alexhopeoconnor/arduino-home-assistant.git#v3.1.0 + home-assistant-integration=https://github.com/alexhopeoconnor/arduino-home-assistant.git#v3.2.0 ``` **Arduino IDE:** this fork is not indexed by Library Manager. Download the diff --git a/library.json b/library.json index be8090f..ae48729 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "home-assistant-integration", - "version": "3.1.0", + "version": "3.2.0", "description": "Maintained Home Assistant MQTT discovery and entity integration for Arduino and ESP devices.", "keywords": [ "mqtt", diff --git a/library.properties b/library.properties index 22a4adc..6594fbd 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=home-assistant-integration -version=3.1.0 +version=3.2.0 author=Dawid Chyrzynski , Alex Hope-O'Connor maintainer=Alex Hope-O'Connor sentence=Home Assistant MQTT integration for Arduino diff --git a/src/ArduinoHADefines.h b/src/ArduinoHADefines.h index 511789d..2c1c35d 100644 --- a/src/ArduinoHADefines.h +++ b/src/ArduinoHADefines.h @@ -32,7 +32,7 @@ #endif // Current library version used in discovery origin metadata. -#define ARDUINOHA_LIBRARY_VERSION "3.1.0" +#define ARDUINOHA_LIBRARY_VERSION "3.2.0" #if defined(ARDUINOHA_DEBUG) #include