# Charge reminder program: 2 approaches



## zephyrus (Jun 22, 2020)

I have a Model 3 that sometimes forgets to plug itself in in the evening for charging. I wanted a setup that would send an email and text to remind "me" to do this. There are options out there, but none that met my requirements:
1) I don't want to give up my "car keys" (Tesla login) info to **anyone** even though I'm sure most developers are honest and don't store my info.
2) I don't want to pay anyone to do this (I'm a cheap SOB).
3) My normal situation is Model 3 at home in the evening, ready to be charged.

To be sure, there are bits and pieces out there for this, including contributors to this forum, but nothing seemed to work "off the shelf". I've managed to create/modify 2 different approaches:

1) I modified someone else's (Brett Morrison) 3 year old code. It is based on the Tesla API and is written in Go (Golang) so it runs on most platforms. (I run in Windows 10) Here's the description:
https://github.com/zephyrus9MA/TeslaCommand/blob/wake&SMTP_updates/readme.md

2) I also took some of the cURL code from this forum and made a simpler (than 1) BASH shell script. Windows 10 has a nice Ubuntu package (WSL) that works really well. You can find the description here:
https://github.com/zephyrus9MA/Tesla_Charge_Reminder/blob/master/README.md

Comments welcome.


----------



## FRC (Aug 4, 2018)

Comments welcome. 
When you exit your car in your garage...PLUG IT IN!!!


----------



## Ed Woodrick (May 26, 2018)

Forget to plug it a few times, that may help.

Do you use more than 50% daily?


----------



## zephyrus (Jun 22, 2020)

Tried forgetting, that's easy....didn't seem to work. Some days >50%. Maybe I should only forget on days when <50%? Why didn't I think of that?


----------



## Ellett (Apr 3, 2020)

In Google calendar, set up an appointment recurring daily at the time of your choice and add an email reminder at the time of event.


----------



## skygraff (Jun 2, 2017)

Put something important for your life in the house (e.g., remote control, phone charge cable, etc.) on top of your car cable when you leave so you’ll need to grab it (and cue the plug in behavior) when you return. After a while, the habit will be set and you won’t need the reminder item.


----------



## SoFlaModel3 (Apr 15, 2017)

Create a recurring reminder on your phone that triggers daily at a set time “Did you plug in the car?”


----------



## Malaromane (Jul 5, 2020)

That's one feature of my Chevy Volt I'm really going to miss when I finally trade her in for a new M3 soon. The companion smartphone app for the Volt has notification settings that will send you a reminder to plug in the vehicle (via email or text) at a user-specified time. But it only sends the reminder if the vehicle isn't plugged in already. That notification has saved me countless times over the last 5 years.

So I'll be watching this thread with interest as I'd like to have something similar for my M3.

The problem (for me) with just setting a daily reminder in a calendar app is that the reminder will quickly just become "noise" and will start being ignored because 90% of the time, your reaction will be "It's plugged in already; stop bugging me!"

Having a notification only trigger when the car isn't actually plugged in serves as a much more noticeable call to action.


----------



## zephyrus (Jun 22, 2020)

Ellett said:


> In Google calendar, set up an appointment recurring daily at the time of your choice and add an email reminder at the time of event.


Turns out that human nature doesn't work that way. The brain ignores a constantly occurring event. "Oh yeah. Plug in the Tesla. I did that. Or was that yesterday?"


----------



## zephyrus (Jun 22, 2020)

skygraff said:


> Put something important for your life in the house (e.g., remote control, phone charge cable, etc.) on top of your car cable when you leave so you'll need to grab it (and cue the plug in behavior) when you return. After a while, the habit will be set and you won't need the reminder item.


Good idea. Now I'll need to develop a program that reminds me to put my phone charge cable on top of the car.


----------



## zephyrus (Jun 22, 2020)

Malaromane said:


> So I'll be watching this thread with interest as I'd like to have something similar for my M3.


Me too! Maybe I'll have to write something like that. If I do, I'll post it here. Oh wait! I already did!


----------



## Long Ranger (Jun 1, 2018)

zephyrus said:


> Me too! Maybe I'll have to write something like that. If I do, I'll post it here. Oh wait! I already did!


Cool that you did this. I think some folks missed that you already came up with a solution. I love it when people come up with stuff like this and share it for everyone.

However, for me personally, plugging in the car is in the same category as rolling up the windows, closing the trunk, or turning off an ICE vehicle ignition. Just something I automatically do, never considered the need for a reminder.


----------



## zephyrus (Jun 22, 2020)

Long Ranger said:


> However, for me personally, plugging in the car is in the same category as rolling up the windows, closing the trunk, or turning off an ICE vehicle ignition. Just something I automatically do, never considered the need for a reminder.


I'm the same. Unfortunately not true of all my household drivers.


----------



## mrau (Nov 22, 2018)

This may not help the Original Poster, but for those that use the Stats app (iPhone) you already have this feature.

If I am at home, after 7 pm, battery is below 60% and the car is not plugged in....... I'll get a reminder on the iphone.

Here is a screen shot of what it looks like.


----------



## zephyrus (Jun 22, 2020)

mrau said:


> This may not help the Original Poster, but for those that use the Stats app (iPhone) you already have this feature.
> 
> If I am at home, after 7 pm, battery is below 60% and the car is not plugged in....... I'll get a reminder on the iphone.
> 
> Here is a screen shot of what it looks like.


I have access to this app, just not willing to give up Tesla access to a third party...


----------



## ibgeek (Aug 26, 2019)

zephyrus said:


> I have access to this app, just not willing to give up Tesla access to a third party...


The way the API works, you grant access to some controls, but you keep the keys to that access and can take it away at any time. I recommend you read up on how the API protects you from unscrupulous coders. It's very secure. In fact on several occasions Tesla has challenged hackers to crack the API with a new Tesla being the prize. You will be fine. I've been using Teslafi since I got my car. It has saved my bacon a few times.


----------



## msjulie (Feb 6, 2018)

What kind of phone do you have @zephyrus ?


----------



## zephyrus (Jun 22, 2020)

msjulie said:


> What kind of phone do you have @zephyrus ?


1 iphone, 1 android


----------



## zephyrus (Jun 22, 2020)

ibgeek said:


> The way the API works, you grant access to some controls, but you keep the keys to that access and can take it away at any time. I recommend you read up on how the API protects you from unscrupulous coders. It's very secure. In fact on several occasions Tesla has challenged hackers to crack the API with a new Tesla being the prize. You will be fine. I've been using Teslafi since I got my car. It has saved my bacon a few times.


I'm sure Teslfi is useful. I'm just not willing to pay a subscription for accessing my vehicle if there are other options.

As for the API, I've looked at it. It's hard to write an app using it without some understanding of how it works. All the apps/services I've looked at (including Teslafi, I believe) ask for my Tesla login (email/password). AFAIK, this gives them access to everything. If you know of a counter example, please post a specific reference. For example, I believe that with my email/password someone can always find the location of my car and unlock it. Would you do this if it was your house? This is quite different from hacking.


----------



## ibgeek (Aug 26, 2019)

zephyrus said:


> I'm sure Teslafi is useful. I'm just not willing to pay a subscription for accessing my vehicle if there are other options.
> 
> As for the API, I've looked at it. It's hard to write an app using it without some understanding of how it works. All the apps/services I've looked at (including Teslafi, I believe) ask for my Tesla login (email/password). AFAIK, this gives them access to everything. If you know of a counter example, please post a specific reference. For example, I believe that with my email/password someone can always find the location of my car and unlock it. Would you do this if it was your house? This is quite different from hacking.


Teslafi asks you to log in, but your credentials never actually go to Teslafi, what happens is that the API queries tesla directly. So you are logging in to tesla not Teslafi. Once you log in and give permission a token is generated. All that Teslafi knows is that you have a valid token. Think of an SSL Certificate. Now am I saying there is NO risk at all in using a service like Teslafi? No. But I believe that you'd stand a better chance of someone smashing your window than someone maliciously unlocking your car. For me, the cost of the subscription and the extra functionality that Teslafi brings to the table are worth it. I can track in real time how healthy my battery is. Did my mileage drop off? When and possibly why. I can schedule times that I want my car to charge if need be, have the car turn on the AC at a specific time so that the car is ready when I leave. (the car can kind of do that, but not on a schedule and you can't set it up from your phone or PC like Teslafi can) As a last bit of info, if you use pin to drive, and you absolutely should be using that. Then even if your car was unlocked, the pin can not be touched by the API.

Not trying to pressure you in any way as you are wise to exercise caution, but you asked for counter points. 

P.S. I would like to see MFA added to the Teslafi log in. It's being discussed in their support forum.


----------



## zephyrus (Jun 22, 2020)

ibgeek said:


> Teslafi asks you to log in, but your credentials never actually go to Teslafi, what happens is that the API queries tesla directly. So you are logging in to tesla not Teslafi. Once you log in and give permission a token is generated. All that Teslafi knows is that you have a valid token. Think of an SSL Certificate. Now am I saying there is NO risk at all in using a service like Teslafi? No. But I believe that you'd stand a better chance of someone smashing your window than someone maliciously unlocking your car. For me, the cost of the subscription and the extra functionality that Teslafi brings to the table are worth it. I can track in real time how healthy my battery is. Did my mileage drop off? When and possibly why. I can schedule times that I want my car to charge if need be, have the car turn on the AC at a specific time so that the car is ready when I leave. (the car can kind of do that, but not on a schedule and you can't set it up from your phone or PC like Teslafi can) As a last bit of info, if you use pin to drive, and you absolutely should be using that. Then even if your car was unlocked, the pin can not be touched by the API.
> 
> Not trying to pressure you in any way as you are wise to exercise caution, but you asked for counter points.
> 
> P.S. I would like to see MFA added to the Teslafi log in. It's being discussed in their support forum.


I think that the token remains good for some period of time (30 days?). I assume Teslafi stores it somewhere. I'm sure they would not have malicious intent, but what about someone who hacks Teslafi? Anyone who is halfway decent at one of the many programming interfaces (not me!) can easily develop all the capabilities you mention and more. The fact that I was able to do this for a simple charge reminder is testament to that. It's not for everyone, but some of us like the challenge of creating our own code. For rank amateurs like me, there's a tremendous amount of help out there. As for the pin, that's a good idea and makes it much harder to steal the car (but harder to operate also). However if the car is stolen, it can be easily tracked. Not so the contents. Thanks for the input!


----------



## ibgeek (Aug 26, 2019)

zephyrus said:


> I think that the token remains good for some period of time (30 days?). I assume Teslafi stores it somewhere. I'm sure they would not have malicious intent, but what about someone who hacks Teslafi? Anyone who is halfway decent at one of the many programming interfaces (not me!) can easily develop all the capabilities you mention and more. The fact that I was able to do this for a simple charge reminder is testament to that. It's not for everyone, but some of us like the challenge of creating our own code. For rank amateurs like me, there's a tremendous amount of help out there. As for the pin, that's a good idea and makes it much harder to steal the car (but harder to operate also). However if the car is stolen, it can be easily tracked. Not so the contents. Thanks for the input!


No worries, btw, the token is valid for 14 days or until your password is changed. 
You did bring to light the fact that MFA has not been enabled for TeslaFi and I've created a separate TOO post to that regard. It should be noted that Tesla's app, for the most part, is using the same API with a few more options enabled. I'd like to see MFA get turned on for that as well. Anywhere there is a username and password, there is a risk that someone will get it. Having that extra layer is very important until biometrics become more reliable and available. I know Elon did mention it was coming but it doesn't seem like a priority right now.


----------

