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

VisibleTesla

This site may earn commission on affiliate links.
Waking up a sleeping Tesla

Based on discussion in the REST API thread, it appears that running VisibleTesla will keep your Model S awake. If you have version 5.0 of the Tesla software installed on your car, please don't leave VisibleTesla running constantly if you want your car to go to sleep (e.g. don't let VisibleTesla run over night).

It appears to be possible to detect that the car is asleep without waking it up (thanks to the experimenters who figured this out!). I will work on something that tries to be smart about not waking up your car accidentally. For now, those of you with version 5 should be careful not to accidentally give your car insomnia.
 
Two more small bugs:

The Overview tab shows the pano roof as 7% open in vent mode when the Model S says 12% - I think that's the minimum, it's either 0 or >=12. I closed it with the iOS app and it updated to 0. It went back to 7% after selecting Vent on the iOS app.

The Location map often doesn't center the car, it's somewhere near a corner. Refresh doesn't center it. The iOS app has a "car" button that centers the map on the car, along with a "me" button that centers on the iDevice location. Not sure how that is designed to work in VT.
 
The Overview tab shows the pano roof as 7% open in vent mode when the Model S says 12% - I think that's the minimum, it's either 0 or >=12. I closed it with the iOS app and it updated to 0. It went back to 7% after selecting Vent on the iOS app. .
In case it helps, I have data like this in my logs:
sun_roof_installed=true
sun_roof_state=unknown
sun_roof_percent_open=6

The lowest I see other than that is 25.

The values I see are {0, 6, 25, 80, 98}.

Note that I'm not querying often though, roughly once every 15-30 minutes.
 
In case it helps, I have data like this in my logs:


The lowest I see other than that is 25.

The values I see are {0, 6, 25, 80, 98}.

Note that I'm not querying often though, roughly once every 15-30 minutes.

6 ???

You might try different settings in the car (in mine it goes from 12% to 15% as the next step) and look at the corresponding REST data. BTW, I'm using the right hand steering wheel scroll button, it could be more fine grained from the center screen.
 
6 ???

You might try different settings in the car (in mine it goes from 12% to 15% as the next step) and look at the corresponding REST data. BTW, I'm using the right hand steering wheel scroll button, it could be more fine grained from the center screen.

These numbers haven't matched since at least 4.4 or earlier if I remember. The car says vent mode is 12%, the REST API says 6% (or 7%). I haven't got a measuring tape out but I think that they all equate to the same "vent" position.
 
Two more small bugs:

The Overview tab shows the pano roof as 7% open in vent mode when the Model S says 12% - I think that's the minimum, it's either 0 or >=12. I closed it with the iOS app and it updated to 0. It went back to 7% after selecting Vent on the iOS app.

The Location map often doesn't center the car, it's somewhere near a corner. Refresh doesn't center it. The iOS app has a "car" button that centers the map on the car, along with a "me" button that centers on the iDevice location. Not sure how that is designed to work in VT.

Hi Klaus,

I'm directly displaying the pano roof percentage as reported by REST API. I'm not sure how the car massages the percentages so I think for now I'll continue to report them as is. If we can determine the proper algorithm to match the car I'll implement it.

I haven't seen the map display the car off center unless the map has been manually panned. If you can give me a sample lat/long I can manually feed it into the code and see if there is some edge case that causes this.

Thanks for the reports.
 
Hi Klaus,

I'm directly displaying the pano roof percentage as reported by REST API. I'm not sure how the car massages the percentages so I think for now I'll continue to report them as is. If we can determine the proper algorithm to match the car I'll implement it.

I haven't seen the map display the car off center unless the map has been manually panned. If you can give me a sample lat/long I can manually feed it into the code and see if there is some edge case that causes this.

Thanks for the reports.

Re pano roof position: They seem to be doing some mapping between the sensor output and the car UI. I don't think it's worth it to try to re-map it until we see how they handle it in an official TM app.

The map not being centered happened several times yesterday and today. I've seen it in our home location centered as well as near the corner so I doubt that it's related to any specific location. How would I send you coordinates?
 
You can't get the coords from VisibleTesla, but if you go to this page:
Latitude and Longitude of a Point
and enter an address it will put a marker on a map and provide lat/long. You can get close by entering an address and move the marker if you want to get even more accurate.

BTW, which way is your car pointing when this happens? Is it always the same direction? I can't imagine why this would matter, but it is another variable that goes into the map I construct so I want to check it. Can you give me an approximate heading with north = 0, east = 90, south = 180, west = 270?

- - - Updated - - -

I'm thinking about how to deal with cars that are in sleep mode and starting to experiment with options. I don't have 5.0 to test with, so I can't test any of this yet.

Here's what I'm thinking about:
  1. When the app launches and the user logs in, I'll get the car's status. If it's asleep I will pop up a dialog asking whether the user wants to wakeup the car. The dialog will have a checkbox that asks whether the it should be presented in the future, or just go ahead and wake the car up.
  2. I will have a new menu item (File->Allow Sleep). When selected (a check mark will appear) it means that after a certain interval of inactivity with the app (say 10 minutes), it will stop auto-refreshing and stop collecting graph data. This will allow the car to fall asleep.
  3. As soon as the user interacts with the app it will start interacting with the car again, potentially waking it from sleep.

I'll let you know how this approach works out.
 
Wake me up?

Here's a screenshot of the dialog you'll get if you try to run VisibleTesla when your car is asleep. It pops up if necessary right after the login process succeeds but before it switches over to the Overview Tab. I can't tell whether the car is asleep until after you log in.

I tried adding the "don't ask again" checkbox, but I didn't find it that useful and in some cases it led to undesirable behavior so I removed it.

I know the inevitable question that is prompted by this dialog. Is that a proper image of your car with your options? No. It's a generic car image. I have a thought about how to make it right in the future (without a lot of work), but it's not high on my list.

Screen Shot 2013-08-31 at 5.42.37 PM.png
 
The Case of the Spurious Spoiler

I met with @musterion at the "Cars and Coffee" event at Menlo Park this morning and brought my laptop with me. He graciously allowed me to debug the "The Case of the Spurious Spoiler." That's when a spoiler appears in VisibleTesla but the car doesn't have one. I suspected it was something dumb because the code for this is dead simple.

As it turns out, the images that come from the iPhone app have a small problem. For all colors EXCEPT multi-coat red, there are separate images of the trunk and the spoiler. Depending on whether the car has a spoiler, I composite it on top of the trunk. There are actually two trunk images for each car color. One is of the trunk closed, and the other is of the trunk open. For the multi-coat red, the trunk images have the spoiler built into them. I never noticed that. No matter what I did in the code, the spoiler showed up because it was in the base image (but only for multi-coat red).

So, how does the iPhone app get it right? It doesn't. At least not completely. When musterion showed me his car in the iPhone app, it got the spoiler right (no spoiler) but it didn't show the proper car color. VisibleTesla had the opposite bug. It showed the proper car color but the wrong spoiler configuration.

Anyway... I went in and modified the trunk images for the multi-coat red to remove the spoiler. The images are pretty good, but not perfect. When Tesla fixes it in their app, I'll update the images. I will release this fix as part of v0.19 which will also contain some improvements related to sleep mode.

Thanks to everyone who reported the problem and helped track it down.
 
VisibleTesla 0.19

VisibleTesla 0.19 can be downloaded here.

This version has a lot of changes - some visible, some under the covers. As such I consider this version to be experimental and I won't update the first post of the thread quite yet. Please save your previous version until you are comfortable with 0.19. There are three files that you may copy from your old installation to your new one if you wish.
  • If you have "Remember Me" set, you'll have a file called cookies.txt in your current VsibleTesla folder. Copy it to the v0.19 folder to avoid having to log in again.
  • If you've used the graph feature in 0.18 you'll have two files whose names begin with your VIN (a long sequence of letters and numbers). The first file ends in ".log" and the second ends in ".aux". You can copy these files over to the 0.19 folder as well to keep your graph history.

VisibleTesla 0.19 [2013-09-02]


  • User-Visible Changes
    • General
      • Added a "Documentation" item to the "Help" menu. When selected, it displays the documentation in a web browser.
      • Added a "What's New" item to the "Help" menu. When selected, it displays the release notes in a web browser.
      • Sleep-Related
        • Added an "Allow Sleep" item to the file menu. If selected, this will allow the app to go to sleep after 15 minutes of user inactivity. It will not collect data from the car and will allow the car to go to sleep. The setting of "Allow Sleep" is remembered between runs of the app. Any interaction with the app (e.g. selecting a new Tab) will cause an interaction with the car and will wake it from sleep.
        • If the app goes into idle mode, it will display an indication in the title bar.
        • When VisibleTesla is launched and immediately after the user logs in, it checks to see whether the car is asleep (Tesla firmware 5.0 and later). If it is asleep, a dialog will be displayed that asks the user whether she wants to wake it up. If the user says no, the app will exit. NOTE: This functioanlity has only been tested in simulation and should be considered experimental.
    • Login
    • Overview
      • Fixed: Problem where cached odometer readings showed incorrectly if the car's units are set to metric.
    • HVAC
    • Location
      • Overhauled the way map positioning is done. The map will now keep the car centered unless the user explicitly pans the map. If the user does so, she is indicating that she wants to view a specific location and the app will not recenter the map as the car moves. The user may always get back to "center-on-car" mode by clicking on the car. That will recenter the map, enter "center-on-car" mode, and show the address nearest the car in a popup info window.
      • If the user pans the map manually thereby leaving "center-on-car" mode, the car may eventually drive off the edge of the map. VisibleTesla doesn't allow that to happen. Instead it repositions the map slightly to keep the car just at the edge so at least part of it is visible.
      • The contents of the info window will become stale as the car moves. To refresh it, simply close it and open it again.
      • Fixed: When you click on the arrow that represents the car, an infowindow pops up that gives the nearest street address to the car's location. That was never being updated. It always reflected the car's location when the map was first displayed.
    • Charge
      • Changed the "Fast Charger" table entry to "Supercharger". This entry is true only for Superchargers, not HPWCs.
      • The Start and Stop buttons are only enabled if there is power connected to the car.
    • Graphs
      • Added two new variables: speed and power.
      • Experimenting with auto-adjustments to the refresh interval. It will drop down to as little as 20 seconds if at least one variable is changing 20% or more from reading to reading. It will go up as high as 5 minutes if there are no changes to any variables. It starts at 2 minutes.
      • The app remembers which variables you had turned on / off between runs. For example, say you start the app, deselect Voltage, then quit the app. Next time you launch, it will remember that it shouldn't display Voltage. All variables are collected whether they are selected or not.
      • Added a "reset" button in the lower left corner which is represented by a backward arrow icon. Clicking the button will recenter the chart with the current time at the center. This can be useful if you scroll way out and loose track of where you are in the chart.
      • The scrolling and zooming behavior now work in both time (x axis) and value (y axis). With no modifier keys pressed, scrolling/zooming are constrained to the time axis. To scroll/zoom the value axis, press the CTRL key while operating the mouse. To scroll/zoom both, press the SHIFT key while operating the mouse.
      • Zooming is now relative to the current mouse position. The point under the mouse will stay fixed, and the chart will zoom around it. It used to zoom relative to the center of the chart which could be disconcerting at times.
      • Fixed: The app did not respect the units that are selected in the car's interface. Now it does.
      • Fixed: There used to be a "dead area" where the dropdown list of items displayed. The mouse was non-responsive in that area. This problem has been fixed.
      • Fixed: Scaling the chart to longer time frames could make it easy to lose your place in the chart. It now stays centered around the selected time frame.
  • Under-the-covers
    • Applied the MIT Open Source license to all of the sources.
    • Fixed a bug that will cause problems when the app supports multiple cars.
    • Added an alternative method to collect the streaming data in the underlying TeslaClient library.
    • Starting to clean up the way simulated values work.
    • Gracefully shutdown background threads upon app exit.
    • Yet more code simplification.
    • Moved the reverse geo-coding mechanism from Java to javascript.
  • Known problems
    • When quitting the app on a Mac, the app icon will sometimes linger in the dock.
 
Last edited:
had a nice graph with 0.18. I closed the app moved the log files and ran 0.19. No more graph.
also the first time I click the graphs tab it shows a menu in the middle of the screen with "File, Simulate, Help" (all unclickable).
the second time I click the graphs tab it brings up a blank grid. no amount of scrolling, ctrl scrolling or shift scrolling will bring the graph data up.
time scale on bottom does not change with scrolling.
xxxxxx.stats.log date time stamp has not changed since I copied the file from 0.18. no new graph data has appeared.
going back to 0.18 did not help either.

Also initial shut down of 0.18 did not release files. I had to kill processes until I could rename the old directory.
 
Last edited:
This app is so cool. I have my car in at the service centre to repair a power window and the low speed steering clicking issue, and I can see in almost real time the car doors being open and shut, frunk and trunk being open and shut, the car being moved from inside the service center to the outside, back inside, charging for a while, then not for a while. I think I will be able to tell when they are done before I even get the call! I figure when I see it parked at the wash bay, they will be done, and I will be able to head over. Very interesting use of this app. Thanks again jpasqua!

PS, I am still on 0.18, but notice that the odometer is sometimes jumbing from 8334km (correct) to 21,584km (not correct) and back. It seems to be doing it about every refresh, to one, then the next refresh back, etc... Very odd, but a bug you may wish to know about. Perhaps that is some other cars mileage??
 
had a nice graph with 0.18. I closed the app moved the log files and ran 0.19. No more graph.
also the first time I click the graphs tab it shows a menu in the middle of the screen with "File, Simulate, Help" (all unclickable).
the second time I click the graphs tab it brings up a blank grid. no amount of scrolling, ctrl scrolling or shift scrolling will bring the graph data up.
time scale on bottom does not change with scrolling.
xxxxxx.stats.log date time stamp has not changed since I copied the file from 0.18. no new graph data has appeared.
going back to 0.18 did not help either.

Also initial shut down of 0.18 did not release files. I had to kill processes until I could rename the old directory.

Gosh, that is really odd - especially about seeing the menu in the middle of the screen. It definitely sounds as though it is not launching properly. I loaded 0.19 on a fresh machine to see if I could reproduce it, but I haven't been able to. Have you been able to get 0.18 working with the old graph data? If not I could take a look at the files and see if they became corrupted.

Based on your report I updated the 0.19 announcement to highlight the experimental nature of the build. Please let me know if you have any other information that might help me reproduce the problem.

Joe

- - - Updated - - -

... I have my car in at the service centre to repair a power window and the low speed steering clicking issue, and I can see in almost real time the car doors being open and shut, frunk and trunk being open and shut, the car being moved from inside the service center to the outside, back inside, charging for a while, then not for a while. I think I will be able to tell when they are done before I even get the call! I figure when I see it parked at the wash bay, they will be done, and I will be able to head over. Very interesting use of this app. Thanks again jpasqua!

PS, I am still on 0.18, but notice that the odometer is sometimes jumbing from 8334km (correct) to 21,584km (not correct) and back. It seems to be doing it about every refresh, to one, then the next refresh back, etc... Very odd, but a bug you may wish to know about. Perhaps that is some other cars mileage??

Very cool! Too bad I can't stream the video from the rear camera ;-)

The bug you're seeing with the odometer reading is fixed in 0.19.