Skip to content

Conversation

BenM-github
Copy link

  • changed the assert upper limit to a dynamic value.
  • changed api endpoint to status.json, as it should be supported for all Gude PDUs

Description
We had a couple of issues with the current driver situation for Gude PDUs, so this is a suggestion of a single driver that might just work with all of them:

  • gude.py, gude24.py and gude8316.py do not work for named ports, they depend on "Power Port " in the HTML content, but that can be renamed in the Web UI:
    <meta http-equiv="powerstate" content="Power Port 1,0">
    <meta http-equiv="powerstate" content="Some Device,0">
    
  • gude8316.py would return the wrong port with our Gude 8316-1, as there are two lines before the <meta> section and it relies on the line number. That might have been the firmware difference that's referred to in the driver?
    <!DOCTYPE html>
    <html><head><!--
    <meta http-equiv="powerstate" content="-,1">
    ...
    
  • gude8225.py uses diffent APIs for power_set and power_get, which is a bit weird but works.
  • gude8031.py seems to be the most consistent one and works well for us, so that's what we went for as a basis, but it just checks against a constant port limit of 20 (so it breaks with 24-port PDUs) and suggests only being compatible with certain models whilst it is the most generic one.

According to the manuals, the status.json approach should work with almost all of the PDUs listed as supported in the drivers, just with the 8225 and 8080 we couldn't find any reference to status.json, so it would be nice to test this out with the other PDUs and possibly just replace all of the drivers with a single one if it also works with those two.

What would you suggest there, is that approach feasible or are there more specific behaviour differences that we are missing here? Wizkd

In general, are the power drivers for PDUs still supported or is pdudaemon now officially the replacement as mentioned in #1263 and #1031?

Checklist

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

Fixes #1263

- changed the assert upper limit to a dynamic value.
- changed api endpoint to status.json, as it should be supported for all Gude PDUs

Co-authored-by: Moritz Marquardt <[email protected]>
@Bastian-Krause
Copy link
Member

According to the manuals, the status.json approach should work with almost all of the PDUs listed as supported in the drivers, just with the 8225 and 8080 we couldn't find any reference to status.json, so it would be nice to test this out with the other PDUs and possibly just replace all of the drivers with a single one if it also works with those two.

I've just tested the 8012 and 8080 variants and these unfortunately do not support the json API.

In general, are the power drivers for PDUs still supported or is pdudaemon now officially the replacement as mentioned in #1263 and #1031?

We won't deprecate any power backends soon, but I'd like to refrain from merging new drivers that are already supported by pdudaemon.

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.

Gude EPC 1202 incompatible with existing gude power backends
2 participants