Akita Meshtastic IRC Gateway (AMIG)
Organization: Akita Engineering Website: www.akitaengineering.com Contact: info@akitaengineering.com
A simple, modular Python-based gateway that bridges an IRC channel to the Meshtastic network, allowing users to send commands and messages to the mesh via an IRC client.
Features
- Connect using a standard IRC client.
- Join a designated control channel (
#meshtastic-ctrlby default). - Modular command system: Easily add new commands by creating Python modules.
- Send messages to the Meshtastic default channel (
SEND <message>). - Send Direct Messages to specific Meshtastic nodes (
DM <node_id|shortname|nodenum> <message>). - List known no…
Akita Meshtastic IRC Gateway (AMIG)
Organization: Akita Engineering Website: www.akitaengineering.com Contact: info@akitaengineering.com
A simple, modular Python-based gateway that bridges an IRC channel to the Meshtastic network, allowing users to send commands and messages to the mesh via an IRC client.
Features
- Connect using a standard IRC client.
- Join a designated control channel (
#meshtastic-ctrlby default). - Modular command system: Easily add new commands by creating Python modules.
- Send messages to the Meshtastic default channel (
SEND <message>). - Send Direct Messages to specific Meshtastic nodes (
DM <node_id|shortname|nodenum> <message>). - List known nodes on the mesh (
NODES). - Get basic info about a specific node (
INFO <node>). - View gateway node’s GPS location (
LOCATION). - Broadcast an ALARM message (
ALARM <message>). - Send a Meshtastic ping (
PING <node>). - Get server time (
TIME). - Get basic mesh stats (
STATS). - Get weather forecast via OpenWeatherMap (
WEATHER- requires config). - Get HF propagation conditions via NOAA SWPC (
HFCONDITIONS). - Relays standard chat messages between IRC users in the control channel.
- Relays received Meshtastic messages (broadcasts and DMs to the gateway node) back to the IRC channel.
- Relays ACK/NAK/PONG feedback to the IRC channel.
Disclaimer: This project provides a functional base but should be considered experimental. Real-world testing, robust error handling, and security hardening are ongoing considerations. Use with caution and ensure compliance with all applicable regulations.
Documentation
Full documentation is available: Please refer to the docs/ directory and use MkDocs (pip install mkdocs mkdocs-material, then mkdocs serve) to view the complete documentation site locally. A hosted version may be available at [Link to Hosted Docs - To be added].
Setup
Clone the Repository
git clone <https://github.com/akitaengineering/akita-meshtastic-ird-gateway/> # Replace with the actual URL
cd meshtastic-irc-gateway # Or your chosen directory name
Create Virtual Environment (Recommended)
python -m venv venv
Activate the Environment
- Linux/macOS:
source venv/bin/activate
- Windows:
venv\Scripts\activate
Install Dependencies
pip install -r requirements.txt
Configuration
Edit src/gateway/config.py:
Set one of the following based on your connection type:
MESH_DEVICE_PORT(e.g.,/dev/ttyUSB0,COM3)MESH_DEVICE_HOST(e.g.,192.168.1.100)- Leave the unused one as
None.
Weather Command Support:
- Add your OpenWeatherMap API key to
WEATHER_API_KEYor set theWEATHER_API_KEYenvironment variable. - Ensure
WEATHER_LOCATIONis set correctly.
Review and adjust other settings:
IRC_SERVER_PORTCONTROL_CHANNEL- And any other options as needed.
Running the Gateway
From the project root:
python src/gateway/main.py [options]
Common Options (Override config.py)
--mesh-port /dev/ttyACM0 # Use a specific serial port.
--mesh-host <ip_address> # Use a specific TCP/IP host.
-p <port_num> # Run IRC server on a different port.
-v # Enable verbose (debug) logging.
See all options:
python src/gateway/main.py --help
Connecting with an IRC Client
- Connect your IRC client to the gateway host/IP and port (e.g.,
localhost:6667). - Disable SSL/TLS.
- Join the control channel:
/join #meshtastic-ctrl
(Or your configured channel.)
- Type
HELPto list available commands.
Adding New Commands
To extend functionality:
- Create a new file in
src/gateway/commands/, e.g.cmd_yourcommand.py - Define the following in the file:
COMMAND_NAMECOMMAND_HELPexecute(server, connection, nick, args)
The gateway auto-loads new command files on startup.
Contributing
Contributions, issues, and feature requests are welcome.
To contribute:
- Fork the repository
- Create a branch
- Make your changes
- Submit a pull request
License
Distributed under the GNU General Public License v3.0. See LICENSE for more information.