bmswens / Meshtastic-Handler

A simple framework to run custom commands on receipt of Meshtastic packets.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Meshtastic Handler

Overview

A simple framework to run custom commands on receipt of Meshtastic packets.

Getting started

Installation and Setup

Linux

git clone https://github.com/bmswens/Meshtastic-Handler.git
cd Meshtastic-Handler
python -m venv venv
source venv/bin/activate
pip install -r requirements.linux.txt

Linux installation notes:

If you are on a linux system and if the voice output is not working , then install espeak, ffmpeg and libespeak1 as shown below:

sudo apt update && sudo apt install espeak ffmpeg libespeak1

Running

python ./src/hander.py

What's Included

databaseMessages.py

This file will write all incoming messages to a sqlite database in the a messages table.

log.py

This file will log the text of incoming messages to stdout.

text2speech.py

This file will play the text of incoming messages as audio over your speakers.

Customizing

Add or remove files from in src/handlers/.

All files must be .py files and implement a get_function_and_event() function which returns a function and a string which represents the topic to subscribe to.

Several examples are located in src/handlers/ folder.

See here for list of topics.

Run on startup

If your system has cron, you can add a line similar to the follow to run on reboot.

@reboot /path/to/venv/python /path/to/src/handler.py

Or you could implement it as a service.

Authors

  • Brandon Swenson- Initial work - bmswens

License

This project, like Meshtastic, is licensed under the GNU General Public License - see the LICENSE.txt file for details

About

A simple framework to run custom commands on receipt of Meshtastic packets.

License:GNU General Public License v3.0


Languages

Language:Python 100.0%