+3

Consider creating an ios/android app that uses bluetooth connectivity events to signal to the backend to start/stop data logging

exyll 5 years ago updated 5 years ago 3

Teslafi is always pinging the car. It sometimes decides to 'let the car sleep' but most of the time it seems nothing happens and the car does not fall asleep.

Alternatively you could deploy a small ios/android app that received bluetooth connectivity events that once the phone has a bluetooth connection with the car to start the data logger for the vehicle.

Alternatively you could just alter the polling frequency. I'm fine with Teslafi to ping the data API's every 15 of 60 minutes and when it detects via the app that I'm in the car to then poll every minute or maybe even more frequently.

An app that monitors bluetooth connectivity on Android is for example Flitsmeister: https://play.google.com/store/apps/details?id=nl.flitsmeister

Update the host & path values based on the Tasker doco: https://tasker.joaoapps.com/userguide/en/help/ah_http_get.html as previous values didn't work. It now seems to work as expected.

So far this seems to work! My Model S now went to sleep just after 3.5h but will monitor this more frequently.

I added Tasker task that does a HTTP GET with


host: https://www.teslafi.com

path: feed.php?token={YOURTOKEN}&command=wake

By the way, I've got a solution for the above. I've installed Tasker from https://tasker.joaoapps.com/ and it has a "state" change task. I've configured it to call the Teslafi API when the bluetooth connects to my Tesla.

https://www.teslafi.com/feed.php?token={YOURTOKEN}&command=wake

I've now set my sleep settings to:

- Time To Try Sleeping: 30m
- Idle Time Before Trying To Sleep: 5m
- No Outside Temperature Reading: Unchecked
- No Inside Temperature Reading: Unchecked
- No Shift State Reading: Unchecked
- Nighttime: 21h-7h
- Deep sleep: 23h-7h


Hopefully this will result in Teslafi to stop polling the Tesla data API after a ride but that any regular, nighttime or deep sleep be interrupted when my phone calls the Teslafi API with a wake command.