Meshflow Bot is a Python bot that connects to mesh radios and integrates with meshflow-api. It listens for traffic, handles ! commands, optional responders, and (for Meshtastic) uploads packets to the API.
Protocols
- Meshtastic — TCP to a Meshtastic node; full API upload + WebSocket traceroute today.
- MeshCore — USB serial or BLE via
meshcore; Phase 0.3 adds capture-only connectivity (JSON dumps underdata/meshcore_packets/, no API ingest yet).
Select the radio with RADIO_PROTOCOL=meshtastic (default) or RADIO_PROTOCOL=meshcore. See the linked docs for environment variables.
The easiest way to run the bot is Docker Compose. Two services are defined: meshflow-bot-meshtastic and meshflow-bot-meshcore (adjust devices, env, and image tags for your environment).
- Ensure you have Docker and Docker Compose installed.
- Create a
.envfile in the project directory (see.env.example).
From the repo root:
docker compose up -d meshflow-bot-meshtastic
# or, for MeshCore over USB (Linux device pass-through):
docker compose up -d meshflow-bot-meshcoreImages are published as ghcr.io/pskillen/meshflow-bot (the legacy meshtastic-bot image name is deprecated).
- Meshtastic service mounts
./data. - MeshCore service mounts
./data-meshcoreso captures do not clash with the MT bot.
- Clone the repository:
git clone https://github.com/pskillen/meshflow-bot.git cd meshflow-bot - Install dependencies:
pip install -r requirements.txt
- (Optional) On Raspberry Pi:
sudo apt-get install libopenblas-dev
- Configure environment:
- Copy
.env.exampleto.envand fill in the required values (see Meshtastic / MeshCore).
- Copy
- Run the bot:
python -m src.main
The bot listens for traffic and responds to ! commands where the underlying protocol exposes text (Meshtastic today; MeshCore in capture mode still runs command dispatch for local testing).
| Command | Description |
|---|---|
!help |
Displays a list of available commands |
!hello |
Displays information about the bot |
!ping |
Responds with "Pong!" |
!nodes |
Displays a list of connected nodes, stats, etc |
!whoami |
Displays information about the sender |
If you want to add new commands or responders, see the src/commands/ and src/responders/ directories. The codebase is structured for easy extension, but most users will not need to modify the code to run the bot.
- Commands: Add new command classes and register them in the command factory.
- Responders: Inherit from
AbstractResponderto handle public channel messages.
Contributions are welcome! Please fork the repository and submit a pull request.
This project is licensed under the MIT License.