Skip to content

UPS capacity override is not exposed through GraphQL API #2035

Description

@laurensguijt

Environment

Unraid OS Version:
7.3.1

Unraid API Version:
4.35.1+a9625ae2

Are you using a reverse proxy?
Yes, but I also reproduced the issue by accessing the server directly on the local network.

UPS:
Eaton 3P Ellipse 900 USB DIN

UPS service:
Built-in apcupsd

Pre-submission Checklist

  • I have verified that my Unraid OS is up to date
  • I have tested this issue by accessing my server directly, not through a reverse proxy
  • This is not an Unraid Connect related issue

Issue Description

My UPS reports its load percentage through apcupsd, but does not report its nominal wattage.

Unraid provides an Override UPS Capacity (Watts) setting. After entering the correct capacity of 540 W, the Unraid WebUI successfully calculates and displays the estimated UPS power usage.

However, this configured override is not exposed through the GraphQL API. The API continues to return null for both nominalPower and currentPower.

Steps to Reproduce

  1. Connect a UPS that reports LOADPCT, but does not report its nominal power through apcupsd.
  2. Enable the built-in Unraid UPS service.
  3. Enter 540 under Override UPS Capacity (Watts).
  4. Confirm that the Unraid WebUI displays the nominal power and calculated wattage.
  5. Query the GraphQL API:
query GetUPSDashboard {
  upsDevices {
    id
    name
    model
    status
    power {
      inputVoltage
      outputVoltage
      loadPercentage
      nominalPower
      currentPower
    }
  }
}

Expected Behavior

When Override UPS Capacity (Watts) is configured, the GraphQL API should return:

  • nominalPower: the configured override value, for example 540
  • currentPower: the calculated power usage based on the configured capacity and load percentage

For example:

540 W × 6% = 32.4 W

Actual Behavior

The Unraid WebUI displays the calculated wattage correctly, but the GraphQL API still returns:

{
  "loadPercentage": 6,
  "nominalPower": null,
  "currentPower": null
}

Additional Context

The raw apcaccess status output includes:

MODEL    : Eaton 3P
STATUS   : ONLINE
LOADPCT  : 5.0 Percent
BCHARGE  : 100.0 Percent
TIMELEFT : 83.2 Minutes
OUTPUTV  : 237.0 Volts

It does not include NOMPOWER or a direct wattage value, which is why the override is required.

I also briefly tested the same UPS using the NUT plugin. NUT was able to read additional UPS data, including the actual real power value, but NUT data is not exposed through the official Unraid GraphQL API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions