Commit graph

6 commits

Author SHA1 Message Date
f4297e6fce 2.0.0
Directives and answers travel over MQTT alone, the session is reopened with
a wait of 1 to 60 s, interfaces are rows in program memory, a device has
capabilities with instances, names and semantics, one handler takes the
directive with the device in hand, and the messages beside a Response are
there: ErrorResponse, DeferredResponse, ChangeReport, scene and doorbell
events. A 1.x sketch compiles as it is; the readme says what changes for it.

Light on a D1 mini: static RAM 30,616 B (1.1.0: 52,768), flash 332,705 B
(1.1.0: 350,885). 148 host tests, 17 sketches build without a warning.

On 2026-09-28, with a board and a real Alexa account: nine interfaces
driven, a deferred answer, an ErrorResponse, a ChangeReport and a doorbell
press; the session scenarios on a scripted broker, loss of Wi-Fi included.
Voice commands were not tested yet.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-28 22:57:22 +00:00
7369883479 Examples of 1.x move to examples/legacy, one sketch folder each
basicLight, lightWithBrightness, lightWithColorTemp, tempSensor and blindControl become
examples/legacy/<name>/<name>.ino, which the Arduino IDE and PlatformIO both open. Their content is
unchanged: they keep proving that a 1.x sketch compiles against 2.0, and their discovery tests
(test/test_discovery) are untouched.

Built for d1_mini from the sketch folders, 0 warnings each; basicLight takes 30,520 bytes of static
RAM and 333,989 of flash, the same as before the move. library.json and the readme name the new
place.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-28 21:40:25 +00:00
cb5c9876fe Version 1.2.0 in library.json, library.properties and the discovery attributes
After 8ea7778 the readme described the behaviour as 1.2.0 while the package still said 1.1.0: PlatformIO listed "Alex2ESP @ 1.1.0" in the dependency graph, and the devices reported softwareVersion and firmwareVersion 1.1.0 to Alexa.

The choice made here: the number changes now, with the first commits of the 1.2.0 work, and not in the commit that closes the checkpoint. From this commit on the readme, the package files and the code agree at every commit of the branch, and nothing has to be remembered before the tag. The branch is not a release until it is tagged.

The code had the number twice, as the softwareVersion member of AlexaDevice and as a literal for firmwareVersion. Both now use ALEX2ESP_VERSION from the new src/AlexaVersion.h, so a release changes three places: that header, library.json and library.properties. The readme's hint for pinning a release keeps v1.1.0, the newest tag that exists.

For a sketch: getSoftwareVersion() and the discovery attributes say 1.2.0.

examples/basicLight.cpp for d1_mini, static RAM / flash in bytes: 34,452 / 337,461 -> 34,452 / 337,461, no warnings; the dependency graph of the build says "Alex2ESP @ 1.2.0".

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-28 16:02:52 +00:00
87caad25be 1.1.0: begin(username, password, rootTopic) - the library signature now matches every example, the readme and the website (as published since 2024 no sketch could authenticate: the 64-hex password became the MQTT username). Discovery answers go out over MQTT directly, every device, resumed from loop() under heap pressure within the backend's 5 s window, instead of the 5-slot HTTP queue that silently dropped the rest (which the backend's reconcile then deleted from Alexa). JSON aligned with Alexa / alex2node: event.payload present, ActionMapping payload an object, semantics only when a capability has mappings. Pointer-stable device/capability containers (std::deque), the MQTT payload is copied by length before parsing (no write past the buffer), fragmented directive ids are ignored (a Discover is answered on its first fragment), deprecated ArduinoJson 7 calls replaced, credential Serial prints removed, ESP32 include guards (untested; the ESP8266 is the target). Examples: WIFI_PASSWORD, LED_BUILTIN fallback, string+int print fixes. library.json + library.properties restored (1.1.0; AsyncMqttClient, ArduinoJson 7, ESP Async TCP), LICENSE (MIT), a real keywords.txt, .gitattributes text=auto eol=lf (tree normalised to LF). readme: Forgejo URLs, platformio.ini snippet, Library Manager install, begin() order, INTERIOR_BLIND for blinds, 1.1.0 changelog. All five examples compile warning-free for d1_mini (PlatformIO 6.2, espressif8266) on pve-B450.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-28 04:58:38 +00:00
David
1313f47856 Add examples (brightness, color temp, temp sensor, blind control) + AlexaStatusMessage; update src/keywords/readme; drop library.json/properties 2024-12-24 12:00:00 +00:00
chaos511
85d59985d2 initial release 2024-12-18 16:44:06 -06:00