Interface PowerSensor

Represents any sensor that reports voltage, current, and/or power

interface PowerSensor {
    doCommand: ((command) => Promise<StructType>);
    getCurrent(extra?): Promise<readonly [number, boolean]>;
    getPower(extra?): Promise<number>;
    getReadings(extra?): Promise<Record<string, unknown>>;
    getVoltage(extra?): Promise<readonly [number, boolean]>;
}

Hierarchy (view full)

Implemented by

Properties

doCommand: ((command) => Promise<StructType>)

Send/Receive arbitrary commands to the resource.

Type declaration

Methods

  • Get Current in amps and a boolean that returns true if AC

    Parameters

    Returns Promise<readonly [number, boolean]>

  • Get Power in watts

    Parameters

    Returns Promise<number>

  • Return the readings of a sensor.

    Parameters

    Returns Promise<Record<string, unknown>>

  • Get Voltage in volts and a boolean that returns true if AC

    Parameters

    Returns Promise<readonly [number, boolean]>

Generated using TypeDoc