Skip to content

Module for MagicMirror showing data from the Teslalogger or teslamate subscribed to via MQTT

License

Notifications You must be signed in to change notification settings

spitzlbergerj/MMM-TeslaLogger

Repository files navigation

Teslalogger

Module for MagicMirror showing data from the TeslaLogger or from TeslaMate or both subscribed to via MQTT.

This module is based on MMM-MQTT and would not have been possible without the work of Otto Paulsen. Thanks a lot for your work!

Screenshots

view "image" with your Tesla image

Screenshot

view "groupedLines"

Screenshot

view "lines"

Screenshot

Installation

Go to MagicMirror/modules and write

    git clone https://github.com/spitzlbergerj/MMM-TeslaLogger
    cd MMM-TeslaLogger
    npm install

Configuration

Here is an example configuration with description. Put it in the MagicMirror/config/config.js file:

{
    module: 'MMM-TeslaLogger',
    position: 'top_right',
    header: 'Tesla',
    config: {
        mqttServerAddress: '000.000.000.000',
        mqttServerPort: '1883',
        // mqttServerUser: '',
        // mqttServerPassword: '',
        mqttTopics: [
            "Tesla",
            "teslamate/cars/1/+",
        ],
        logging: true,
        localeStr: 'de-DE',
        maxAgeSeconds: 36000,
        style: "lines",

        displayState: true,
        displayOdometer: true,
        displayOutside_temp: true,
        displayBattery_level: true,
        displayCharger_actual_current: true,
        displayInside_temperature: true,
        displaySentry_mode: true,
    }
},

Configuration options

Option Description
mqttServerAddress IP address of the MQTT Broker
mqttServerUser Port of MQTT Broker
mqttServerUser User to access the MQTT Broker (optional)
mqttServerPassword Password of user to access the MQTT Broker (optional)
mqttTopics Topics for the MQTT Broker. The first topic has to be the TeslaLogger MQTT topic. The second topic may be the topic of teslamate.
Possible values: ["Tesla",] - ["xxx", "teslamate/cars/1/+",] - ["Tesla","teslamate/cars/1/+",]
Default value: ["Tesla","teslamate/cars/1/+",]
style The display style for the Tesla data
For a line-by-line display of data from TeslaLogger's MQTT messages, set the value to "lines". Use the display* variables to specify which values are displayed.

For a grouped line by line display of TeslaLogger data, set the value to "groupedLines". The display* variables allow you to control which values are displayed. However, not all values can be hidden.

For a display with a photo of your Tesla, set the value to "image". The TeslaLogger values are grouped around the photo. The display* variables have no effect on the display.

Possible values: "lines" - "groupedLines" - "image"
Default value: "lines"
maxAgeSeconds The intensity of the letters is reduced after the specified seconds have elapsed. Older data is therefore displayed less brightly.
Default value: 36000 = 10 hours
localeStr String for country-specific formatting of numbers.
Possible values: see Tags for Identifying Languages
Example values: de-DE - en-US
Default value: "de-DE"
logging Switch on logging
Possible values: "true" - "false"
Default value: "false"
imageURL URL to the image file for the style "image".
Default value: 'modules/MMM-TeslaLogger/img/teslaModelSBlack.png'
imageSize The image file in the view "image" is displayed centered. This value controls how large the image file is displayed and how much space remains for the TeslaLogger data displayed.
Default value: "70%"
sentryImageURL URL to the image file that will be displayed if sentry mode is enabled.
Default value: 'modules/MMM-TeslaLogger/img/HAL9000.png'
display**
unit**
If the corresponding data field should be displayed in the style lines or groupedLines then set the corresponding display** value to true. At present, these specifications do not yet have any influence on the display in style image.
Use the unit** variables to set which unit should be displayed after the value specification
Details in tables below
calcToImperials With the parameter calcToImperial the values of Odometer, Outside_temp, Inside_temperature, Trip_distance, Est_battery_range_km, Ideal_battery_range_km can be converted into imperial values.
Default value: "false"

Display values in different styles

Variable display** Variable lines groupedlines image
state of the car displayState X X -
actual speed of the car displaySpeed X X
actual power of the car displayPower X X -
Odometer displayOdometer X X X
Ideal range of km with actual battery level displayIdeal_battery_range_km X X -
outside temperature displayOutside_temp X X X
actual level of battery displayBattery_level X X X
actual voltage during charging displayCharger_voltage X X -
actual phases during charging displayCharger_phases X X -
actual current during charging displayCharger_actual_current X X -
energy added since start of charging displayCharge_energy_added X X -
actual power during charging displayCharger_power X X -
SW version of the car displayCar_version X X X
time of actual/last trip start displayTrip_start X - -
max speed during actual/last trip displayTrip_max_speed X X -
max power during actual/last trip displayTrip_max_power X X -
duration of actual/last trip in seconds displayTrip_duration_sec X X X
spended kwh since start of actual/last trip displayTrip_kwh X X X
average kwh during actual/last trip displayTrip_avg_kwh X - -
distance since start of actual/last trip displayTrip_distance X X X
timestamp displayTs X - -
actual latitude displayLatitude X -
actual longitude displayLongitude X - -
actual level limit of charging displayCharge_limit_soc X X -
inside temperature displayInside_temperature X X X
is battery heater active? displayBattery_heater X X X
is preconditioning active? displayIs_preconditioning X X X
is sentry mode active? displaySentry_mode X X X
is the car locked - only used by Teslamate displayLock X X X
Geofence from TeslaMate displayGeofence X - -
is an Update available - only TeslaMate displayUpdate_available X X X
estimated battery range in km - only TeslaMate displayEst_battery_range_km X - -
time to full charge in minutes - only TeslaMate displayTime_to_full_charge X X -
is there an open window? - only TeslaMate displayWindows_open X X -
is there an open door? - only TeslaMate displayDoors_open X X -
is there someone in the car? - only TeslaMate displayIs_user_present X X X
is the cable plugged in? - only TeslaMate displayPlugged_in X X X
start time of charging? - only TeslaMate displayScheduled_charging_start_time X X -

Unit values

Variable unit** Variable default setting for units
actual speed of the car unitSpeed "km/h"
actual power of the car unitPower "kW"
Odometer unitOdometer "km"
Ideal range of km with actual battery level unitIdeal_battery_range_km "km"
outside temperature unitOutside_temp "°C"
actual level of battery unitBattery_level "%"
actual voltage during charging unitCharger_voltage "V"
actual current during charging unitCharger_actual_current "A"
energy added since start of charging unitCharge_energy_added "kWh"
actual power during charging unitCharger_power "kW"
time of actual/last trip start unitTrip_start "Uhr"
max speed during actual/last trip unitTrip_max_speed "km/h"
max power during actual/last trip unitTrip_max_power "kW"
duration of actual/last trip in seconds unitTrip_duration_sec "Sek."
spended kwh since start of actual/last trip unitTrip_kwh "kWh"
average kwh during actual/last trip unitTrip_avg_kwh "kWh"
distance since start of actual/last trip unitTrip_distance "km"
time of ??? unitTs "Uhr"
actual level limit of charging unitCharge_limit_soc "%"
inside temperature unitInside_temperature "°C"
estimated battery range in km - only TeslaMate unitEst_battery_range_km "km"
time to full charge in minutes - only TeslaMate unitTime_to_full_charge "min"
start time of charging? - only TeslaMate unitScheduled_charging_start_time "Uhr"

TeslaLogger MQTT Topic

The TeslaLogger MQTT Topic is set in the file MQTTClient.exe.config on the computer running TeslaLogger. See the corresponding documentation on page 3 and 4.

Example

            <setting name="Topic" serializeAs="String">
                <value>Tesla</value>
            </setting>

About

Module for MagicMirror showing data from the Teslalogger or teslamate subscribed to via MQTT

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published