-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOCS-821: Add Power Sensor Component #1766
Conversation
81f17a4
to
266e92f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fantastic! Looking good overall, just some small language nits and minor corrections. Great job!!
Overall readability score: 54.7 (🟢 +0.08)
View detailed metrics🟢 - Shows an increase in readability
Averages:
View metric targets
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!! Just three little language tweaks, then good to go!
| `serial_path` | string | **Required** | The full filesystem path to the serial device, starting with <file>/dev/</file>. 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 <file>/dev/ttyS0</file>. If you omit this attribute, Viam will attempt to automatically detect the path.<br>Default: `/dev/serial0` | | ||
| `serial_baud_rate` | int | **Required** | The baud rate to use for serial communications. <br> Default: `9600` | | ||
| `modbus_id` | int | **Required** | Controller MODBUS address. <br> Default: `1` | | ||
| `serial_path` | string | Optional | The full filesystem path to the serial device, starting with <file>/dev/</file>. 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 <file>/dev/ttyS0</file>. If you omit this attribute, Viam will attempt to automatically detect the path.<br>Default: `/dev/serial0` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might also be helpful to include a line to look in /dev/serial/by-path
to find the serial path? see the roboclaw
motor doc for an example.
| `serial_path` | string | **Required** | The full filesystem path to the serial device, starting with <file>/dev/</file>. 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 <file>/dev/ttyS0</file>. If you omit this attribute, Viam will attempt to automatically detect the path.<br>Default: `/dev/serial0` | | ||
| `serial_baud_rate` | int | **Required** | The baud rate to use for serial communications. <br> Default: `9600` | | ||
| `modbus_id` | int | **Required** | Controller MODBUS address. <br> Default: `1` | | ||
| `serial_path` | string | Optional | The full filesystem path to the serial device, starting with <file>/dev/</file>. 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 <file>/dev/ttyS0</file>. If you omit this attribute, Viam will attempt to automatically detect the path.<br>Default: `/dev/serial0` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should start with just/dev/<file>
so can remove the first <file>
icon: "/icons/components/sensor.svg" | ||
images: ["/icons/components/sensor.svg"] | ||
# SME: #team-bucket | ||
--- | ||
|
||
Configure a `renogy` sensor to integrate a [Renogy battery temperature sensor](https://www.amazon.com/Renogy-Battery-Temperature-Sensor-Controllers/dp/B07WMMJFWY) into your robot: | ||
Configure a `renogy` sensor to integrate a [Renogy battery temperature sensor](https://www.renogy.com/battery-temperature-sensor-for-renogy-solar-charge-controllers/) into your robot: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not an accurate link to the device, can you replace with this?. and replacing the link name to Renogy Charge Controller
would be more accurate.
type: "docs" | ||
description: "Configure a renogy model sensor." | ||
tags: ["sensor", "components"] | ||
description: "Configure a renogy model power sensor to return battery temperature." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of return battery temp this now returns battery voltage and load current/power, along with other readings.
weight: 10 | ||
draft: false | ||
type: "docs" | ||
description: "Configure an INA219 model power sensor to return voltage and current readings." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional but want to also include in the description that there is a power reading
"model": "INA219", | ||
"attributes": { | ||
"board": "<your-board-name>", | ||
"i2c_bus": "<your-i2c-bus-name-on-board>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like the template didn't get updated to the new attributes
|
||
| Attribute | Type | Inclusion | Description | | ||
| --------- | -----| --------- | ----------- | | ||
| `i2c_bus` | integer | **Required** | The `name` of the [I<sup>2</sup>C bus](/components/board/#i2cs) that the sensor is connected to. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the description can be changed to number
instead of name
since it was changed to an integer value.
You can view a rendered version of the docs from this PR at https://docs-test.viam.dev/d9d5d91601a11a6e5847d83ae82cbcf65d17759c/public |
Add power sensor component supporting INA219, INA226, and renogy