Skip to content

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