A powerful CLI and web interface for Meshtastic mesh networking devices
Project description
A web-based monitoring and control dashboard for Meshtastic mesh networks.
So I got really into Meshtastic after picking up a couple of LoRa radios and wanted a way to monitor my mesh network from my computer. The official app is fine but I wanted something I could leave running on a server, log everything to a database, and maybe poke at later.
This started as a quick script and... well, it grew. Now it's got a web UI and everything. Figured I'd clean it up and share it.
What it does
- Connects to your Meshtastic device over USB or TCP/IP (WiFi)
- Logs all packets to a SQLite database
- Shows a live web dashboard with all the node activity
- Lets you send messages and run traceroutes from the web UI
- Exports your data to JSON/CSV if you want to analyze it elsewhere
- Auto-reconnects if the connection drops
The web interface shows positions on a map, telemetry data (battery, signal strength, etc), and you can see message history. Pretty handy for debugging mesh issues.
Setup
pip install -r requirements.txt
cp config.example.ini config.ini
Edit config.ini with your setup. The main thing is picking USB or TCP:
[Device]
# "usb" for plugged-in device, "tcp" for network
connection_type = usb
# Only needed for TCP mode
ip = 192.168.1.100
# Usually leave blank for auto-detect, but you can specify
# serial_port = /dev/cu.usbserial-0001
If you're using TCP, your device needs to have WiFi enabled and you need to know its IP.
Running it
Listen for packets (with web interface):
python3 meshconsole.py listen --web
Then open http://localhost:5050 in your browser.
Just listen (no web):
python3 meshconsole.py listen --verbose
List nodes your device knows about:
python3 meshconsole.py nodes
Send a message:
python3 meshconsole.py send --dest !12345678 --message "hey there"
Traceroute to a node:
python3 meshconsole.py traceroute --dest !12345678
You can also force USB or TCP mode from the command line regardless of what's in your config:
python3 meshconsole.py listen --usb --web
python3 meshconsole.py nodes --usb --port /dev/cu.usbserial-0001
The web dashboard
When you run with --web, you get a dashboard at port 5050. It shows:
- Live packet feed (updates automatically)
- Node list with signal info
- Map with positions (if nodes are reporting GPS)
- Stats about your network
There's a password for sending messages/traceroutes so you can leave the dashboard open without worrying about someone messing with your network. Set it in config.ini under [Security]. Leave auth_password blank if you don't care.
Files
After running for a while you'll have:
meshtastic_messages.db- SQLite database with all your packetsmeshtastic_tool.log- Logs (rotates automatically)
The database is useful if you want to do your own analysis. The packets table has everything including the full raw packet data as JSON.
Exporting data
python3 meshconsole.py export --format json
python3 meshconsole.py export --format csv
Spits out meshtastic_data.json or meshtastic_data.csv.
Troubleshooting
Can't connect via USB:
- Make sure you have the right drivers (CP2102/CH340/etc)
- Check
ls /dev/cu.usb*(Mac) orls /dev/ttyUSB*(Linux) to see if the device shows up - Try specifying the port explicitly with
--port
Can't connect via TCP:
- Make sure WiFi is enabled on your Meshtastic device
- Check you can ping the IP
- The device uses port 4403 by default
Web interface not loading:
- Check if port 5050 is already in use
- Try a different port in
config.iniunder[Web]
Seeing your own messages in the log:
- Shouldn't happen - the tool auto-detects your local node and filters it out
- If it's not working, check the logs for the detected node ID
Dependencies
- meshtastic
- flask
- flask-cors
- protobuf
- pypubsub
All in requirements.txt.
License
MIT. Do whatever you want with it.
Built by M9WAV. If you find bugs or have ideas, feel free to open an issue.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file meshconsole-2.2.0.tar.gz.
File metadata
- Download URL: meshconsole-2.2.0.tar.gz
- Upload date:
- Size: 41.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e72874476cf92f7371aef0d6880fd64a844242668b210d78401068fb8d4d69ed
|
|
| MD5 |
d9971c766a851d990d3c5ba194e13784
|
|
| BLAKE2b-256 |
fc9024b68d4a22ba9d699cd4f2e1f61f6947fcf933ecc69cd8e157c575db0f04
|
File details
Details for the file meshconsole-2.2.0-py3-none-any.whl.
File metadata
- Download URL: meshconsole-2.2.0-py3-none-any.whl
- Upload date:
- Size: 42.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5d4e3aeb4f4940b084cff0425d27158398d66dea98816f92cb1a0623542a9cd
|
|
| MD5 |
2435b0d0e4dcd48508d2b28784f00ffe
|
|
| BLAKE2b-256 |
1bf808ecfec5950f8d45d4f2c288feb62716155fd3e11f776d1803c36050c2d6
|