Nut - v0.0.9
    Preparing search index...

    Interface IMonitorEvents

    interface IMonitorEvents {
        "*": (event: string, ...args: any[]) => void;
        BATTERY_CHARGE: (charge: number, rawCharge: string) => void;
        BATTERY_RUNTIME: (charge: number, rawCharge: string) => void;
        BYPASS: () => void;
        CAL: () => void;
        COMMBAD: () => void;
        COMMOK: () => void;
        FSD: () => void;
        LOWBATT: () => void;
        NOCOMM: () => void;
        NOTBYPASS: () => void;
        NOTCAL: () => void;
        NOTOFF: () => void;
        OFF: () => void;
        ONBATT: () => void;
        ONLINE: () => void;
        REPLBATT: () => void;
        SHUTDOWN: () => void;
        UNKNOWN_STATUS: (status: string) => void;
        VARIABLE_CHANGED: (
            key: nutVariablesNames,
            oldValue: string,
            newValue: string,
            oldVariables: nutVariables,
            newVariables: nutVariables,
        ) => void;
        VARIABLES_CHANGED: (
            oldVariables: nutVariables,
            newVariables: nutVariables,
        ) => void;
    }
    Index

    Properties

    "*": (event: string, ...args: any[]) => void

    allow to listen to all events

    BATTERY_CHARGE: (charge: number, rawCharge: string) => void

    CHARGE of the battery

    Type declaration

      • (charge: number, rawCharge: string): void
      • Parameters

        • charge: number

          the current charge of the UPS (can be NaN)

        • rawCharge: string

          the raw value of charge (in case of NaN)

        Returns void

    BATTERY_RUNTIME: (charge: number, rawCharge: string) => void

    RUNTIME of the battery

    Type declaration

      • (charge: number, rawCharge: string): void
      • Parameters

        • charge: number

          the current charge of the UPS (can be NaN)

        • rawCharge: string

          the raw value of charge (in case of NaN)

        Returns void

    BYPASS: () => void

    UPS on bypass (powered, not protecting).

    CAL: () => void

    UPS calibration in progress.

    COMMBAD: () => void

    Communication with the UPS was just lost.

    COMMOK: () => void

    Communication with the UPS has been established.

    FSD: () => void

    The UPS has been commanded into the "forced shutdown" mode.

    LOWBATT: () => void

    The UPS battery is low (as determined by the driver).

    NOCOMM: () => void

    The UPS can’t be contacted for monitoring.

    NOTBYPASS: () => void

    UPS no longer on bypass.

    NOTCAL: () => void

    UPS calibration finished.

    NOTOFF: () => void

    UPS no longer administratively OFF or asleep.

    OFF: () => void

    UPS administratively OFF or asleep.

    ONBATT: () => void

    The UPS is on battery.

    ONLINE: () => void

    The UPS is back online.

    REPLBATT: () => void

    The UPS needs to have its battery replaced.

    SHUTDOWN: () => void

    The local system is being shut down.

    UNKNOWN_STATUS: (status: string) => void

    UPS STATUS IS UNKNOWN

    VARIABLE_CHANGED: (
        key: nutVariablesNames,
        oldValue: string,
        newValue: string,
        oldVariables: nutVariables,
        newVariables: nutVariables,
    ) => void

    get a variable change

    Type declaration

    VARIABLES_CHANGED: (
        oldVariables: nutVariables,
        newVariables: nutVariables,
    ) => void

    get all variables update

    Type declaration