The MMM-Tesla2
module is a MagicMirror addon. This module displays some of your Tesla's data on your Mirror. It is forked from MMM-Tesla which was invaluable for the work on this module.
This is just an early prototype, supporting one vehicle only - displaying the battery state graphically, as well as the range in kms. It uses the unofficial Tesla JSON API from https://timdorr.docs.apiary.io
run git clone https://github.com/martinburheimtingstad/MMM-Tesla2
from inside your MagicMirror/modules
folder. Then run npm install
to install dependencies.
To use this module, add it to the modules array in the config/config.js
file:
modules: [
{
module: 'MMM-Tesla',
position: 'bottom_right', // This can be any of the regions.
// Best results in one of the side regions like: top_left
config: {
// See 'Configuration options' for more information.
email: 'nn@example.com',
password: "XXXXXX",
client_id: 'XXXXX',
client_secret: 'XXXXXX',
vehicle_id: 'XXXXX',
google_api_key: 'XXXXX',
refreshInterval: 1000 * 60 * 10 // 60 minutes
}
}
]
The following properties can be configured:
Option | Description | Example value |
---|---|---|
email |
Your tesla.com email adress, matching the owner's login information for https://my.teslamotors.com/user/login. | Example: elon@tesla.com
This value is REQUIRED |
password |
Your tesla.com password, matching the owner's login information for https://my.teslamotors.com/user/login. | Example: password
This value is REQUIRED |
client_id |
The current client_id is available here. | Example: abc
This value is REQUIRED |
client_secret |
The current client_secret is available here. | Example: abc
This value is REQUIRED |
vehicle_id |
The vehicle_id can be found calling https://owner-api.teslamotors.com/api/1/vehicles with e.g. curl with an OAuth-token attached. Documentation here. Or simply install the excellent teslams command line client and run teslacmd vehicles... and get the vehicle_id from there. | Example: abc
This value is REQUIRED |
google_api_key |
You will need a Google API key, can be generated here. | Example: abc
This value is REQUIRED |
refreshInterval |
How often this refreshes Example: 60000
I'm not stressing the service, so once an hour is default. Default value: 600000
|