-
Notifications
You must be signed in to change notification settings - Fork 48
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
Conversation
self._callback = callback | ||
|
||
# First establish MQTT connection | ||
self._mqtt_unsub = await self._mqtt_channel.subscribe(self._on_mqtt_message) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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)
Sorry that took me so long - should be faster for any follow ups |
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>
c4b0353
to
abb2a94
Compare
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.