Environmental Monitoring with Meshtastic
Use Case Overview
LoRa mesh networking enables remote environmental monitoring in locations without cellular coverage or WiFi infrastructure. A solar-powered Meshtastic node with an attached sensor can transmit temperature, humidity, air quality, soil moisture, and other telemetry data across the mesh to a gateway, which forwards it to a database or home automation system.
Common applications include:
- Weather station on a remote property or off-grid cabin
- Soil moisture monitoring for irrigation management across a farm
- Air quality monitoring at a remote site or community location
- Freezer/cold storage temperature monitoring with alerts
Supported Sensor Modules
Meshtastic's Telemetry module supports a range of sensor types natively:
- BME280 / BME680
—- temperature, relative humidity, barometric pressure; BME680 also provides a gas resistance reading useful for air quality estimates - INA219 / INA260
—- DC voltage and current monitoring; useful for monitoring solar panel output, battery charge state, or load current - MQ-series gas sensors (MQ-2, MQ-135, etc.)
—- analog output sensors readable via ADC; useful for smoke, CO, or general air quality detection
Hardware Setup: BME280 Wiring
The BME280 is the most commonly used environmental sensor with Meshtastic. It connects via I2C:
- VCC → 3.3V
- GND → GND
- SDA → GPIO21 (T-Beam, Heltec V2/V3
—- verify your specific board pinout) - SCL → GPIO22 (T-Beam, Heltec V2/V3
—- verify your specific board pinout)
After wiring, enable the sensor in the Meshtastic app or CLI: navigate to Telemetry → Environment and enable the module. The node will begin broadcasting environment telemetry on the mesh.
Reading Sensor Data
Telemetry data is accessible through multiple paths:
- Meshtastic app (phone): telemetry appears in the node info panel when you tap on a node
—- shows last-received temperature, humidity, pressure, and other available metrics - MQTT gateway: a Meshtastic node with WiFi or a gateway device forwards telemetry packets as JSON to an MQTT broker. This enables integration with databases and dashboards.
Sample MQTT Telemetry JSON Structure
When a telemetry packet is forwarded via MQTT, the JSON payload contains:
- from
—- the node number (integer) of the sending device - to
—- the destination node number (usually the broadcast address) - decoded.telemetry.environmentMetrics
—- the environment data object, containing:- temperature
—- degrees Celsius (float) - relativeHumidity
—- percentage (float,0–0 - 100) - barometricPressure
—- hPa (float) - gasResistance
—- ohms (float; BME680 only, correlates with VOC concentration)
- temperature
This JSON structure can be consumed directly by InfluxDB (via Telegraf or a Node-RED flow), Home Assistant MQTT sensors, or any custom application that subscribes to the MQTT topic.
Integration Targets
- InfluxDB + Grafana: store time-series telemetry and visualize on dashboards; well-suited for long-term environmental data logging
- Home Assistant: configure MQTT sensors using the telemetry JSON structure; trigger automations on temperature or humidity thresholds
- Node-RED: flexible pipeline for transforming, filtering, and routing telemetry data to multiple destinations simultaneously
Deployment Considerations
- Enclosure: use a weatherproof IP65+ enclosure for outdoor deployments; mount the sensor in a vented radiation shield for accurate temperature readings
—- direct sunlight on the enclosure will give artificially high temperature readings - Solar power: a small
1–1 - 5W solar panel with a LiPo battery and a TP4056-based charge controller is sufficient for most sensor nodes; the low duty cycle of LoRa transmission makes solar viable even in partial sun - Sensor venting: drill small holes or use a membrane vent in the enclosure so humidity and temperature readings reflect ambient conditions, not the trapped air inside the box
Power Impact of Environmental Sensors
The BME280 draws approximately 1–1 - 3 mA average, which is negligible relative to the LoRa radio and microcontroller. At a 10-minute telemetry interval on a T-Beam or similar device, sensor power consumption has minimal impact on overall battery life. The dominant power draw remains the ESP32 or nRF52840 idle current and LoRa transmit bursts.