Generate ready-to-run Python scripts for your Meshtastic devices - no coding experience required.
Author: Heathen
Built in Mirra
-
Clone this repository:
git clone https://github.com/LoserLab/meshtastic-claude-skill.git
-
Copy the skill to your Claude Code skills folder:
# For project-specific installation: mkdir -p /path/to/your/project/.claude/skills cp -r meshtastic-claude-skill /path/to/your/project/.claude/skills/meshtastic # Or for global installation: mkdir -p ~/.claude/skills cp -r meshtastic-claude-skill ~/.claude/skills/meshtastic
-
Restart Claude Code or open a new session
-
Use the skill by typing
/meshtasticfollowed by what you want to create
This is a Claude Code skill that helps you create automation scripts for your Meshtastic mesh network. Simply describe what you want in plain English, and Claude will generate complete, working code you can run on a Raspberry Pi, laptop, or any computer.
You only need internet once - to generate the script. After that, the script runs completely offline on your device, communicating over your mesh network.
| Component | Version |
|---|---|
| Python | 3.8+ |
| meshtastic (Python library) | 2.0+ |
| Meshtastic firmware | 2.x |
Install the correct version:
pip install "meshtastic>=2.0"- Open Claude Code in this directory
- Type:
/meshtasticfollowed by what you want - Answer any clarifying questions
- Copy the generated script to your device
- Run it - done!
/meshtastic I want to get an alert when my cabin temperature drops below 40 degrees
Claude will generate a complete Python script that:
- Connects to your Meshtastic device
- Monitors temperature readings from the mesh
- Sends an alert message when it gets too cold
- Includes all setup instructions
| Use Case | Description |
|---|---|
| Temperature alerts | Get notified when temp goes above/below thresholds |
| Message logging | Save all mesh messages to a file |
| Auto-responder | Automatically reply to specific keywords |
| Position tracking | Log GPS coordinates from all nodes |
| Scheduled messages | Send check-ins at regular intervals |
| Battery monitoring | Alert when any node's battery is low |
| Custom automation | Describe any automation you need |
Don't want to generate a custom script? Grab one of these from the examples/ folder:
| Script | What It Does |
|---|---|
message_logger.py |
Saves all messages to meshtastic_messages.log |
temperature_alert.py |
Alerts when temp crosses your thresholds |
auto_responder.py |
Replies to "status", "help", "ping" keywords |
position_tracker.py |
Logs all GPS positions to positions.csv |
scheduled_broadcaster.py |
Sends a message every hour (configurable) |
battery_monitor.py |
Alerts when any node battery is low |
- Copy the script to your device (Raspberry Pi, laptop, etc.)
- Install Python 3 if not already installed
- Install the Meshtastic library:
pip install meshtastic
- Connect your Meshtastic device via USB
- Run:
python3 script_name.py
- A Meshtastic-compatible device (T-Beam, T-Echo, Heltec, RAK, etc.)
- USB cable (must support data, not just charging)
- A computer to run the script (Raspberry Pi recommended for always-on)
- Python 3
- Meshtastic library (
pip install meshtastic)
No! The scripts are complete and ready to run. Just copy, paste, and go.
No. You only need internet once to generate the script with Claude. After that, it runs completely offline using your mesh network.
- Raspberry Pi (recommended for always-on)
- Windows, Mac, or Linux laptop/desktop
- Any computer with Python 3
See the "Running on Boot" section below.
- Check your USB cable supports data (not charge-only)
- Try a different USB port
- On Linux, you may need to add yourself to the dialout group:
Then log out and back in.
sudo usermod -a -G dialout $USER
Linux/Mac:
ls /dev/tty* | grep -E "(USB|ACM)"Windows: Check Device Manager → Ports (COM & LPT)
To make your script start automatically when the Pi boots:
-
Save your script to
/home/pi/meshtastic_script.py -
Create a service file:
sudo nano /etc/systemd/system/meshtastic.service
-
Paste this content:
[Unit] Description=Meshtastic Script After=network.target [Service] ExecStart=/usr/bin/python3 /home/pi/meshtastic_script.py WorkingDirectory=/home/pi Restart=always User=pi [Install] WantedBy=multi-user.target
-
Save and exit (Ctrl+X, then Y, then Enter)
-
Enable and start:
sudo systemctl enable meshtastic sudo systemctl start meshtastic -
Check it's running:
sudo systemctl status meshtastic
Before deploying, verify everything works:
-
Check device is detected:
meshtastic --info
Should show your device info.
-
Check you can see other nodes:
meshtastic --nodes
Should list other devices on your mesh.
-
Test sending a message:
meshtastic --sendtext "Test message"Should appear on other devices.
- LILYGO T-Beam
- LILYGO T-Echo
- Seeed SenseCAP T1000-E
- B&Q Nano G2 Ultra
- Heltec LoRa 32
- LILYGO T3-S3
- RAK WisBlock (GPS is optional add-on)
- T-Echo
- SenseCAP T1000-E
- RAK with nRF52 core
- T-Beam
- T3-S3
- Heltec v3
| Problem | Solution |
|---|---|
| "Could not find device" | Check USB cable, try different port |
| "Permission denied" (Linux) | Run: sudo usermod -a -G dialout $USER then log out/in |
| "No module named meshtastic" | Run: pip install meshtastic |
| Script runs but no messages | Check other nodes are in range, channels match |
| No telemetry data | Your device may not have sensors - check hardware specs |
- Meshtastic Discord: https://discord.gg/meshtastic
- Meshtastic Docs: https://meshtastic.org/docs/
- GitHub Issues: https://github.com/meshtastic/Meshtastic-python
meshtastic/
├── README.md # This file
├── SKILL.md # Main skill instructions for Claude
├── reference.md # Technical reference (troubleshooting, hardware, APIs)
├── LICENSE # MIT License
└── examples/
├── message_logger.py
├── temperature_alert.py
├── auto_responder.py
├── position_tracker.py
├── scheduled_broadcaster.py
└── battery_monitor.py
Contributions welcome! Ideas for improvement:
- Additional example scripts
- Support for more use cases
- Bug fixes and improvements
- Documentation updates
- Meshtastic Project - The open-source mesh networking platform
- Meshtastic Python Library - The Python API this skill generates code for
- Built with Claude Code
This project is licensed under the MIT License - see the LICENSE file for details.
Remember: You only need internet to generate the script. Once you have it, your Meshtastic mesh runs completely off-grid!