meshtastic/docs/settings/moduleconfig/telemetry.mdx
2022-07-14 18:27:52 -07:00

206 lines
7.1 KiB
Plaintext

---
id: telemetry
title: Telemetry Module Configuration
sidebar_label: Telemetry
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
The Telemetry Module provides two types of data over the mesh. Device metrics (Battery Level, Voltage, Channel Utilization and Airtime) from your meshtastic device and Environement Metrics from attached I2C sensors.
The telemetry module config options are: Device Metrics Update Interval, Environment Metrics Update Interval, Environement Telemetry Enabled, Sensor Type, Show on Device Screen, Display Fahrenheit, Error Threshold and Error Recovery Interval. Range Test Module config uses an admin message sending a `ConfigModule.Telemetry` protobuf.
## Telemetry Module Config Values
## Update Intervals
### Device Metrics Update Interval
How often we should send Device Metrics over the mesh.
Default is every 5 minutes.
### Environment Metrics Update Interval
How often we should send Environment(Sensor) Metrics over the mesh.
Default is every 5 minutes.
## Sensor options
### Environment Telemetry Enabled
Enable the Environment Telemetry (Sensors)
### Sensor Type
Specify the sensor type.
| Sensor | Data Points |
| :-----: | :-----------------------------------------------------------: |
| BME280 | Temperature, barometric pressure and humidity |
| BME680 | Temperature, barometric pressure, humidity and air resistance |
| MCP9808 | Temperature |
| SHTC3 | Temperature and humidity |
| INA260 | Current and Voltage |
| INA219 | Current and Voltage |
### Show on device screen
Show the Telemetry Module on-device display.
### Display Fahrenheit
The sensor is always read in Celsius, but the user can opt to view the temperature display in Fahrenheit using this setting.
Default is off
### Error Threshold
Sometimes sensor reads can fail. If this happens, we will retry a configurable number of attempts. Each attempt will be delayed by the minimum required refresh rate for that sensor.
### Error Recovery Interval
Sometimes we can end up with more than our configured threshold for errors. In this case, we will stop trying to read from the sensor for a while. Wait this long until trying to read from the sensor again.
## Device Config Client Availability
<Tabs
groupId="settings"
defaultValue="apple"
values={[
{label: 'Android', value: 'android'},
{label: 'Apple', value: 'apple'},
{label: 'CLI', value: 'cli'},
{label: 'Flasher', value: 'flasher'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="android">
:::info
Telemetry Module config is not available for Android.
:::
</TabItem>
<TabItem value="apple">
:::info
All telemetry module config options are available on iOS, iPadOS and macOS at Settings > Module Configuration > Telemetry.
:::
</TabItem>
<TabItem value="cli">
No telemetry module config options are available in the python CLI. Example commands are below:
## Settings
| Setting | Acceptable Values | Default |
| :-----------------------------------------------------: | :-----------------: | :-----: |
| telemetry_module_device_update_interval | `integer` (seconds) | `0` |
| telemetry_module_environment_display_fahrenheit | `true`, `false` | `false` |
| telemetry_module_environment_measurement_enabled | `true`, `false` | `false` |
| telemetry_module_environment_read_error_count_threshold | `integer` | `0` |
| telemetry_module_environment_recovery_interval | `integer` (seconds) | `0` |
| telemetry_module_environment_screen_enabled | `true`, `false` | `0` |
| telemetry_module_environment_sensor_pin | `integer` | `0` |
| telemetry_module_environment_sensor_type | `0-6` | `0` |
| telemetry_module_environment_update_interval | `integer` (seconds) | `0` |
```shell title="Set module update intervals (Default of 0 is 5 Minutes)"
meshtastic --set telemetry_module_device_update_interval 0
// Device Metrics Two Minutes
meshtastic --set telemetry_module_device_update_interval 120
// Environment Metrics Two Minutes
meshtastic --set telemetry_module_environment_update_interval 120
````
```shell title="Enable/Disable Environment Module"
meshtastic --set telemetry_module_environment_measurement_enabled true
meshtastic --set telemetry_module_environment_measurement_enabled false
```
| Sensor | Data Points |
| :-----: | :-----------------------------------------------------------: |
| BME280 | Temperature, barometric pressure and humidity |
| BME680 | Temperature, barometric pressure, humidity and air resistance |
| MCP9808 | Temperature |
| SHTC3 | Temperature and humidity |
| INA260 | Current and Voltage |
| INA219 | Current and Voltage
```shell title="Set sensor type to BME680"
meshtastic --set telemetry_module_environment_sensor_type BME680
```
```shell title="Enable/Disable on device screen"
meshtastic --set telemetry_module_environment_screen_enabled true
meshtastic --set telemetry_module_environment_screen_enabled false
```
```shell title="Enable / Disable Display Farenheit"
meshtastic --set telemetry_module_environment_display_fahrenheit true
meshtastic --set telemetry_module_environment_display_fahrenheit false
````
```shell title="Set the error threshold to 3 tries"
meshtastic --set telemetry_module_environment_read_error_count_threshold 3
````
```shell title="Set the error recovery interval to 120 seconds"
meshtastic --set telemetry_module_environment_recovery_interval 120
````
</TabItem>
<TabItem value="flasher">
:::info
No telemetry module config options are available in the Flasher.
:::
</TabItem>
<TabItem value="web">
:::info
No telemetry module config options are available in the Web UI.
:::
</TabItem>
</Tabs>
## Examples
### RAK 4631 with Environment Sensor
Setup of a RAK 4631 with Environment Sensor
[<img src="RAK4631_with_EnvSensor" src="/img/hardware/rak/RAK4631_with_EnvSensor.jpg" style={{zoom:'25%'}} />](/img/hardware/rak/RAK4631_with_EnvSensor.jpg)
Requirements:
- RAK4631
- Environment Sensor
Steps:
- configure the device:
```shell
meshtastic --set telemetry_module_measurement_enabled true --set telemetry_module_screen_enabled true --set telemetry_module_update_interval 15 --set telemetry_module_display_farenheit true --set telemetry_module_sensor_type 6
```
:::tip
You can change the values above to suit your needs. The commands can be run one at a time or in a group as show above.
:::
- reboot/reset the device (press the button or unplug/plug in the device)
- when the device boots it should say "Telemetry" and it may show the sensor data
- if still "no data", run:
```shell
meshtastic --info
```
and verify the the `telemetry_module_sensor_type`