diff --git a/config_templates/base/mate_template_with_rpi_cpu_temperature.json b/config_templates/base/mate_template_with_rpi_cpu_temperature.json index 725402a8..b306df96 100644 --- a/config_templates/base/mate_template_with_rpi_cpu_temperature.json +++ b/config_templates/base/mate_template_with_rpi_cpu_temperature.json @@ -8,6 +8,9 @@ ], "io": "../../config_templates/io/default_linux_serial.json", "request": [ - { "type": "rpi-cpu-temp" } + { + "type": "cpu-temp", + "processors": 1 + } ] } diff --git a/config_templates/base/request_battery_voltage_template.json b/config_templates/base/request_battery_voltage_template.json index 6784a453..dbfd7136 100644 --- a/config_templates/base/request_battery_voltage_template.json +++ b/config_templates/base/request_battery_voltage_template.json @@ -8,7 +8,8 @@ ], "request": [ { - "type": "rpi-cpu-temp" + "type": "cpu-temp", + "processors": 1 }, { "type": "battery-voltage-io", diff --git a/config_templates/base/request_template.json b/config_templates/base/request_template.json index 81b08221..3ab9a3b7 100644 --- a/config_templates/base/request_template.json +++ b/config_templates/base/request_template.json @@ -8,7 +8,8 @@ ], "request": [ { - "type": "rpi-cpu-temp" + "type": "cpu-temp", + "processors": 1 }, { "type": "w1-temperature", diff --git a/other/docs/raspberry_pi_cpu_temperature.md b/other/docs/raspberry_pi_cpu_temperature.md index ea542c6f..79c4cea1 100644 --- a/other/docs/raspberry_pi_cpu_temperature.md +++ b/other/docs/raspberry_pi_cpu_temperature.md @@ -1,32 +1 @@ NEW DOCUMENTATION HERE: https://solarthing.readthedocs.io/en/latest/config/rpi-cpu-temp.html - -# Raspberry Pi CPU Temperature -For all the programs that upload to databases, they support the ability to add the Raspberry Pi's CPU temperature -as a packet. You just have to add this json to your `base.json`: -```json5 -{ - //... - "request": [ - { "type": "rpi-cpu-temp" } - ] -} -``` - -Learn more about the `request` field [here](request_field.md). - -This works by using the `vcgencmd measure_temp` that is only available on Raspberry Pis - -You can see an example [here](../../config_templates/base/mate_template_with_rpi_cpu_temperature.json) - -If you have any suggestions for statistics to add, feel free to request them! - -### What to try when this doesn't work -If you have everything else in SolarThing working normally, but this isn't working, there are a few things you can try. - -If you are using the systemd service, it should be configured to run as the user 'solarthing'. If SolarThing was -set up correctly, the user 'solarthing' should be a member of the group 'video'. You can make sure this is the case by -running `groups solarthing` and make sure 'video' appears. If it doesn't, the easiest thing to do is to run `/other/linux/create_user.sh` -which will make sure the 'solarthing' user is in the correct groups. - -If that doesn't work, make sure you have everything spelled correctly. And if that still doesn't work, -drop by [our issues page](https://github.com/wildmountainfarms/solarthing/issues) and give us a section of your `logs/log_info.log` file and your `config/base.json`. diff --git a/other/docs/request_field.md b/other/docs/request_field.md index 3af72867..846bc2f5 100644 --- a/other/docs/request_field.md +++ b/other/docs/request_field.md @@ -5,33 +5,4 @@ The `request` field is an array of objects that *can* be present in configuratio This is a common way to define what to upload to the database. In the `mate` and `rover` program case, it supplements the data they already provide. - -Here's an example of requesting the Raspberry Pi CPU Temperature -```json5 -{ - // ... - "request": [ - { - "type": "rpi-cpu-temp" - } - ] -} -``` - -You can also request data from a DS18B20 temperature sensor: -```json5 -{ - // ... - "request": [ - { - "type": "rpi-cpu-temp" - }, - { - "type": "w1-temperature", - "directory": "/sys/bus/w1/devices/28-000006470bec", - "data_id": 1 - } - ] -} -``` -If you are interesting in learning more about the DS18B20 sensor, [click here](DS18B20_sensor_setup.md). +NEW DOCUMENTATION HERE: https://solarthing.readthedocs.io/en/latest/config/file/base-json/request/index.html