This script subscribes to the public Meshtastic MQTT broker, logs telemetry to CSV/JSONL, and shows a live view with:
- Colored environment values (temp, RH, pressure, IAQ, wind, lux, radiation)
- Trend arrows (↑ green / ↓ red / → yellow) for environment and RF (RSSI/SNR)
- Derived live-only fields: relative humidity, barometric pressure
- Daily log rotation
- Optional per-node split (one file per node)
CSV/JSONL outputs always have clean values — colors/arrows are live view only.
Clone the repo:
git clone https://github.com/gdewey99/meshtastic_mqtt_telemetry_scraper.git
cd meshtastic_mqtt_telemetry_scraper
Install dependencies (choose one):
Method A — System Python (Debian/Ubuntu/Raspberry Pi OS):
sudo apt install -y python3 python3-pip
pip3 install folium #for map script
Usage
Common flags:
--live Live terminal view
--live-color env Color environment values by type
--live-trend Add colored trend arrows for env + RSSI/SNR
--nodes <id ...> Only capture these nodes (!hex or decimal)
--split-by-node Write separate CSV/JSONL per node
--keep-combined Keep combined file along with per-node files
Example:
./meshtastic_stream_to_csv.py --live --live-color env --live-trend
Split per node and keep combined:
./meshtastic_stream_to_csv.py --nodes !a2eb420c !db77dcd8 \
--live --live-trend --split-by-node --keep-combined
Balloon example:
./meshtastic_stream_to_csv.py --nodes 3825485809 '!db77dcd8' --split-by-node --live --live-trend
Dependencies
Python 3.9+
paho-mqtt Python package
On Debian-based systems:
sudo apt install python3 python3-pip
pip3 install paho-mqtt