Skip to content

Script that collects data from the Teslamate via MQTT and sends messages to a Telegram chatbot.

Notifications You must be signed in to change notification settings

CarlosCuezva/teslamate-telegram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TeslaMate to Telegram

Script that collects data from the Teslamate via MQTT and sends messages to a Telegram chatbot.

Requirements

  • Python 2.7+
  • Install dependencies of Python included in requirements.txt

Instructions

  1. Install all dependencies of Python
pip install -r requirements.txt
  1. Create the config.py file
  2. 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
  1. 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

Credits