ReadonlynameThe name of the resource.
Get Current in amps and a boolean indicating whether the voltage is AC (true) or DC (false).
const 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.
const 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.
const 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).
const powerSensor = new VIAM.PowerSensorClient(machine, 'my_power_sensor');
const [voltage, isAc] = await powerSensor.getVoltage();
For more information, see Power Sensor API.
A gRPC-web client for the PowerSensor component.