Skip to content

feat: add SensorType enums and update telemetry handling in MQTT client - #31

Merged
stuartp44 merged 1 commit into
mainfrom
feat/protobuf-sensor-enums
Jul 26, 2026
Merged

feat: add SensorType enums and update telemetry handling in MQTT client#31
stuartp44 merged 1 commit into
mainfrom
feat/protobuf-sensor-enums

Conversation

@stuartp44

Copy link
Copy Markdown
Owner

This pull request introduces a new enums module for MQTT/protobuf telemetry, providing strongly-typed access to sensor, actuator, process, and error codes throughout the codebase and CLI. The changes improve the clarity and usability of sensor data, enhance the CLI with more human-readable output, and update documentation and exports to reflect these improvements.

Core improvements:

  • Added a comprehensive pymbrewclient.mqtt.enums module defining SensorType, ActuatorType, MachineType, MachineConnectionStatus, ProcessType, ProcessPhase, ProcessState, ErrorType, and UserAction enums for MiniBrew telemetry, enabling typed access to measurement and state identifiers.

Codebase integration and exports:

  • Updated __init__.py files in src/pymbrewclient and src/pymbrewclient/mqtt to import and export the new enums, making them available for users and internal modules. [1] [2] [3]

CLI enhancements:

  • Improved the CLI's device log output by mapping integer codes to enum names for process, machine, and sensor states, and by providing typed access to sensor readings using the new enums. Added utility functions for enum name lookup and sensor value extraction. [1] [2] [3]
  • Added a --version option to the CLI to display the installed pymbrewclient version. [1] [2] [3]

Documentation updates:

  • Updated API examples and documentation to demonstrate usage of SensorType and the new typed measurement access patterns, reflecting the improved approach to sensor data. [1] [2] [3] [4]

Internal code updates:

  • Updated internal model imports to use the new enums, ensuring type consistency and future maintainability.

@github-actions

Copy link
Copy Markdown

Thanks for opening this pull request, @stuartp44!

A maintainer will review your PR soon. In the meantime, please make sure:

  • Your code follows the project's style guidelines
  • You've added/updated tests as needed
  • Your commit messages follow Conventional Commits
  • You've updated documentation if necessary

Feel free to ask questions if you need help!

@stuartp44
stuartp44 merged commit f7f1576 into main Jul 26, 2026
8 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.11.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant