Releases: dasimon135/pymadoka
Releases · dasimon135/pymadoka
Release list
v0.3.7
What's changed
- One path decision per candidate connect (
max_attempts=1in the candidate loop): under Home Assistant, retries insideestablish_connectioncould silently fail over to the strongest-signal — possibly unbonded — proxy mid-attempt (habluetooth rescores paths on every attempt; bleak-retry-connector'sble_device_callbackis vestigial in 4.6.0). Failover now belongs to the candidate loop, so an unbonded proxy can no longer hold the device's single central slot through repeated SMP timeouts. Driven by a real field incident (device unreachable >20 min). connected_sourceis reset on disconnect/cleanup — callers never read a stale path.
PyPI: https://pypi.org/project/pymadoka-ng/0.3.7/
Full Changelog: v0.3.6...v0.3.7
v0.3.6
What's changed
- Typed errors:
MadokaErrorbase;PairingRequiredError(carries the attempted proxy sources) when every path refuses the authenticated bond;DeviceUnreachableErrorwhen no BLE path sees the device;ConnectionExceptionnow subclassesMadokaError.is_pairing_error()classifies auth/bond failures from error text (ATT error 0x05, insufficient encryption, pairing failed, BlueZ auth errors); apair()timeout is treated as a pairing failure at the call site. Typed errors propagate out ofstart(); background reconnects record them inconnection.last_error. - Candidate-list connect API:
Controller(..., candidates_callback=...)— orderedBLEDevicepaths (preferred proxy first), per-path pairing classification,connection.connected_sourcereports the winning proxy. Enables sticky-proxy behavior in Home Assistant; without the callback, behavior is unchanged. - Connection robustness: stale disconnect callbacks can no longer clobber a live connection; failed paths are disconnected before trying the next; background tasks are tracked and quiesced by
cleanup();last_errorcleared on any successful connect. - Explicit pairing-timeout message (#3).
ConnectionStatusexported at package level; test suite 16 → 46.
PyPI: https://pypi.org/project/pymadoka-ng/0.3.6/
Full Changelog: v0.3.5...v0.3.6