A simple telegram bot to forward messages to a meshtastic connected device via serial interface
-
A Meshtastic device: https://github.com/meshtastic/Meshtastic-device
-
Meshtastic Android App https://github.com/meshtastic/Meshtastic-Android
-
Meshtastic Python API https://github.com/meshtastic/Meshtastic-python
-
Telegram Python API https://github.com/python-telegram-bot/python-telegram-bot
- Open the bot in a text editor
- Update your bot token
- Start your bot:
python3 meshmeharderbot.py
- Write a message to your bot
- Read out the telegram id from console
- Insert your telegram id into LIST_OF_ADMINS
Every telegram message send from an admin gets forwarded to the meshtastic You can add the bot to a group and forward messages within the group with /forward Messages which exceeds payload size gets stripped down automatically.
This is a collection of common questions and answers from our friendly forum.
This indicates an OS permission problem for access by your user to the USB serial port. Typically this is fixed by the following.
Some Linux commands to overcome this issue:
Method 1: Add your user to the group dialout
sudo usermod -a -G dialout <username>
Method 2: Another try would be to take ownership of this interface
sudo su
cd /dev
chown <username> ttyUSB0
exit
Method 3: Last you can also start your telegram bot as root
sudo python3 meshmeharderbot.py