Configure a renogy power sensor

Configure a renogy sensor to integrate a Renogy battery temperature sensor into your robot:

Navigate to the Config tab of your robot’s page in the Viam app. Click on the Components subtab and click Create component in the lower-left corner. Select the type power_sensor, then select the renogy model. Name your sensor, and click Create.

Renogy power sensor configuration tab

Edit and fill in the attributes as applicable.

{
  "components": [
    {
      "name": "ren1",
      "type": "power_sensor",
      "model": "renogy",
      "attributes": {
        "serial_path": "string",
        "serial_baud_rate": "integer",
        "modbus_id": "integer"
      },
      "depends_on": []
    }
  ]
}
{
  "components": [
    {
      "name": "your-renogy-sensor",
      "type": "power_sensor",
      "model": "renogy",
      "attributes": {
        "serial_path": "/dev/serial0",
        "serial_baud_rate": 9600,
        "modbus_id": 1
      },
      "depends_on": []
    }
  ]
}
The following attributes are available for renogy sensors:

AttributeTypeInclusionDescription
serial_pathstringOptionalThe full filesystem path to the serial device, starting with /dev/. With your serial device connected, you can run sudo dmesg | grep tty to show relevant device connection log messages, and then match the returned device name, such as ttyS0, to its device file, such as /dev/ttyS0. If you omit this attribute, Viam will attempt to automatically detect the path. On a Raspberry Pi, you can also run ls /dev/serial/by-path to list USB serial devices. If you omit this attribute, Viam will attempt to automatically detect the path.
Example: "/dev/serial/by-path/usb-0:1.1:1.0"
Default: /dev/serial0
serial_baud_rateintegerOptionalThe baud rate to use for serial communications.
Default: 9600
modbus_idintegerOptionalController MODBUS address.
Default: 1


Have questions, or want to meet other people working on robots? Join our Community Discord.