feat: add MQTT-over-WebSocket client with real-time device telemetry decoding - #30
Merged
Merged
Conversation
Copilot
AI
changed the title
feat: add MQTT-over-WebSocket support with device telemetry decoding
feat: MQTT-over-WebSocket client with real-time device telemetry decoding
Jul 25, 2026
Copilot created this pull request from a session on behalf of
stuartp44
July 25, 2026 17:56
View session
|
Thanks for opening this pull request, @Copilot! A maintainer will review your PR soon. In the meantime, please make sure:
Feel free to ask questions if you need help! |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Owner
|
@copilot can you add the ability for the new MQTT over WS via the cli? |
Contributor
Author
Done — added a Usage: pymbrewclient watch-device-logs \
--username you@example.com \
--password secret \
--serial 2403K0561-61BMUWBUOptions:
Also fixed |
- Updated the MQTT client to include Wi-Fi RSSI and next action timestamps in device log messages. - Improved the decoding of telemetry fields, including measurements and nested state values. - Added a curated output function for device logs to simplify the displayed information. - Adjusted the CLI to support a debug mode that reveals all fields in the device log output. - Modified the REST API client to fetch user profiles from the correct endpoint. - Removed outdated binary fixture and replaced it with hex representation for better readability. - Enhanced unit tests to cover new telemetry fields and ensure accurate decoding of device logs.
stuartp44
marked this pull request as ready for review
July 25, 2026 20:54
stuartp44
approved these changes
Jul 25, 2026
stuartp44
force-pushed
the
copilot/add-mqtt-over-websocket-support-again
branch
from
July 25, 2026 21:02
4ad796f to
c118bce
Compare
|
🎉 This PR is included in version 1.10.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces MQTT-over-WebSocket support to the
pymbrewclientlibrary, enabling real-time streaming and decoding of MiniBrew device telemetry. It adds a newMqttClientimplementation, typed message models, and a CLI command for live device log monitoring. The documentation is updated with usage examples and security caveats. Several internal and public APIs are extended to support MQTT integration.MQTT-over-WebSocket Integration:
MqttClientclass and typed message models (MqttMessage,DeviceLogMessage) for real-time device telemetry over MQTT-over-WebSocket, including schema caveats and field-level documentation. (src/pymbrewclient/mqtt/client.py,src/pymbrewclient/mqtt/models.py,src/pymbrewclient/mqtt/__init__.py) [1] [2]paho-mqttfor MQTT support. (pyproject.toml)CLI Enhancements:
watch-device-logsCLI command to stream and print real-time device logs, with options for selecting devices, output format, debug mode, and duration. (src/pymbrewclient/cli.py)src/pymbrewclient/cli.py) [1] [2]API and Public Interface Updates:
BreweryClientwithcreate_mqtt_client()andget_user_profile()methods to facilitate MQTT credential generation and user profile access. (src/pymbrewclient/client.py)__init__.pyexports to include the new MQTT client and models, and to exposeUserProfilein the public API. (src/pymbrewclient/__init__.py)Documentation:
docs/API_EXAMPLES.md)These changes collectively enable robust, real-time monitoring of MiniBrew devices through both code and the command line, and lay the groundwork for further MQTT-based features.