Skip to content

ssnofall/meshtastic-to-discord-bridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Meshtastic Discord Bridge

A Python application that bridges Meshtastic mesh network messages to a Discord channel using a webhook. This tool allows you to receive and forward messages from the Meshtastic network directly to a Discord channel.

Meshtastic Discord Bridge GUI Meshtastic Discord Bridge GUI

Features

  • Real-time bridging: Forwards Meshtastic messages to a Discord channel in real-time
  • GUI Interface: User-friendly graphical interface for configuration
  • Auto-reconnect: Automatically reconnects if the connection is lost
  • Serial Port Detection: Automatically detects available serial ports
  • Live Logging: Real-time log display in the GUI
  • Persistent Logging: Optionally save .log files to a location on the computer

Prerequisites

  • Python 3.14
  • A Meshtastic device
  • A Discord webhook URL
  • USB connection to your Meshtastic device

Installation

  1. Clone the repository:

    git clone https://github.com/ssnofall/meshtastic-to-discord-bridge.git
    cd meshtastic-to-discord-bridge
  2. Install dependencies:

    pip install -r requirements.txt

Setup

Discord Webhook Setup

  1. Go to your Discord server settings
  2. Navigate to Integrations → Webhooks
  3. Create a new webhook or use an existing one
  4. Copy the webhook URL

Meshtastic Device Setup

  1. Connect your Meshtastic device to your computer via USB
  2. Ensure your device is powered on and in range of the mesh network
  3. Note the serial port your device is connected to (the application will help detect this)

Usage

  1. Run the application:

    python main.py
  2. Configure the bridge:

    • Enter your Discord webhook URL
    • Select the appropriate serial port for your Meshtastic device
    • Click "Refresh Ports" if your device isn't detected
    • Click "Save and Start" to begin bridging
  3. Monitor the logs:

    • The application will display connection status and incoming messages
    • Messages from the mesh network will be forwarded to Discord
    • The bridge will automatically reconnect if the connection is lost

How It Works

The application creates a bridge between your Meshtastic mesh network and Discord:

  1. Connection: Establishes a serial connection to your Meshtastic device
  2. Message Reception: Listens for incoming text messages from the mesh network
  3. Forwarding: Sends received messages to Discord via webhook
  4. Status Updates: Sends connection status updates to Discord

Message Format

Messages sent to Discord include:

  • Connection status: "Meshtastic Bridge Online 📶"
  • Incoming messages: "📡 Meshtastic Node NODE-ID: Message Content"

Troubleshooting

Common Issues

Device not detected:

  • Ensure your Meshtastic device is properly connected
  • Try clicking "Refresh Ports"
  • Check if your device drivers are installed

Connection errors:

  • Verify the serial port is correct
  • Ensure no other application is using the port
  • Check that your device is powered on

Discord webhook issues:

  • Verify the webhook URL is correct
  • Check that the webhook is still active in Discord
  • Ensure the webhook has permission to send messages

Dependencies

  • meshtastic: Python library for Meshtastic devices
  • requests: HTTP library for Discord webhook communication
  • PyPubSub: Event-driven messaging library
  • tkinter: GUI framework (included with Python)

License

GNU General Public License v3.0

Disclaimer: This project is not affiliated with or endorsed by Meshtastic LLC.

About

A Python application that bridges Meshtastic mesh network messages to Discord using webhooks.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages