v2.5.12 – Response-paced TX, instant error futures, device-aware callbacks
Changed
- Response-paced command transmission: the TX loop waits for the previous command's response (5s safety timeout) instead of sleeping a fixed 100ms after every serial write. Command round-trips drop from ~130ms to gateway speed (~30–40ms); full device discovery is roughly 3x faster.
- Device-aware update callbacks:
register_callbackcallbacks may now accept the changed device as a single positional argument. Parameterless callbacks keep working. Callbacks fire only when a device actually changed, and a failing callback no longer breaks the others. - Lazy logging in hot paths; XML header repair only when the broken header is present.
Fixed
- Gateway error responses stalled callers for the full 10s timeout (plus retry) — faults now resolve the pending future with
Falseimmediately. updateAllDevices()crashed withAttributeError(iterated dict keys instead of devices).processTeachResponsewas never awaited, so teach/scan result processing never ran.- Sender events were stored into the sensor registry, overwriting sensors with the same id.
Verified against live gateway hardware.
🤖 Generated with Claude Code