Skip to content

Comments

driver/power/poe_netgear_plus: Add support#1822

Open
AiyionPrime wants to merge 2 commits intolabgrid-project:masterfrom
AiyionPrime:feat/driver/power/poe_netgear_plus
Open

driver/power/poe_netgear_plus: Add support#1822
AiyionPrime wants to merge 2 commits intolabgrid-project:masterfrom
AiyionPrime:feat/driver/power/poe_netgear_plus

Conversation

@AiyionPrime
Copy link

Description

This adds power driver support via PoE for NETGEAR Plus devices.
Those are pretty cheap managed consumer switches with no SNMP support.

I verified it by copying examples/power/* and modified the env.yml like this:

targets:
  main:
    resources:
      NetworkPowerPort:
        model: poe_netgear_plus
        host: http://unused:S3nnheiser@192.168.0.239
        index: 7
    drivers:
      NetworkPowerDriver:
        delay: 0.5

And ran the test.

(labgrid) jburfeind@workpc:~/pengutronix/first_test$ pytest --lg-env env.yaml --capture=no power_example.py 
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.12.12, pytest-9.0.2, pluggy-1.6.0
benchmark: 5.2.3 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/jburfeind/pengutronix/first_test
plugins: benchmark-5.2.3, labgrid-25.1.dev225, isort-4.0.0, cov-7.0.0, mock-3.15.1, dependency-0.6.1
collected 1 item                                                                                                                                                                            

power_example.py .

==================================================================================== 1 passed in 13.07s =====================================================================================

The hardware I used to test this is a GS308EP, but every device listed at py_netgear_plus1 should work.

Checklist

  • Documentation for the feature

  • Tests for the feature

  • The arguments and description in doc/configuration.rst have been updated

  • Add a section on how to use the feature to doc/usage.rst no new driver feature added

  • Add a section on how to use the feature to doc/development.rst no new library feature added

  • PR has been tested

  • Man pages have been regenerated man pages haven't been touched

Footnotes

  1. https://github.com/foxey/py-netgear-plus?tab=readme-ov-file#supported-and-tested-netgear-modelsproducts-and-firmware-versions

@AiyionPrime AiyionPrime force-pushed the feat/driver/power/poe_netgear_plus branch from e65e52c to 130a416 Compare February 19, 2026 09:16
@AiyionPrime
Copy link
Author

@jluebbe @Bastian-Krause could one of you enable the CI for me?
I think I have an hour after lunch to fix potential issues I overlooked.

@codecov
Copy link

codecov bot commented Feb 20, 2026

Codecov Report

❌ Patch coverage is 15.00000% with 34 lines in your changes missing coverage. Please review.
✅ Project coverage is 45.1%. Comparing base (81d768e) to head (130a416).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
labgrid/driver/power/poe_netgear_plus.py 15.0% 34 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master   #1822     +/-   ##
========================================
- Coverage    45.2%   45.1%   -0.1%     
========================================
  Files         174     175      +1     
  Lines       13752   13791     +39     
========================================
+ Hits         6224    6230      +6     
- Misses       7528    7561     +33     
Flag Coverage Δ
3.10 45.1% <15.0%> (-0.1%) ⬇️
3.11 45.1% <15.0%> (-0.1%) ⬇️
3.12 45.1% <15.0%> (-0.1%) ⬇️
3.13 45.1% <15.0%> (-0.1%) ⬇️
3.14 45.1% <15.0%> (-0.1%) ⬇️
3.9 ?

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.

for NETGEAR Plus devices

Signed-off-by: Burfeind, Jan-Niklas <jan-niklas.burfeind@sennheiser.com>
@AiyionPrime AiyionPrime force-pushed the feat/driver/power/poe_netgear_plus branch from 130a416 to 2cdb063 Compare February 20, 2026 10:37
@AiyionPrime
Copy link
Author

Coverage should now be at 27.5%.

I'm torn whether it would be worthwhile to mock the remaining lines, which require hardware.

Please let me know if you'd like to see 100%, while its not testing real hardware.

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