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

TeslaFi.com

This site may earn commission on affiliate links.
Secondly, neither of them store your encrypted token anywhere on their servers, it's just used as a passthrough to Tesla for authentication.
Can you reconfirm that? I would have expected "encrypted password" in this context, not "encrypted token".
As far as I know the token is definitely stored on the server at least for teslafi - otherwise it wouldn't be able to actually poll the cars for current data.
The password doesn't need to be stored on the server in any form and - again, as far as I know - isn't.
 
Thanks! so if I understand correctly: at the time of the poll he was going 66mph but he had his foot off of the accelerator pedal and was essentially coasting since the power was -62kWh. So he was likely going faster than 66mph prior to that poll.
Yes, that should be right; -62 kW recuperation is not coasting though, that's braking quite noticeably; I'd say he was definitely going faster that 66 before that.
 
I had my token expire recently. I seem to recall the last time I got a friendly reminder e-mail prior to expiration through TeslaFi.com but don't remember seeing one this time.
The validity period for the tokens issued by the API went down from 90 days to 45 days at some point in the past few months - teslafi might have defaulted to the old 90 day period for the email and so missed the actual expiry - there is one (solved) bug regarding display of valid to information on the settings page, perhaps a similar issue exists/(existed?) for the email notification.
 
  • Like
Reactions: Jdeck
@Jdeck , thanks for the change! I now see my car is successfully sleeping three times today. Will see tonight for a long night's sleep.
How did you fix this?
Sorry, I finished at about 2AM and didn't type any changes up.

I changed the data logger to monitor the 'power' api call instead of the defunct 'battery_current' to determine when to put the car to sleep. The 'power' api return could be great since it returns the kW but unfortunately it only reports whole numbers so it's not going to be as accurate as to when it should attempt to go to sleep. Right now it looks to make sure the 'power' is at 0 and the idle time before sleeping has passed per the settings page.

I also added an option to adjust the polling time when idling to see if that could help things at all. I currently have a couple cars set to poll every two minutes and they seem to sleep within 5-6 minutes of stopping polling vs 10-11 minutes when polling every minute. However it doesn't seem to be constant. I thought I would add it and maybe someone can find the sweet spot.

One more thing I added was texting ability. It's not really texting, but you can enter your carriers email to text address to receive sleep alert texts. You will be notified when attempting to sleep, gone to sleep and did not go to sleep.

If anyone is having problems with the car not going to sleep please let me know. The easiest way for me to find your username and car id is to open a ticket in the help section.
 
The validity period for the tokens issued by the API went down from 90 days to 45 days at some point in the past few months - teslafi might have defaulted to the old 90 day period for the email and so missed the actual expiry - there is one (solved) bug regarding display of valid to information on the settings page, perhaps a similar issue exists/(existed?) for the email notification.
You're right. I had corrected the settings page to reflect this but did not correct the email script. It should be fixed now. In fact a bunch of emails just went out.
 
After the sleep fix (uh, it'snot actually a fix but) my car shows Florida USA location when GPS is not available. At my home, at the office, at underground superchargers, etc. Is it possible to fix?

There's a thread somewhere on here about this but I can't seem to find it. It appears to be a bug in 8.1 but for some reason it's not affecting everyone. I enabled the 'latitude' column in your raw data page and you'll see the latitude jumps to -91.0. I was hoping it would be fixed with 17.11.10 but apparently not. The API is actually reporting the same -91.0,-181.0 for all users that are affected. I can't seem to find any rhyme or reason to it, it just comes and goes randomly. I'd give a reboot a shot though, someone told me it helped temporarily in 17.11.03.
 
  • Like
Reactions: hiroshiy and WillK
Can you reconfirm that? I would have expected "encrypted password" in this context, not "encrypted token".
As far as I know the token is definitely stored on the server at least for teslafi - otherwise it wouldn't be able to actually poll the cars for current data.
The password doesn't need to be stored on the server in any form and - again, as far as I know - isn't.
The token is stored, not the username or password.
 
  • Informative
Reactions: David99
Yes, that should be right; -62 kW recuperation is not coasting though, that's braking quite noticeably; I'd say he was definitely going faster that 66 before that.
Ok thank you for the explanation. Since I don't have my dashcam hard wired in, as long as they didn't unplug it I should be able to see his top speed. The owner of the shop called me first thing on Monday morning and apologized profusely. I guess it was the tech's first time in a Tesla... I can't imagine what he would have done in a P100DL instead of my stock 60 lol. The owner seemed sincere so that's about all I can ask for at this point.
 
You're right. I had corrected the settings page to reflect this but did not correct the email script. It should be fixed now. In fact a bunch of emails just went out.

I got the notice that you marked my bug report about this as fixed, but I'm still confused. My token did not expire at 45 days, it continued to 90 days. The original 90 days for my expiration should have been correct. Are you saying the email script just didn't work b/c of recent changes, or it was assuming 90 days and didn't go out for 45 day tokens (which wouldn't apply to my case)?


Perhaps a typo when inputting the expiration?
Ok, this one has been on the list for a while so I just completed it. You can now enter a token during signup or in your settings page. Please let me know if anyone runs into any issues.
I used my workstation to call Tesla.com and get a new token, inputted that into TeslaFi.com, and able to successfully use the new token. However, the settings page only let me input the token itself, not the entire request. Could you allow for input of the other fields as well? Could you tweak mine to include that please? I only ask since it was very convenience that TeslaFi told me my token was about to expire in 8 days and I will miss that as a handy reference.

{
"access_token": <snip>,
"token_type": "bearer",
"expires_in": 7776000,
"refresh_token": <snip>,
"created_at": 1483480101
}

I assume Tesla doesn't actually allow refreshing of the tokens. If it does, I can provide that. Thanks!
I added the ability to enter the expires_in and created_at as well now.
 
Last edited:
I got the notice that you marked my bug report about this as fixed, but I'm still confused. My token did not expire at 45 days, it continued to 90 days. The original 90 days for my expiration should have been correct. Are you saying the email script just didn't work b/c of recent changes, or it was assuming 90 days and didn't go out for 45 day tokens (which wouldn't apply to my case)?


Perhaps a typo when inputting the expiration?
I'm not sure. I didn't do any testing to see why it wasn't working. I noticed that the code did not match what I had recently done for the settings page and copied it over to the email script. I had assumed the 45 day issue was the problem since that was the reason I put the changes into the settings page recently.
 
I'm not sure. I didn't do any testing to see why it wasn't working. I noticed that the code did not match what I had recently done for the settings page and copied it over to the email script. I had assumed the 45 day issue was the problem since that was the reason I put the changes into the settings page recently.

Hmmm. I guess we shall see around in about 40 days. :)
 
Can you reconfirm that? I would have expected "encrypted password" in this context, not "encrypted token".
As far as I know the token is definitely stored on the server at least for teslafi - otherwise it wouldn't be able to actually poll the cars for current data.
The password doesn't need to be stored on the server in any form and - again, as far as I know - isn't.
Right, Tesla's tokens aren't encrypted and James doesn't store your password. Tokens can be encrypted but it's not necessary in Tesla's auth model.
 
One more thing I added was texting ability. It's not really texting, but you can enter your carriers email to text address to receive sleep alert texts. You will be notified when attempting to sleep, gone to sleep and did not go to sleep.
THANK you for this! I've missed a few drives as a result of not staying on top of my email notifications. I even set up an IFTTT recipe to sniff my Gmail and send me a text but, like most things IFTTT, it's not as reliable as I'd like. My alarm system uses the email-to-SMS relays, which is generally reliable (but not instant in some cases, FYI). For those with T-Mobile, just be aware that this carrier doesn't send from a consistent shortcode so it seems to change every time. AT&T only changes the shortcode occasionally, but something to be aware about for this solution. Thanks again!
 
  • Like
Reactions: Jdeck
Sorry, I finished at about 2AM and didn't type any changes up.

I changed the data logger to monitor the 'power' api call instead of the defunct 'battery_current' to determine when to put the car to sleep. The 'power' api return could be great since it returns the kW but unfortunately it only reports whole numbers so it's not going to be as accurate as to when it should attempt to go to sleep. Right now it looks to make sure the 'power' is at 0 and the idle time before sleeping has passed per the settings page.

I also added an option to adjust the polling time when idling to see if that could help things at all. I currently have a couple cars set to poll every two minutes and they seem to sleep within 5-6 minutes of stopping polling vs 10-11 minutes when polling every minute. However it doesn't seem to be constant. I thought I would add it and maybe someone can find the sweet spot.

One more thing I added was texting ability. It's not really texting, but you can enter your carriers email to text address to receive sleep alert texts. You will be notified when attempting to sleep, gone to sleep and did not go to sleep.

If anyone is having problems with the car not going to sleep please let me know. The easiest way for me to find your username and car id is to open a ticket in the help section.
It seems to be working well. If you would like can you give me polling every two minutes? I always put my bags and a jacket from passenger side, and get into the car from driver's side, so wait for boot up is not a problem.
 
A minor but somewhat confusing bug: I've been annotating recent Supercharges with stall information (why I don't know, I just felt like it). From the daily view, I click on the notepad icon for the Supercharging session in question, enter my comment, and press Submit. When the page refreshes, that one session that I'd just edited seems to have replaced all of the charging sessions for that day. If I navigate away from that daily page and back again, everything's back to normal.

Probably easiest if I just show what's wrong, so here's a screenshot:

Screen Shot 2017-04-07 at 10.33.10 PM.png

In this case I've just added an annotation to a charging session at LA/Hawthorne. The next two charging sessions should show Oxnard and Atascadero, but they've both been replaced by the LA/Hawthorne entry. (There are other charging sessions before and after these that were similarly affected.) If I reload the page, all is well.

Bruce.

EDIT: PS. It also seems like if I've annotated any of the charging sessions on a day's page, all of the charging sessions for that day have the notepad icon underneath their data, regardless of whether I'd added an annotation for that particular charging session or not. This quirk persists across page reloads.
 
Last edited:
  • Informative
Reactions: msnow
IMG_0512.jpg
How does Teslafi compute the KWh used and added and what is the difference between the two? Is it a guestimate or is it actual usage?

I am trying to figure out why my electric bill is so high so I signed up for Teslafi and installed a Sense. There is a discrepancy between Teslafi and Sense as far as total KW used. For example, this morning the charging numbers for the total amount of KWh my house has used is at 44kwh. There is no way I used up so much besides the Tesla. It's also possible the Sense is off a little with total usage.