Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

iOS Widget for TeslaFi/Teslamate/TeslaLogger via Scriptable

This site may earn commission on affiliate links.
Done!!

Thanks again for everyone's help :)

IMG_17C916076037-1.png
 
I've added support for displaying the distance and temperature in other units now:

TEMPERATURE_UNIT=C/F
DISTANCE_UNIT=km/imperial

So I am assuming that we can use these variables to change the output of the API, but where do I set them - are they set in the environment variables of the API in docker-compose.yml?

I currently have the widget working in miles but that was by hardcoding the km to miles conversion in TeslaData Widget.js
 
  • Like
Reactions: Stach
I've done the following, but am stuck right near end. Just a little help pleas
  1. Stopped Teslamate, ipdated the Teslamate docker-compose.yml file and started Teslamate again
  2. Verified that I can connect via the API URL and get a proper response
  3. Installed Scriptable
  4. Added the TeslaData Widget
  5. Created the tesla_data subfolder and added the 3d.js and parameters.js files to it
  6. I need to edit the parameters.js file to add my API URL, but am not sure where in the file to add it (line 955?) or what the syntax should be?
  7. Am I missing anything else?
Thanks in advance for your help!
Stach
 
I've done the following, but am stuck right near end. Just a little help pleas
  1. I need to edit the parameters.js file to add my API URL, but am not sure where in the file to add it (line 955?) or what the syntax should be?
Thanks in advance for your help!
Stach

Well, the method that I used to copy those 3 .js files was obviously bad (not 955+ lines), so I now have 3 good files, but I'm not sure what the format of the apiurl is in the parameters.js file (does it include the http:// or just everything after that)?

Also, do I need to remove the // in front of each line of the parameter.js file (guessing that means a comment)?
 
Well, the method that I used to copy those 3 .js files was obviously bad (not 955+ lines), so I now have 3 good files, but I'm not sure what the format of the apiurl is in the parameters.js file (does it include the http:// or just everything after that)?

Also, do I need to remove the // in front of each line of the parameter.js file (guessing that means a comment)?

Morning @Stach - for the api URL in the parameters file, it’s the whole thing with http included. Remove the // in front as you’ve said, this makes the line live, rather than a comment.

When you then add the widget, choose the TeslaData widget, select run as script and leave the parameters in the widget blank.
 
Well, the method that I used to copy those 3 .js files was obviously bad (not 955+ lines), so I now have 3 good files, but I'm not sure what the format of the apiurl is in the parameters.js file (does it include the http:// or just everything after that)?

Also, do I need to remove the // in front of each line of the parameter.js file (guessing that means a comment)?

Dang, just call me the Thread Killer.

Anyway, I got it all working and with Dark Mode too (looks awesome), so thanks to everybody who helped make all of this possible! Now to help a couple friends out who want this as well...
 
At least for this TeslaMate user, neither of the following methods shows the rated range as they both show an estimated range that is 20% lower than rated.

//show_range = true; // show the estimated range above the battery bar
//show_range_est = true; // show range estimated instead of the car's range estimate

Is this true for anyone else, as I'll just use the battery percentage (which is accurate) until this gets fixed?
 
Hi @Landro,

I would like to use the api endpoint you developed for teslamate (great job btw) but i'm not familiar with Go language to fix my issue.
I've modified a little bit my MQTT installation to add more security with credentials as i'm pushing other stuff in the broker, unfortunately your client doesn't work with credentials set, could it be possible to add MQTT_USERNAME & MQTT_PASSWORD variables ?

Thanks a lot !
Arc