Configure a Renogy Power Sensor
Configure a renogy
sensor to integrate a Renogy charge controller into your machine.
Physically connect your power sensor to your machine’s computer and power both on.
Then, configure the power sensor:
Navigate to the CONFIGURE tab of your machine’s page in the Viam app.
Click the + icon next to your machine part in the left-hand menu and select Component.
Select the power_sensor
type, then select the renogy
model.
Enter a name or use the suggested name for your sensor and click Create.
Edit the attributes as applicable to your power sensor, according to the table below.
{
"components": [
{
"name": "ren1",
"model": "renogy",
"type": "power_sensor",
"namespace": "rdk",
"attributes": {
"serial_path": "<string>",
"serial_baud_rate": <int>,
"modbus_id": <int>
},
"depends_on": []
}
]
}
{
"components": [
{
"name": "your-renogy-sensor",
"model": "renogy",
"type": "power_sensor",
"namespace": "rdk",
"attributes": {
"serial_path": "/dev/serial/by-path/usb-0:1.1:1.0",
"serial_baud_rate": 9600,
"modbus_id": 1
},
"depends_on": []
}
]
}
The "serial_path"
filepath used in this example is specific to serial devices connected to Linux systems.
The "serial_path"
filepath on a macOS system might resemble
The following attributes are available for renogy
sensors:
Attribute | Type | Required? | Description |
---|---|---|---|
serial_path | string | Optional | The full filesystem path to the serial device, starting with
Default: /dev/serial0 |
serial_baud_rate | integer | Optional | The baud rate to use for serial communications. Default: 9600 |
modbus_id | integer | Optional | Controller MODBUS address. Default: 1 |
Test the power sensor
After you configure your power sensor, open the power sensor’s TEST panel on the CONFIGURE or CONTROL tabs. The panel contains readings for your voltage, current, and power.
Troubleshooting
If your power sensor is not working as expected, follow these steps:
- Check your machine logs on the LOGS tab to check for errors.
- Review this power sensor model’s documentation to ensure you have configured all required attributes.
- 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:
Have questions, or want to meet other people working on robots? Join our Community Discord.
If you notice any issues with the documentation, feel free to file an issue or edit this file.
Was this page helpful?
Glad to hear it! If you have any other feedback please let us know:
We're sorry about that. To help us improve, please tell us what we can do better:
Thank you!