What's changed
Bug fixes
Auto-reconnect on lost connection (BlockedStateError)
When an Apple TV enters standby or the network drops briefly, the connection object enters a blocked state. Commands previously failed with remote_control is blocked. The server now detects this and reconnects automatically before retrying the command.
Startup retry with protocol probe
On startup, pyatv sometimes connects without establishing the Companion/MRP protocol, causing commands to fail with left is not supported or app_list is not supported. The server now probes the connection after connecting and retries with a re-scan (up to 3 attempts, 1s/2s backoff) if the protocol is missing.
HomePod and AirPlay-only devices are unaffected — the probe is skipped for devices that don't advertise Companion/MRP.
Other
- 18 unit tests added covering reconnect logic, probe/retry, and edge cases