Power Sensor Component

The power sensor component provides an API for getting measurements of voltage, current, and power consumption.

If you have a physical power sensor, an API endpoint, or anything else that provides such measurements, use a power sensor component.

Configuration

To use a power sensor and get its measurements, you need to add it to your machine’s configuration.

Go to your machine’s CONFIGURE page, and add a model that supports your sensor.

The following list shows the available sensor models. For additional configuration information, click on the model name:

Model
Description

API

The power sensor API supports the following methods:

Method NameDescription
GetVoltageReturn the voltage reading of a specified device and whether it is AC or DC.
GetCurrentReturn the current of a specified device and whether it is AC or DC.
GetPowerReturn the power reading in watts.
GetReadingsGet the measurements or readings that this power sensor provides.
ReconfigureReconfigure this resource.
DoCommandExecute model-specific commands that are not otherwise defined by the component API.
GetResourceNameGet the ResourceName for this power sensor with the given name.
CloseSafely shut down the resource and prevent further use.

Troubleshooting

If your power sensor is not working as expected, follow these steps:

  1. Check your machine logs on the LOGS tab to check for errors.
  2. Review your power sensor model’s documentation to ensure you have configured all required attributes.
  3. Click on the TEST panel on the CONFIGURE or CONTROL tab and test if you can use the power sensor there.

If none of these steps work, reach out to us on the Community Discord and we will be happy to help.

Next steps

For general configuration and development info, see:

To capture data from the power sensor and sync it in the cloud, see the data management service.