Skip to content

Releases: dasimon135/pymadoka

Release list

v0.3.7

Choose a tag to compare

@dasimon135 dasimon135 released this 18 Jul 11:19
872f394

What's changed

  • One path decision per candidate connect (max_attempts=1 in the candidate loop): under Home Assistant, retries inside establish_connection could silently fail over to the strongest-signal — possibly unbonded — proxy mid-attempt (habluetooth rescores paths on every attempt; bleak-retry-connector's ble_device_callback is 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_source is 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

Choose a tag to compare

@dasimon135 dasimon135 released this 18 Jul 08:12
f4ceec8

What's changed

  • Typed errors: MadokaError base; PairingRequiredError (carries the attempted proxy sources) when every path refuses the authenticated bond; DeviceUnreachableError when no BLE path sees the device; ConnectionException now subclasses MadokaError. is_pairing_error() classifies auth/bond failures from error text (ATT error 0x05, insufficient encryption, pairing failed, BlueZ auth errors); a pair() timeout is treated as a pairing failure at the call site. Typed errors propagate out of start(); background reconnects record them in connection.last_error.
  • Candidate-list connect API: Controller(..., candidates_callback=...) — ordered BLEDevice paths (preferred proxy first), per-path pairing classification, connection.connected_source reports 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_error cleared on any successful connect.
  • Explicit pairing-timeout message (#3).
  • ConnectionStatus exported 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