Skip to content

NetworkPowerPort: add support for Shelly Gen2+ #1664

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aparcar
Copy link
Contributor

@aparcar aparcar commented Jun 13, 2025

Description

The API changed and no longer excepts POST for the legacy API. This commit adds support for the "new" RPC API.

Ref: https://shelly-api-docs.shelly.cloud/gen2/General/RPCProtocol

Tested with a Shelly Plug S MTR Gen3

Checklist

  • Documentation for the feature
    • Added in docstring
  • Tests for the feature
    • Tested with real hardware
  • The arguments and description in doc/configuration.rst have been updated
  • Add a section on how to use the feature to doc/usage.rst
  • Add a section on how to use the feature to doc/development.rst
  • PR has been tested
  • Man pages have been regenerated

The API changed and no longer excepts POST for the legacy API. This
commit adds support for the "new" RPC API.

Ref: https://shelly-api-docs.shelly.cloud/gen2/General/RPCProtocol

Signed-off-by: Paul Spooren <mail@aparcar.org>
@aparcar aparcar marked this pull request as ready for review June 13, 2025 16:44
Copy link

codecov bot commented Jun 13, 2025

Codecov Report

Attention: Patch coverage is 0% with 12 lines in your changes missing coverage. Please review.

Project coverage is 55.7%. Comparing base (6d8febb) to head (ff8223f).
Report is 9 commits behind head on master.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
labgrid/driver/power/shelly_gen2.py 0.0% 12 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master   #1664     +/-   ##
========================================
- Coverage    55.8%   55.7%   -0.1%     
========================================
  Files         170     171      +1     
  Lines       13388   13400     +12     
========================================
  Hits         7472    7472             
- Misses       5916    5928     +12     
Flag Coverage Δ
3.10 55.7% <0.0%> (-0.1%) ⬇️
3.11 55.7% <0.0%> (-0.1%) ⬇️
3.12 55.7% <0.0%> (-0.1%) ⬇️
3.13 55.7% <0.0%> (-0.1%) ⬇️
3.9 55.7% <0.0%> (-0.1%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

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.

1 participant