Get Current in amps and a boolean indicating whether the voltage is AC (true) or DC (false).
Optional
extra: Structconst powerSensor = new VIAM.PowerSensorClient(
machine,
'my_power_sensor'
);
const [current, isAc] = await powerSensor.getCurrent();
For more information, see Power Sensor API.
Get power in watts.
Optional
extra: Structconst powerSensor = new VIAM.PowerSensorClient(
machine,
'my_power_sensor'
);
const power = await powerSensor.getPower();
For more information, see Power Sensor API.
Return the readings of a sensor.
Optional
extra: Structconst powerSensor = new VIAM.PowerSensorClient(
machine,
'my_power_sensor'
);
const readings = await powerSensor.getReadings();
For more information, see Power Sensor API.
Get voltage in volts and a boolean indicating whether the voltage is AC (true) or DC (false).
Optional
extra: Structconst powerSensor = new VIAM.PowerSensorClient(
machine,
'my_power_sensor'
);
const [voltage, isAc] = await powerSensor.getVoltage();
For more information, see Power Sensor API.
Represents any sensor that reports voltage, current, and/or power