Skip to main content

A powerful CLI and web interface for Meshtastic and MeshCore mesh networking devices

Project description

MeshConsole

A web-based monitoring and control dashboard for Meshtastic and MeshCore mesh networks.

PyPI m9wav.uk


What's New in v3.2.0

  • Multi-device support -- connect unlimited devices simultaneously. Run 2 Meshtastic + 1 MeshCore, 3 MeshCore devices, or any combination. No more one-per-type limit.
  • --device flag -- specify multiple devices on the CLI: --device meshtastic:usb:/dev/ttyACM0 --device meshcore:usb:/dev/ttyUSB0
  • Multi-device config -- new [Device.0], [Device.1], etc. INI sections for persistent multi-device setups
  • Per-device identity -- each device gets a unique ID (e.g. meshtastic:!fa9dc488), shown in status bar, filters, and system info
  • Dynamic backend filter -- web UI filter dropdown auto-populates from connected devices

v3.1.0

  • Plug and play USB auto-detection, flexible optional dependencies

v3.0.0

  • MeshCore backend support (BLE, serial, TCP)
  • Dual-device mode, modular architecture, 70-test suite

Installation

# Just Meshtastic
pip install meshconsole[meshtastic]

# Just MeshCore
pip install meshconsole[meshcore]

# Both backends
pip install meshconsole[all]

# Core only (no backend deps -- for custom setups)
pip install meshconsole

Or install from source:

git clone https://github.com/m9wav/MeshConsole.git
cd MeshConsole
pip install -e ".[all]"

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, MeshCore support, dual-device mode, USB auto-detection, and everything. Figured I'd clean it up and share it.

What it does

  • Auto-detects your Meshtastic and MeshCore devices over USB -- just plug in and go
  • Connects to Meshtastic over USB or TCP/IP (WiFi)
  • Connects to MeshCore over BLE, serial, or TCP
  • Runs both backends simultaneously in dual mode
  • Logs all packets to a SQLite database (with backend tagging)
  • 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.

Quick Start

The simplest way -- plug in your device(s) and run:

meshconsole listen --usb --web

MeshConsole will scan your serial ports, figure out what's Meshtastic and what's MeshCore, and connect to everything it finds. Open http://localhost:5055 in your browser.

Explicit connections

# Meshtastic via USB (specific port)
meshconsole listen --usb --port /dev/ttyACM0 --web

# Meshtastic via TCP/IP
meshconsole listen --ip 192.168.1.100 --web

# MeshCore via serial
meshconsole listen --backend meshcore --mc-serial /dev/ttyUSB0 --web

# MeshCore via BLE
meshconsole listen --backend meshcore --mc-ble "AA:BB:CC:DD:EE:FF" --web

# Dual mode (explicit)
meshconsole listen --backend dual --usb --mc-serial /dev/ttyUSB0 --web

# Multiple devices (any combination)
meshconsole listen --device meshtastic:usb:/dev/ttyACM0 --device meshtastic:tcp:192.168.1.100 --device meshcore:usb:/dev/ttyUSB0 --web

Other Commands

# Listen without web interface (CLI output only)
meshconsole listen --usb --verbose

# List nodes your device knows about
meshconsole nodes --usb

# Send a message
meshconsole send --usb --dest !12345678 --message "hey there"

# Traceroute to a node
meshconsole traceroute --usb --dest !12345678

Configuration

For more control, create a config.ini:

cp config.example.ini config.ini

Meshtastic only

[Device]
connection_type = usb
serial_port = /dev/ttyACM0

MeshCore only

[Backend]
mode = meshcore

[MeshCore]
connection_type = usb
serial_port = /dev/ttyUSB0

Dual mode

[Backend]
mode = dual

[Device]
connection_type = usb
serial_port = /dev/ttyACM0

[MeshCore]
connection_type = usb
serial_port = /dev/ttyUSB0

Auto-detect (default for USB)

[Device]
connection_type = usb

No [Backend] section needed -- MeshConsole will scan and detect automatically when using USB without explicit ports.

Multiple devices (new in v3.2.0)

[Devices]
count = 3

[Device.0]
type = meshtastic
connection_type = usb
serial_port = /dev/ttyACM0

[Device.1]
type = meshtastic
connection_type = tcp
ip = 192.168.1.100

[Device.2]
type = meshcore
connection_type = usb
serial_port = /dev/ttyUSB0

CLI arguments (--backend, --mc-serial, --device, etc.) always override config file values.

The web dashboard

When you run with --web, you get a dashboard at port 5055. It shows:

  • Live packet feed (updates automatically)
  • Node list with signal info
  • Map with positions (if nodes are reporting GPS)
  • Stats about your network
  • Backend badges on each packet (Meshtastic or MeshCore)
  • Backend filter dropdown to view traffic from one backend at a time
  • Per-backend connection status in the header

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.

Production Deployment

For running MeshConsole as a persistent service behind a reverse proxy (nginx, caddy, etc.):

pip install meshconsole[all] gunicorn

Create a wsgi.py entry point, then run with gunicorn:

gunicorn --workers 1 --threads 1 --bind 127.0.0.1:5055 --timeout 120 wsgi:application

A systemd service file:

[Unit]
Description=MeshConsole Web Interface
After=network.target

[Service]
Type=simple
User=meshconsole
WorkingDirectory=/opt/meshconsole
Environment="PATH=/opt/meshconsole/venv/bin:/usr/bin"
ExecStart=/opt/meshconsole/venv/bin/gunicorn --workers 1 --threads 1 --bind 127.0.0.1:5055 --timeout 120 wsgi:application
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target

Important: Use --workers 1 since each worker maintains its own device connection.

Files

After running for a while you'll have:

  • meshtastic_messages.db - SQLite database with all your packets
  • meshtastic_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, with a backend column indicating which backend each packet came from.

Exporting data

meshconsole export --format json
meshconsole export --format csv

Or use the Export button in the web dashboard's Settings tab.

Troubleshooting

Can't connect via USB:

  • Make sure you have the right drivers (CP2102/CH340/etc)
  • Check ls /dev/cu.usb* (Mac) or ls /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

Can't connect to MeshCore:

  • Make sure meshcore is installed: pip install meshconsole[meshcore]
  • For BLE, ensure Bluetooth is enabled and the device is in range
  • For serial, check that the correct port is specified with --mc-serial
  • The device must be running MeshCore companion firmware

"meshtastic package required" error:

  • Install the meshtastic extra: pip install meshconsole[meshtastic]

Auto-detect not finding devices:

  • Check that devices show up in ls /dev/ttyUSB* /dev/ttyACM*
  • Install the backend libraries: pip install meshconsole[all]
  • Try specifying ports explicitly to narrow down the issue

Web interface not loading:

  • Check if port 5055 is already in use
  • Try a different port in config.ini under [Web]

Dependencies

Core: flask, flask-cors, pypubsub, pyserial, requests

Optional backends:

  • meshconsole[meshtastic]: meshtastic, protobuf
  • meshconsole[meshcore]: meshcore

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

meshconsole-3.2.1.tar.gz (66.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

meshconsole-3.2.1-py3-none-any.whl (74.2 kB view details)

Uploaded Python 3

File details

Details for the file meshconsole-3.2.1.tar.gz.

File metadata

  • Download URL: meshconsole-3.2.1.tar.gz
  • Upload date:
  • Size: 66.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for meshconsole-3.2.1.tar.gz
Algorithm Hash digest
SHA256 681ad51eace20c5210c2b1dc1fc1891b1ebeb77f367a987b3a179f8a590e3e01
MD5 5529130d2e1ac814d9c53f713d1e9158
BLAKE2b-256 0d9de5a5aedefead3a973516cea5e91e5a071d9a3f0d616e3dcc1bde7a394f68

See more details on using hashes here.

File details

Details for the file meshconsole-3.2.1-py3-none-any.whl.

File metadata

  • Download URL: meshconsole-3.2.1-py3-none-any.whl
  • Upload date:
  • Size: 74.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for meshconsole-3.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 173396b0ff123504d9b7b8571cd6b0ed2ac4b55853858f9c28e7d17bf6df051a
MD5 7a02da7cb27d7b350022628c4eb87119
BLAKE2b-256 816ad7b48e5c6a78104c9c94c7199bdd3fbb7d756a28e9e3457c09275b178d0f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page