2021-04-27 14:05:36 -07:00
---
id: environmental-measurement-plugin
title: Environmental Measurement Plugin Settings
sidebar_label: Environmental Measurement Plugin
---
2021-05-05 09:18:44 -07:00
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
2021-04-27 14:05:36 -07:00
## Overview
2022-01-22 13:03:40 -08:00
The Environmental Measurement Plugin will allow you to connect environment sensors to report conditions to your mesh. Examples are temperature, humidity and gas pressure.
2021-04-27 14:05:36 -07:00
2022-01-27 13:53:53 -08:00
:::note
Once settings are changed, a **reset** is required for them to take effect.
:::
2021-04-27 14:05:36 -07:00
## Settings
2021-05-03 13:11:24 -07:00
| Setting | Acceptable Values | Default |
| :-----: | :---------------: | :-----: |
| environmental_measurement_plugin_measurement_enabled | `true` , `false` | `false` |
| environmental_measurement_plugin_display_farenheit | `true` , `false` | `false` |
| environmental_measurement_plugin_read_error_count_threshold | `integer` | `0` |
| environmental_measurement_plugin_recovery_interval | `integer` (seconds) | `0` |
| environmental_measurement_plugin_screen_enabled | `true` , `false` | `0` |
| environmental_measurement_plugin_sensor_pin | `integer` | `0` |
2022-01-27 13:53:09 -08:00
| environmental_measurement_plugin_sensor_type | `0-6` | `0` |
2021-05-03 13:11:24 -07:00
| environmental_measurement_plugin_update_interval | `integer` (seconds) | `0` |
### environmental_measurement_plugin_measurement_enabled
Enables the plugin.
### environmental_measurement_plugin_display_farenheit
2021-12-27 11:39:42 -08:00
The sensor is always read in Celsius, but the user can opt to view the temperature display in Fahrenheit using this setting.
2021-05-03 13:11:24 -07:00
### environmental_measurement_plugin_read_error_count_threshold
2022-01-02 22:53:45 -08:00
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
2021-05-03 13:11:24 -07:00
### environmental_measurement_plugin_recovery_interval
2022-01-02 22:53:45 -08:00
Sometimes we can end up with more than read_error_count_threshold failures. 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.
2021-05-03 13:11:24 -07:00
### environmental_measurement_plugin_screen_enabled
Enable/Disable the environmental measurement plugin on-device display.
### environmental_measurement_plugin_sensor_pin
2022-01-27 13:53:53 -08:00
:::note
The preferred setup is using I2C, so the `environmental_measurement_plugin_sensor_pin` may not be needed.
:::
2022-01-22 13:03:40 -08:00
Specify the preferred GPIO Pin for sensor readings. May not be needed if using I2C.
2021-05-03 13:11:24 -07:00
### environmental_measurement_plugin_sensor_type
2022-01-02 22:53:45 -08:00
Specify the sensor type.
2021-05-03 13:11:24 -07:00
2022-01-27 13:53:09 -08:00
| Value | Description |
| :---: | :---------: |
| `0` | DHT11 |
| `1` | DS18B20 (Dallas 1-wire) |
| `2` | DHT12 |
| `3` | DHT21 |
| `4` | DHT22 |
| `5` | BME280 |
| `6` | BME680 |
2021-05-03 13:11:24 -07:00
### environmental_measurement_plugin_update_interval
Interval in seconds of how often we should try to send our measurements to the mesh.
2021-04-27 14:05:36 -07:00
## Details
2021-05-03 15:25:24 -07:00
2021-05-04 08:41:13 -07:00
<!-- - TODO - -->
2021-05-05 09:18:44 -07:00
## Examples
2021-05-04 08:41:13 -07:00
2022-01-27 13:52:04 -08:00
### Enable/Disable the plugin
2021-05-05 09:18:44 -07:00
< Tabs
groupId="settings"
defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
2022-01-22 13:03:40 -08:00
{label: 'iOS', value: 'iOS'},
2022-01-27 13:52:04 -08:00
{label: 'Web', value: 'web'},
2021-05-05 09:18:44 -07:00
]}>
< TabItem value = "cli" >
2022-01-27 13:52:04 -08:00
```bash title="Enable Plugin"
2022-01-22 13:03:40 -08:00
meshtastic --set environmental_measurement_plugin_measurement_enabled true
2022-01-27 13:52:04 -08:00
```
```bash title="Disable Plugin"
meshtastic --set environmental_measurement_plugin_measurement_enabled false
```
< / TabItem >
< TabItem value = "android" >
TODO
< / TabItem >
< TabItem value = "iOS" >
TODO
< / TabItem >
< TabItem value = "web" >
TODO
< / TabItem >
< / Tabs >
### Enable/Disable the plugin on device screen
< Tabs
groupId="settings"
defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
{label: 'iOS', value: 'iOS'},
{label: 'Web', value: 'web'},
]}>
< TabItem value = "cli" >
```bash title="Enable on device screen"
2022-01-22 13:03:40 -08:00
meshtastic --set environmental_measurement_plugin_screen_enabled true
2022-01-27 13:52:04 -08:00
```
```bash title="Disable on device screen"
meshtastic --set environmental_measurement_plugin_screen_enabled false
```
< / TabItem >
< TabItem value = "android" >
TODO
< / TabItem >
< TabItem value = "iOS" >
TODO
< / TabItem >
< TabItem value = "web" >
TODO
< / TabItem >
< / Tabs >
### Display Farenheit/Celsius
< Tabs
groupId="settings"
defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
{label: 'iOS', value: 'iOS'},
{label: 'Web', value: 'web'},
]}>
< TabItem value = "cli" >
```bash title="Display Farenheit"
2022-01-22 13:03:40 -08:00
meshtastic --set environmental_measurement_plugin_display_farenheit true
2022-01-27 13:52:04 -08:00
```
```bash title="Display Celsius"
meshtastic --set environmental_measurement_plugin_display_farenheit false
```
< / TabItem >
< TabItem value = "android" >
TODO
< / TabItem >
< TabItem value = "iOS" >
TODO
< / TabItem >
< TabItem value = "web" >
TODO
< / TabItem >
< / Tabs >
### Set plugin update interval
< Tabs
groupId="settings"
defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
{label: 'iOS', value: 'iOS'},
{label: 'Web', value: 'web'},
]}>
< TabItem value = "cli" >
```bash title="Set plugin update interval to 15 seconds"
meshtastic --set environmental_measurement_plugin_update_interval 15
```
< / TabItem >
< TabItem value = "android" >
TODO
< / TabItem >
< TabItem value = "iOS" >
TODO
< / TabItem >
< TabItem value = "web" >
TODO
< / TabItem >
< / Tabs >
### Set Sensor type
< Tabs
groupId="settings"
defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
{label: 'iOS', value: 'iOS'},
{label: 'Web', value: 'web'},
]}>
< TabItem value = "cli" >
:::note
The CLI is able to take the [value or the name ](#environmental_measurement_plugin_sensor_type ) of the sensor.
:::
```bash title="Set sensor type to DS18B20"
meshtastic --set environmental_measurement_plugin_sensor_type 1
```
```bash title="Set sensor type to DS18B20"
meshtastic --set environmental_measurement_plugin_sensor_type DS18B20
2022-01-22 13:30:22 -08:00
```
2021-05-05 09:18:44 -07:00
< / TabItem >
< TabItem value = "android" >
TODO
2022-01-22 13:03:40 -08:00
< / TabItem >
< TabItem value = "iOS" >
TODO
< / TabItem >
< TabItem value = "web" >
TODO
2021-05-05 09:18:44 -07:00
< / TabItem >
< / Tabs >