Script that collects data from the Teslamate via MQTT and sends messages to a Telegram chatbot.
- Python 2.7+
- Install dependencies of Python included in requirements.txt
- Install all dependencies of Python
pip install -r requirements.txt
- Create the
config.py
file - Configure the variables of your MQTT of Teslamate and ABRP inside
config.py
file
MQTT_SERVER = "@@@@@@@@" # MQTT server address (e.g. "127.0.0.1")
MQTT_PORT = "@@@@" # MQTT server port (e.g. "1883")
BOT_TOKEN = "@@@@@@@@@@:@@@@@@@@@@@@@@@@@@@@" # Bot token
BOT_CHAT_ID = "@@@@@@@@@@" # Chat ID
OPTIONS = "update_version" # Select options to send notification (options: state, update_version, display_name, (e.g. "state|update_version"))
CAR_ID = "1" # Car number (usually 1 if you only have a car)
SEND_RESUME = True/False # Enable or disable resume when state change to sleep
DEBUG = True/False # Enable or disable debug mode
- Run the script
- Run on command line (ideal for testing)
python ./teslamateMqttToTelegram.py
- Run in the background
nohup python ./teslamateMqttToTelegram.py & > /dev/null 2>&1
- Authors: Carlos Cuezva – List of contributors
- Distributed under MIT License