Skip to content

Recover A01 devices after sleep and support push updates#898

Open
piitaya wants to merge 2 commits into
Python-roborock:mainfrom
piitaya:feat/a01-reconnect-and-push
Open

Recover A01 devices after sleep and support push updates#898
piitaya wants to merge 2 commits into
Python-roborock:mainfrom
piitaya:feat/a01-reconnect-and-push

Conversation

@piitaya

@piitaya piitaya commented Jul 24, 2026

Copy link
Copy Markdown

Proposed change

A01 devices (Dyad wet/dry vacuums, Zeo washers) could stop responding after going to sleep and never recover on their own. They now reconnect automatically, and Dyad vacuums can report state changes as they happen instead of only when polled.

Both changes are tested on a Roborock F25 XT (roborock.wetdryvac.a238). The listener change will need a HA core change to take effect (I'll open a PR for that)

Copilot AI review requested due to automatic review settings July 24, 2026 20:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves robustness and observability for A01 devices by (1) reporting query success/timeout to the MQTT session health manager (enabling automatic recovery after sleep/stalls) and (2) adding an API listener to consume unsolicited/pushed device state updates for Dyad devices.

Changes:

  • Added DyadApi.add_listener() to subscribe to pushed A01 RPC messages and deliver decoded/converted datapoints for known Dyad protocols.
  • Updated A01 RPC query flow to report on_timeout() / on_success() to the MQTT HealthManager.
  • Added tests covering pushed-message listener behavior and health-manager reporting on query success/timeout.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
tests/devices/traits/a01/test_init.py Adds coverage for Dyad add_listener() delivering decoded values and ignoring unknown codes/unsubscribed callbacks.
tests/devices/rpc/test_a01_channel.py Verifies A01 queries report success/timeouts to the health manager.
roborock/devices/traits/a01/init.py Implements DyadApi.add_listener() and documents the new API method.
roborock/devices/rpc/a01_channel.py Calls health_manager.on_timeout() on query timeout and health_manager.on_success() on successful completion.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Lash-L
Lash-L requested a review from allenporter July 25, 2026 01:03
@Lash-L

Lash-L commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Going to leave this one for @allenporter before I merge, looks good to me, but RPC channels are definitely more his domain!

Happy to see someone contributing logic for A01 devices though 👀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants