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.
Sorry for all the issues and cries for help haha.

Making progress I think but now getting an error within Scriptable when looking at the TeslaData Widget log.
Line 143 looks blank to me??

IMG_0253.PNG

Screenshot 2021-01-12 at 21.36.18.png
 
This is awesome! Setup was quite straightforward too. Now to get the dark mode working... ;-)
Go to Scriptable, find the TeslaData widget, click the three dots in corner of script

find var is_dark_mode_working (Near the top) and change it from false to true

Then scroll down and find the first statement that starts with ‘if’ ... dark mode

copy my earlier post and paste it on top of the whole function. Should end with }

Click done to save. Then return back to iOS homescreen and click the widget. Should load up dark
 
  • Like
Reactions: webbah
Go to Scriptable, find the TeslaData widget, click the three dots in corner of script

find var is_dark_mode_working (Near the top) and change it from false to true

Then scroll down and find the first statement that starts with ‘if’ ... dark mode

copy my earlier post and paste it on top of the whole function. Should end with }

Click done to save. Then return back to iOS homescreen and click the widget. Should load up dark

Thanks! Worked like a champ!
 
  • Like
Reactions: CMc1
Sorry for all the issues and cries for help haha.

Making progress I think but now getting an error within Scriptable when looking at the TeslaData Widget log.
Line 143 looks blank to me??

View attachment 627000
View attachment 627001

Javascript errors can be particularly unhelpful. Even specific looking ones such as yours can be completely inaccurate. These are often caused by errors in previous lines of code, potentially in different blocks. Its difficult to see from the small segment of code, but as you say you have copied the file direct (without edit?) and it works for others, unless the copy did something unintentional (in which case it would normally occur much earlier in the code), its probably not that.

The other thing it may be is a data error, especially if data is subsequently evaluated. I am not familiar with that code (nor do I intend to be) or the FileManager.iCloud and its instance additional_manager, but I would go having a look to see what the additional_manager.documentsDirectory() method is returning - set a breakpoint and/or log the return value. It would not surprise me if that had something weird in it that would prevent a valid path from being derived from the concatenation or there was an issue with the now referenced parameters javascript file itself - guessing an invalid parameter judging by its name.
 
Haha.. love AP!

Yes I do mate.

View attachment 626859
After adding Ladros lines to docker-compose.yml and running docker-compose up -d, I get this error in my Google Cloud console:

=====@my-fs1-micro-2:~$ docker-compose up -dERROR: The Compose file './docker-compose.yml' is invalid because:Invalid top-level property "teslamate_mqtt_api". Valid top-level sections for this Compose file are: version, services, networks, volumes, and extensions starting with "x-".You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.For more on the Compose file format versions, see Compose file
 
After adding Ladros lines to docker-compose.yml and running docker-compose up -d, I get this error in my Google Cloud console:

=====@my-fs1-micro-2:~$ docker-compose up -dERROR: The Compose file './docker-compose.yml' is invalid because:Invalid top-level property "teslamate_mqtt_api". Valid top-level sections for this Compose file are: version, services, networks, volumes, and extensions starting with "x-".You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.For more on the Compose file format versions, see Compose file

I had a similar issue until I put it in a place docker liked.

Mine sits between proxy and volumes:

Screenshot 2021-01-14 at 12.01.21 copy.png