Skip to content

Improve raise-message for better debugging#418

Merged
bouwew merged 6 commits intomainfrom
fw-410
Mar 4, 2026
Merged

Improve raise-message for better debugging#418
bouwew merged 6 commits intomainfrom
fw-410

Conversation

@bouwew
Copy link
Contributor

@bouwew bouwew commented Mar 4, 2026

Also, update max-version for firmware 2015-09-18 to 2.6

Summary by CodeRabbit

  • Bug Fixes

    • Corrected exception handling so both relevant errors are reliably caught.
    • Improved error messages to include protocol version and device identifier for clearer debugging.
  • Updates

    • Increased supported maximum firmware protocol version for a specific firmware release.
  • Chores

    • Project version and changelog updated to v0.47.3.

@coderabbitai
Copy link

coderabbitai bot commented Mar 4, 2026

📝 Walkthrough

Walkthrough

Three minor maintenance updates: fix Python 3 exception syntax, improve CircleClockSetRequest error message to include protocol version and MAC, and raise max supported Zigbee protocol from 2.5 to 2.6 for a specific firmware entry.

Changes

Cohort / File(s) Summary
Exception Handling Syntax
plugwise_usb/connection/__init__.py
Converted Python 2-style exception syntax except NodeError, StickError: to Python 3-style except (NodeError, StickError):.
Error Message Enhancement
plugwise_usb/messages/requests.py
Made CircleClockSetRequest's raised MessageError include the unsupported protocol version and the device MAC in the message.
Firmware Version Support
plugwise_usb/nodes/helpers/firmware.py
Updated CIRCLE_FIRMWARE_SUPPORT entry for datetime(2015, 9, 18, 8, 53, 15, tzinfo=UTC) to increase max supported Zigbee protocol from 2.5 to 2.6.
Release & Changelog
pyproject.toml, CHANGELOG.md
Bumped project version to 0.47.3 and added a v0.47.3 changelog entry mentioning the improved raise-message PR.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • dirixmjm
  • ArnoutD
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Improve raise-message for better debugging' directly describes the main change in the PR: improving error messages by making them more descriptive, as evidenced by the more detailed exception message in CircleClockSetRequest.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fw-410

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai bot requested review from ArnoutD and dirixmjm March 4, 2026 07:51
@codecov
Copy link

codecov bot commented Mar 4, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.06%. Comparing base (47e3bf8) to head (5cc8be5).

Files with missing lines Patch % Lines
plugwise_usb/connection/__init__.py 0.00% 1 Missing ⚠️
plugwise_usb/messages/requests.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #418   +/-   ##
=======================================
  Coverage   82.06%   82.06%           
=======================================
  Files          36       36           
  Lines        8181     8181           
=======================================
  Hits         6714     6714           
  Misses       1467     1467           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 4, 2026

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@CHANGELOG.md`:
- Line 5: Update the CHANGELOG entry for PR `#418` to include the firmware support
bump: append or modify the line "- PR
[418](https://github.com/plugwise/python-plugwise-usb/pull/418): Improve
raise-message for better debugging" to also mention the 2015-09-18 firmware
max-version update to 2.6 (e.g., "..., and bump 2015-09-18 firmware max-version
to 2.6") so the changelog reflects both the raise-message improvement and the
firmware support change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cd290b1d-8da6-4f17-805c-da40d73d7b80

📥 Commits

Reviewing files that changed from the base of the PR and between d69f967 and 5cc8be5.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • pyproject.toml

## Ongoing updates
## v0.47.3 - 2026-03-04

- PR [418](https://github.com/plugwise/python-plugwise-usb/pull/418): Improve raise-message for better debugging
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Changelog entry should include the firmware support bump from this PR.

The current note mentions only the raise-message improvement, but the PR objective also includes the 2015-09-18 firmware max-version update to 2.6. Please include that for accurate release traceability.

✏️ Suggested changelog tweak
-- PR [418](https://github.com/plugwise/python-plugwise-usb/pull/418): Improve raise-message for better debugging
+- PR [418](https://github.com/plugwise/python-plugwise-usb/pull/418): Improve raise-message for better debugging; update 2015-09-18 firmware max supported Zigbee protocol from 2.5 to 2.6
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- PR [418](https://github.com/plugwise/python-plugwise-usb/pull/418): Improve raise-message for better debugging
- PR [418](https://github.com/plugwise/python-plugwise-usb/pull/418): Improve raise-message for better debugging; update 2015-09-18 firmware max supported Zigbee protocol from 2.5 to 2.6
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CHANGELOG.md` at line 5, Update the CHANGELOG entry for PR `#418` to include
the firmware support bump: append or modify the line "- PR
[418](https://github.com/plugwise/python-plugwise-usb/pull/418): Improve
raise-message for better debugging" to also mention the 2015-09-18 firmware
max-version update to 2.6 (e.g., "..., and bump 2015-09-18 firmware max-version
to 2.6") so the changelog reflects both the raise-message improvement and the
firmware support change.

@bouwew bouwew marked this pull request as ready for review March 4, 2026 15:11
@bouwew bouwew requested a review from a team as a code owner March 4, 2026 15:11
datetime(2015, 6, 16, 21, 9, 10, tzinfo=UTC): SupportedVersions(min=2.0, max=2.6),
datetime(2015, 6, 18, 14, 0, 54, tzinfo=UTC): SupportedVersions(min=2.0, max=2.6),
datetime(2015, 9, 18, 8, 53, 15, tzinfo=UTC): SupportedVersions(min=2.0, max=2.5),
datetime(2015, 9, 18, 8, 53, 15, tzinfo=UTC): SupportedVersions(min=2.0, max=2.6),
Copy link
Contributor

Choose a reason for hiding this comment

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

Just wondering whether it makes to have a "max" version at all for some functionality?
On the other hand, we don't really expect any firmware updates anyway.

Copy link
Contributor

@dirixmjm dirixmjm left a comment

Choose a reason for hiding this comment

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

LGTM

@bouwew bouwew merged commit 37444c1 into main Mar 4, 2026
15 of 17 checks passed
@bouwew bouwew deleted the fw-410 branch March 4, 2026 15:33
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