You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Changes are still needed because Gen1 responses and configured channels are handled incorrectly, and authentication is omitted from discovery and status requests.
Adds a Shelly relay consumer for on/off control, with configurable channel, credentials, generation-aware switching, and support for consumers without power measurements.
Changes:
Adds Shelly relay configuration and consumer implementation.
Adds authenticated relay commands and status polling.
Updates common consumer handling to default unavailable power values to zero.
Unresolved findings remain in consumer.py: a critical Gen1/channel status-parsing issue (4 votes) and a moderate authentication issue affecting discovery and polling (2 votes). This pull request requires changes.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The Shelly consumer leaves generation detection and status reads unauthenticated, so configured credentials fail on authentication-enabled devices and prevent initialization or state reporting.
Trigger a new review: Comment @sourcery-ai review on the pull request.
Continue discussions: Reply directly to Sourcery's review comments.
Generate a GitHub issue from a review comment: Ask Sourcery to create an
issue from a review comment by replying to it. You can also reply to a
review comment with @sourcery-ai issue to create an issue from it.
Generate a pull request title: Write @sourcery-ai anywhere in the pull
request title to generate a title at any time. You can also comment @sourcery-ai title on the pull request to (re-)generate the title at any time.
Generate a pull request summary: Write @sourcery-ai summary anywhere in
the pull request body to generate a PR summary at any time exactly where you
want it. You can also comment @sourcery-ai summary on the pull request to
(re-)generate the summary at any time.
Generate reviewer's guide: Comment @sourcery-ai guide on the pull
request to (re-)generate the reviewer's guide at any time.
Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
pull request to resolve all Sourcery comments. Useful if you've already
addressed all the comments and don't want to see them anymore.
Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
request to dismiss all existing Sourcery reviews. Especially useful if you
want to start fresh with a new review - don't forget to comment @sourcery-ai review to trigger a new review!
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The change adds authenticated status requests, but existing Shelly PM and EM consumers do not pass their configured credentials, so authenticated devices will still fail status and power polling.
This adds authenticated status requests, but the existing Shelly PM and Shelly EM consumers still call request_status(address, generation) without forwarding their configured credentials (consumers/shelly/shelly_pm/consumer.py:59 and shelly_em/consumer.py:20). Consequently authenticated devices still fail their status/power polling; please wire the same generation-specific auth into those call sites as well, or otherwise scope this API change so all authenticated Shelly consumers use it.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
A critical authentication-handling issue remains: the shared response hook raises the initial 401 before HTTP digest authentication can retry, causing authenticated Gen2 status and relay requests to fail.
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
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.
openWB/openwb-ui-settings#1157
Summary by Sourcery
Add configurable Shelly relay consumers and improve handling of authentication and missing consumer power data.
New Features:
Bug Fixes:
Enhancements: