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

TeslaFi unrecorded journey/charge

This site may earn commission on affiliate links.
The Energie charger at Fleet has been replaced with 2 new 50kW chargers.
They are free to use for a week - which is nice.

also you don't pay for parking whilst charging, which is also nice.

working well. Getting 39kW at 60% SOC

F71C9916-0E15-4021-A948-06895429AFDF.jpeg
 
Ok, now I have an explaination for the poor charge, I think I also have an explanation for TeslaFi unrecorded journey/charge

I had a second instance of this but seeing it happen there and then rather than retrospectively having to remember the circumstances, I believe this happened. I suspect I have a wrong setting or there is a shortfall in Api/TeslaFi logging capabilities.

Scenario. About 30 mins prior to my wife leaving for work, I decided to experiment with pre heating the car. So, used app to set climate, which would have woken it. This transition is recorded in TeslaFi at 07:26 as car transitioned from sleep to park/idle.

The idle is then reported in TeslaFi as finishing at 08:13. However the car would have started its journey at just prior to 08:00 - I suspect, some point between 07:57 and 08:00 but don't hold me to those exact timings. So whilst TeslaFi says that its a drive from Home to Work, as confirmed from start and endpoint map, it incorrectly records that drive as 08:13 - 08:24 and the GPS tracking truncated the first approx 10 mins of the journey.

So, what did TeslaFi say was happening?

From TeslaFi 60 second drive logs, 07:57 to 08:12, in other words, the time I believe car departed to point TeslaFi said car was driving, TeslaFi reports "TeslaFi Sleep Mode Sleep Attempt", followed by 14 minutes of "Trying To Sleep" followed by "Vehicle Did Not Fall Asleep" and eventually at 08:13 "Idling->Driving".

So I believe that TeslaFi started to allow the car to sleep by not polling the car. This critically coincided with the start of the journey. It then failed for whatever reason, to realise that the car was driving during the first period of the drive.

During this period, I am not sure if TeslaFi should have been polling the Tesla Servers (but not the car to avoid waking the car) or whether there is no return from the TeslaApi that TeslaFi should be able to use to detect that car is driving without waking it if it isn't.

Or I have a setting wrong - unfortunately I cannot remember the sleep setting I changed 4 weeks back.
Or there is some reason why TeslaFi should have caught the drive earlier, but didn't.


Otherwise I am delighted with TeslaFi and I will be today extending my trial to a full years subscription and hopefully longer if the few people that used my referral code also become subscribers.
 
The thing is the Op said that Teslafi reported the car as offline during the problem period. The state attribute is part of the vehicle api which does NOT wake up the car so Teslafi is supposed to be pinging that all the time. That is how it finds out that the car has woken up i.e. it will show as online. If is is showing as offline then in theory that means that for whatever reason the car was not connected to the internet for that period so there was no way Teslafi could get the data
It is a bit hidden.

Browse to the TeslaFi.com page> Settings > Account and then go to the "Advanced" section and click the "Tesla API Access" link. This will show you the TeslaFi token you need to browse with and the list of available commands to make up the URL you need.

For example, the command I was describing was https://www.teslafi.com/feed.php?token=[your_TeslaFi_token_here]&command=wake_up

You can check you have the correct URL by just browsing to it on any browser on PC or mobile device and checking that you get a valid response (the wake_up command returns a list of options codes for your particular car).

I am not familiar with IOS but if you can get your device to browse or post that URL whenever you connect to your Tesla Bluetooth then you should find that TeslaFi wakes up whenever you connect.

Hope that helps?
The thing is the Op said that Teslafi reported the car as offline during the problem period every minute. Offline is not the same as sleeping. and there is no way it was sleeping while being driven and charged anyway. The state attribute is part of the vehicle api which does NOT wake up the car so Teslafig pings that every minute irrespective of whether the car was asleep. That is how it finds out that the car has woken up i.e. it will show as online.
If is is showing as offline then in theory that means that for whatever reason the car was not connected to Teslas Servers for that period so there was no way Teslafi could get the data. This means either there was an issue with the car, the cars data connection or Teslas servers.
The problem is not with Teslafi and there is literally nothing that Teslafi can do about this.
 
Something is waking up the car? any suggestions

Change the password? That will prevent any APP (which you might have forgotten about) from connecting. Then set a new password, and only? give that to TeslaFi and see if that fixes things

Then give the password to Phone APP / anything else that you use.

If they all work then maybe you had an additional APP that you had trialled that was still connecting.
 
Good suggestions guys. Thanks!

The only other app is Tesla Remote but I use that regularly. Seems to have settled now :)


Change the password? That will prevent any APP (which you might have forgotten about) from connecting. Then set a new password, and only? give that to TeslaFi and see if that fixes things

Then give the password to Phone APP / anything else that you use.

If they all work then maybe you had an additional APP that you had trialled that was still connecting.
 
I think Teslafi has been pretty good, I like all the stats you can get from it but I have had one unrecorded journey and thought it was a one off but last week i went down to Holsworthy in Devon from Taunton and it only recorded from where i got off of the A30 at the Holsworthy junction, I didnt stop at the services there either so its not like the car went in to park then set off again but thats the only things l've noticed with it.
 
For example, the command I was describing was https://www.teslafi.com/feed.php?token=[your_TeslaFi_token_here]&command=wake_up

You can check you have the correct URL by just browsing to it on any browser on PC or mobile device and checking that you get a valid response (the wake_up command returns a list of options codes for your particular car).

Apologies for replying to old thread (and I am seeing that @TE51 DAV has not been on since Jul 2020, would appreciate if anyone can help) , I am trying to implement TeslaFi API Command and trying to google for examples has come up with nothing, I can't find any info in TeslaFi Support System ... only thing is the simple example on the menu option:

Settings : TeslaFi API : [API Token]​
Query Parameters:​
Pass the authentication token in a URL:​

If I do

https://www.teslafi.com/feed.php?token=[MY_TOKEN]&command=wake_up

https://www.teslafi.com/feed.php?token=[MY_TOKEN]&command=lastGood

I get: ERROR 500 teslafi.com is currently unable to handle this request.

I generated the token last night, tried then and retrying now (in case it was down) is not working ...

I am just looking for a way of testing if it is "just me", or everyone - or if I'm doing something stoopid.
 
Apologies for replying to old thread (and I am seeing that @TE51 DAV has not been on since Jul 2020, would appreciate if anyone can help) , I am trying to implement TeslaFi API Command and trying to google for examples has come up with nothing, I can't find any info in TeslaFi Support System ... only thing is the simple example on the menu option:

Settings : TeslaFi API : [API Token]​
Query Parameters:​
Pass the authentication token in a URL:​

If I do

https://www.teslafi.com/feed.php?token=[MY_TOKEN]&command=wake_up

https://www.teslafi.com/feed.php?token=[MY_TOKEN]&command=lastGood

I get: ERROR 500 teslafi.com is currently unable to handle this request.

I generated the token last night, tried then and retrying now (in case it was down) is not working ...

I am just looking for a way of testing if it is "just me", or everyone - or if I'm doing something stoopid.
I use RapidAPI for Mac to debug and test an API, incase you don't use it, its free and might be helpful, I don't have teslafi but if you try the

https://www.teslafi.com/feed.php?token=[BEARER_TOKEN]&command=COMMAND

Does it authorise this or come up with the 500 error?
 
Last edited:
Does it authorise this or come up with the 500 error?

I don't have a Mac (but I'll look for a Rapid Application Dev API tool for PC, thanks for that) but I had a go in Python. My Python knowledge is non existent (so anything I do with that might be idiot-error rather than competent.)

With that said if I do

Python:
headers = {
    "Authorization": "MY_ACCESS_TOKEN",
    "Content-Type": "application/json"
}

response = requests.get("https://www.teslafi.com/feedapi", headers=headers)
print(response)

I DO get a 200 response (but I get an error if I then attempt to extract/decode the JSON from the response object - but that may well be idiot-error - but my syntax is lifted from reviewing a number of Github libraries for TeslaFi API ... but maybe a GET [to TeslaFi] without any COMMAND doesn't return a JSON payload)

But if I try to do

Python:
url = f'https://www.teslafi.com/feed.php?token=' + access_token + f'&command=lastGood'
response = requests.get(url)
print(response)

I get a 500 Error

I've clutz around with trying to combine the access token "headers" into the URL including command, and passing a "params=payload" additional element to the requsts.get() function ... and spent time trying this-and-that ... which is, sadly, exactly the sort of approach that I can't spare the time for - and the sole reason why I got excited that the TeslaFi API looked like it would give me a leg-up compared to having to build, and debug/resolve, the Tesla API direct.

I have tried print(response.text) (not sure at what point in my process and which of the above attempts were in progress) and I got a bunch of HTML which was basically a Username / Password / SUBMIT form ... notwithstanding that I was using the FEED API URL, nor that the requested content-type was JSON ...

... which might lead to me finding that thisn API is one of a number of "minor" API interfaces which are terribly badly put together from the perspective of someone trying to USE them!

We have loads of big companies who require "Just upload your invoice to our Accounts Package API" (a data-payload type thingie of Invoice Line Items). They all use the same underlying business-market-sector API standard, NONE of them have implemented the XML version (which has been available since the 90's and which I would at the very least be able to verify that my data was correctly presented) and thus all of them require CSV, and NONE of them have any error feedback. The most common error I have had is "Your CSV has the wrong number of fields, 20 required" whereas the correct number is NOT 20 (pointed that out to their support: "Must be an error in our code" ... still not fixed, so the next poor soul is also going to have to guess the right style / data type / length for every single CSV field. And they expect every single supplier, including tiny (like us), to build an interface that supports their (uniquely modified) API ...

Sorry, rant over!
 
I don't have a Mac (but I'll look for a Rapid Application Dev API tool for PC, thanks for that) but I had a go in Python. My Python knowledge is non existent (so anything I do with that might be idiot-error rather than competent.)

With that said if I do

Python:
headers = {
    "Authorization": "MY_ACCESS_TOKEN",
    "Content-Type": "application/json"
}

response = requests.get("https://www.teslafi.com/feedapi", headers=headers)
print(response)

I DO get a 200 response (but I get an error if I then attempt to extract/decode the JSON from the response object - but that may well be idiot-error - but my syntax is lifted from reviewing a number of Github libraries for TeslaFi API ... but maybe a GET [to TeslaFi] without any COMMAND doesn't return a JSON payload)

But if I try to do

Python:
url = f'https://www.teslafi.com/feed.php?token=' + access_token + f'&command=lastGood'
response = requests.get(url)
print(response)

I get a 500 Error

I've clutz around with trying to combine the access token "headers" into the URL including command, and passing a "params=payload" additional element to the requsts.get() function ... and spent time trying this-and-that ... which is, sadly, exactly the sort of approach that I can't spare the time for - and the sole reason why I got excited that the TeslaFi API looked like it would give me a leg-up compared to having to build, and debug/resolve, the Tesla API direct.

I have tried print(response.text) (not sure at what point in my process and which of the above attempts were in progress) and I got a bunch of HTML which was basically a Username / Password / SUBMIT form ... notwithstanding that I was using the FEED API URL, nor that the requested content-type was JSON ...

... which might lead to me finding that thisn API is one of a number of "minor" API interfaces which are terribly badly put together from the perspective of someone trying to USE them!

We have loads of big companies who require "Just upload your invoice to our Accounts Package API" (a data-payload type thingie of Invoice Line Items). They all use the same underlying business-market-sector API standard, NONE of them have implemented the XML version (which has been available since the 90's and which I would at the very least be able to verify that my data was correctly presented) and thus all of them require CSV, and NONE of them have any error feedback. The most common error I have had is "Your CSV has the wrong number of fields, 20 required" whereas the correct number is NOT 20 (pointed that out to their support: "Must be an error in our code" ... still not fixed, so the next poor soul is also going to have to guess the right style / data type / length for every single CSV field. And they expect every single supplier, including tiny (like us), to build an interface that supports their (uniquely modified) API ...

Sorry, rant over!
Don't think there is a PC version but RapidAPI for Mac aka paw dot cloud would make your whole api debugging so much easier, there is probably a similar PC program by someone else.

I will signup to the 14 day trial and have a look how the Api works, what is it that you were trying to achieve?

We have loads of big companies who require "Just upload your invoice to our Accounts Package API" (a data-payload type thingie of Invoice Line Items). They all use the same underlying business-market-sector API standard, NONE of them have implemented the XML version (which has been available since the 90's and which I would at the very least be able to verify that my data was correctly presented) and thus all of them require CSV, and NONE of them have any error feedback. The most common error I have had is "Your CSV has the wrong number of fields, 20 required" whereas the correct number is NOT 20 (pointed that out to their support: "Must be an error in our code" ... still not fixed, so the next poor soul is also going to have to guess the right style / data type / length for every single CSV field. And they expect every single supplier, including tiny (like us), to build an interface that supports their (uniquely modified) API ...

All these big companies have great ideas but when things get overly complicated and users have problems often its difficult to give feedback to the right people who get things fixed, its bad enough having to setup these CSV files in a system that works never mind one that is bugged out, especially when users then believe they did something wrong!
 
  • Like
Reactions: WannabeOwner
I am just looking for a way of testing if it is "just me", or everyone - or if I'm doing something stoopid.

Give the various options a go in Postman.

I just created a TeslaFi API token (make sure you use the TeslaFi one for the Tesla one given to TeslaFi, and it worked right of of the box from the example link they gave. And so did, got a valid json response and confirmed that car actioned the wakeup

https://www.teslafi.com/feed.php?token=[teslafi-api-token]&command=wake_up

tbh, you probably want to be passing token the header format rather than url though. You can set that in postman too

So yes, as you said, probably something stoopid ;) took longer to write this post than get a couple of test calls up and running!
 
  • Like
Reactions: WannabeOwner
it worked right of of the box

That's good to hear, thanks

https://www.teslafi.com/feed.php?token=[teslafi-api-token]&command=wake_up

Yeah that's what I'm doing ...

I wonder if my WatchGuard Firewall thingie is getting in the way ...

So yes, as you said, probably something stoopid ;) took longer to write this post than get a couple of test calls up and running!

Good to hear that too :) My only reason for using this route is on assumption it was less work that actually building a Tesla API interactions script

I'll have a fiddle in case I can get the HTTPS route working, now I know it does work, thanks.