Nut - v1.0.0
    Preparing search index...

    Class UPS

    Index
    description: string
    name: string
    • Get battery charge percentage (0-100). Returns NaN if the variable is not supported by the UPS or not a valid number. Throws on other errors (connection errors, access denied, etc.).

      Returns Promise<number>

    • Get battery runtime in seconds. Returns NaN if the variable is not supported by the UPS or not a valid number. Throws on other errors (connection errors, access denied, etc.).

      Returns Promise<number>

    • Parameters

      • command: string

      Returns Promise<string>

    • Get input voltage. Returns NaN if the variable is not supported by the UPS or not a valid number. Throws on other errors (connection errors, access denied, etc.).

      Returns Promise<number>

    • Get UPS load percentage (0-100). Returns NaN if the variable is not supported by the UPS or not a valid number. Throws on other errors (connection errors, access denied, etc.).

      Returns Promise<number>

    • Get UPS manufacturer. Returns empty string if the variable is not supported by the UPS. Throws on other errors (connection errors, access denied, etc.).

      Returns Promise<string>

    • Check if this client is master for the UPS

      Returns Promise<boolean>

    • Get UPS model name. Returns empty string if the variable is not supported by the UPS. Throws on other errors (connection errors, access denied, etc.).

      Returns Promise<string>

    • Returns Promise<number>

    • Get output voltage. Returns NaN if the variable is not supported by the UPS or not a valid number. Throws on other errors (connection errors, access denied, etc.).

      Returns Promise<number>

    • Get UPS serial number. Returns empty string if the variable is not supported by the UPS. Throws on other errors (connection errors, access denied, etc.).

      Returns Promise<string>

    • Get the current UPS status as an array of ENUTStatus. The ups.status variable can contain multiple space-separated status codes (e.g., "OL CHRG"). Returns an empty array if the variable is not supported by the UPS.

      Returns Promise<ENUTStatus[]>

    • Parameters

      Returns Promise<
          { type: "RW"
          | "ENUM"
          | "STRING"
          | "RANGE"
          | "NUMBER" } & Record<string, unknown>,
      >

    • Check if UPS is on battery power.

      Returns Promise<boolean>

    • Check if UPS is online (mains power).

      Returns Promise<boolean>

    • Returns Promise<string[]>

    • Returns Promise<string[]>

    • Returns Promise<Record<string, string>>

    • Returns Promise<string>

      You probably shouldn't send this command unless you are upsmon, or a upsmon replacement.

    • Set this client as master for the UPS

      Returns Promise<string>

      You probably shouldn't send this command unless you are upsmon, or a upsmon replacement.