diff --git a/CHANGELOG.md b/CHANGELOG.md index 16329e8..ffeb17c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ Adopts [`ebus-service-discovery`](https://github.com/electrification-bus/python- - The `mdns` extra installs `ebus-service-discovery[zeroconf]>=0.5.0` in place of `zeroconf>=0.131.0`. zeroconf still comes with it, as a dependency of that package. - `utility-meter --discover` finds the broker with `ebus-service-discovery` (`mdns.browse_many()`, `ebus.rank_brokers()`, `ebus.match_configured()`). A plain (non-TLS) broker config now also accepts `_mqtt._tcp`; a TLS config still accepts only `_secure-mqtt._tcp`. `use_tls` follows the discovered service type, and when the config names a `host`, only a discovered broker that is that host is used, so another broker never receives the config's credentials. The fallback to the config's `host` after `--discover-timeout` seconds is unchanged. - `simple-span-controller` accepts only the `_secure-mqtt._tcp` advertisement whose SRV target is `span-.local` (it matched a substring of the target before, and also browsed `_mqtt._tcp`), and connects by that host name instead of the first IPv4 address. When this host cannot resolve `.local` names, it connects to the panel's most-preferred advertised address. +- Requires `ebus-mqtt-client>=0.8.0` (was 0.7.0). After a dropped link, paho replayed the QoS 1 and 2 messages it still held after `on_connect`, so an older retained value overwrote the tree the SDK republishes on connect; 0.8.0 sends them first ([electrification-bus/ebus-mqtt-client#21](https://github.com/electrification-bus/ebus-mqtt-client/issues/21), [#106](https://github.com/electrification-bus/python-sdk/issues/106)). ## [0.25.0] — 2026-10-08 diff --git a/README.md b/README.md index 9a29f9d..58ee3ce 100644 --- a/README.md +++ b/README.md @@ -403,7 +403,7 @@ See [`examples/README.md`](examples/README.md) for example scripts demonstrating ## Requirements - Python 3.10+ -- [`ebus-mqtt-client`](https://github.com/electrification-bus/ebus-mqtt-client) >= 0.7.0 (the MQTT transport layer; it pins `paho-mqtt`, so the SDK does not depend on paho directly. 0.7.0 exposes the MQTT retain flag, so a device ignores a retained `/set` replayed at resubscribe; 0.6.0 holds every publish issued while the link is down and flushes it before `on_connect`, where 0.5.0 left QoS 1 and 2 to paho, whose replay landed after the SDK's on-connect republish and could exceed the broker's receive quota, leaving a root's retained `$state` on `init`; 0.5.0 holds retained QoS 0 publishes issued before the link is up and flushes them on connect, rather than dropping them and warning about each: a root built with `mqtt_cfg=` connects asynchronously, so the SDK itself creates that window whenever a construction-time `state_transition()` publishes before CONNACK; 0.4.0 provides `MqttClient.asyncio_driver()`, the loop-native alternative to paho's background thread; 0.3.0 ships the `py.typed` marker, so a downstream type checker resolves the re-exported `MqttClient` to the concrete class rather than `Any`; 0.2.0 adds the `on_disconnect_callback` the SDK's disconnect hook adopts; and, since 0.1.8, it carries the asynchronous, down-broker-tolerant connect the resilient-connect behavior relies on) +- [`ebus-mqtt-client`](https://github.com/electrification-bus/ebus-mqtt-client) >= 0.8.0 (the MQTT transport layer; it pins `paho-mqtt`, so the SDK does not depend on paho directly. 0.8.0 takes back the messages paho kept from a dropped link and sends them before `on_connect`, where paho replayed them afterwards, so an older retained value overwrote the tree the SDK republishes on connect; 0.7.0 exposes the MQTT retain flag, so a device ignores a retained `/set` replayed at resubscribe; 0.6.0 holds every publish issued while the link is down and flushes it before `on_connect`, where 0.5.0 left QoS 1 and 2 to paho, whose replay landed after the SDK's on-connect republish and could exceed the broker's receive quota, leaving a root's retained `$state` on `init`; 0.5.0 holds retained QoS 0 publishes issued before the link is up and flushes them on connect, rather than dropping them and warning about each: a root built with `mqtt_cfg=` connects asynchronously, so the SDK itself creates that window whenever a construction-time `state_transition()` publishes before CONNACK; 0.4.0 provides `MqttClient.asyncio_driver()`, the loop-native alternative to paho's background thread; 0.3.0 ships the `py.typed` marker, so a downstream type checker resolves the re-exported `MqttClient` to the concrete class rather than `Any`; 0.2.0 adds the `on_disconnect_callback` the SDK's disconnect hook adopts; and, since 0.1.8, it carries the asynchronous, down-broker-tolerant connect the resilient-connect behavior relies on) Optional extras: diff --git a/pyproject.toml b/pyproject.toml index 007a2c5..6eced3c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,12 @@ classifiers = [ dependencies = [ # MQTT transport lives in ebus-mqtt-client, which pins paho-mqtt; the SDK # does not import paho directly, so paho is a transitive dependency (not - # declared here). Floor 0.7.0: subscribe(..., with_retain=True) exposes the + # declared here). Floor 0.8.0: after a dropped link it takes back the QoS 1 + # and 2 messages paho still holds and sends them before on_connect, where + # paho replayed them after the SDK's on-connect refresh_tree, so an older + # retained value overwrote the fresh one (electrification-bus/ + # ebus-mqtt-client#21). Earlier floors, still relied on: 0.7.0: + # subscribe(..., with_retain=True) exposes the # MQTT retain flag, which lets a device ignore a retained /set the broker # replays at every resubscribe (Homie 5 :48/:483; a caller-supplied transport # without it skips that check). Earlier floors, still relied on: 0.6.0 holds every publish issued while the link @@ -61,7 +66,7 @@ dependencies = [ # on_disconnect_callback the disconnect hook adopts (SDK-al5); 0.1.8 added the # connect_async construction the resilient-connect behavior relies on (older # clients raised ConnectionRefusedError on a down broker). - "ebus-mqtt-client>=0.7.0", + "ebus-mqtt-client>=0.8.0", ] [project.optional-dependencies]