A powerful and easy-to-use relay between Meshtastic devices and Matrix chat rooms, allowing seamless communication across platforms
 
 
Go to file
Jeremiah K db993a0ba8 Merge branch 'longnames-sqlite' 2023-04-18 12:31:03 -05:00
.gitignore Update .gitignore 2023-04-18 10:24:44 -05:00
README.md support custom channel 2023-04-17 20:39:14 -04:00
main.py Merge branch 'longnames-sqlite' 2023-04-18 12:31:03 -05:00
requirements.txt initial commit 2023-04-17 19:50:28 -04:00
sample_config.yaml Added serial connection support 2023-04-17 20:24:51 -05:00

README.md

Meshtastic <=> Matrix Relay

Simple relay between Meshtastic and Matrix.org

Installation

Clone the repo

git clone https://github.com/geoffwhittington/meshtastic-matrix-relay.git

Setup

In the directory create a Python virtualenv:

python3 -m venv .pyenv

Activate the virtualenv and install dependencies

source .pyenv/bin/activate
pip install -r requirements.txt

Configuration

Create a config.yaml in the directory with the appropriate values. A sample is provided below:

matrix:
  homeserver: "https://example.matrix.org"
  access_token: "reaalllllyloooooongsecretttttcodeeeeeeforrrrbot"
  bot_user_id: "@botuser:example.matrix.org"
  room_id: "!someroomid:example.matrix.org"

meshtastic:
  host: "meshtastic.local"
  broadcast_enabled: false
  channel: 0

logging:
  level: "debug"

Run

After activating the virtualenv:

source .pyenv/bin/activate

Run the following on the command-line:

python main.py

For example,

$ python main.py
INFO:meshtastic.matrix.relay:Starting Meshtastic <==> Matrix Relay...
INFO:meshtastic.matrix.relay:Connecting to radio at meshtastic.local ...
INFO:meshtastic.matrix.relay:Connected to radio at meshtastic.local.
INFO:meshtastic.matrix.relay:Listening for inbound radio messages ...
INFO:meshtastic.matrix.relay:Listening for inbound matrix messages ...