Skip to content

feat: Add a v1 protocol channel that can send messages across MQTT or Local connections, preferring local #416

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Aug 3, 2025

Conversation

allenporter
Copy link
Contributor

@allenporter allenporter commented Jul 16, 2025

Add a V1Channel class that wraps the MQTT and Local channels and handles getting the network info from mqtt and decidign which channel is available. The local connection does not handle retries yet, which will be fixed in a follow up change.

Most of the PR is for tests exercising corner cases. This PR was heavily coded by Co-pilot.

@allenporter allenporter requested a review from Lash-L July 16, 2025 13:57
self._callback = callback

# First establish MQTT connection
self._mqtt_unsub = await self._mqtt_channel.subscribe(self._on_mqtt_message)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it worth doing error handling here? Or are we just doing it above subscribe?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My current thinking is to propagate to the caller. I've added pydoc explaining the expectations. (We can change, though i take your main point as it's not clear whats supposed to happen)

@Lash-L
Copy link
Collaborator

Lash-L commented Aug 3, 2025

Sorry that took me so long - should be faster for any follow ups

allenporter and others added 3 commits August 3, 2025 09:15
Bumps [click](https://github.com/pallets/click) from 8.1.8 to 8.2.1.
- [Release notes](https://github.com/pallets/click/releases)
- [Changelog](https://github.com/pallets/click/blob/main/CHANGES.rst)
- [Commits](pallets/click@8.1.8...8.2.1)

---
updated-dependencies:
- dependency-name: click
  dependency-version: 8.2.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@allenporter allenporter merged commit c1bdac0 into Python-roborock:main Aug 3, 2025
8 of 12 checks passed
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.

2 participants