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

ChargeGuy: new Android app with notifications and charge alarms.

This site may earn commission on affiliate links.
Longtime lurker here. I got my P85D on 12/31 along with everyone else, been loving it so far. The Android app, though, is a little on the crusty side, as everyone here has noted repeatedly.


I rolled my own helper app awhile ago and I'm putting it into Google Play today after sprucing it up a bit. ChargeGuy is available now and is 100% free: no IAP, ads, or crapware. The Google Play link is: https://play.google.com/store/apps/details?id=com.ncs.chargeguy


It has two main features to help out with managing charging.


1) Configurable alarms. ChargeGuy will check your car daily for connection status and minimum range as configured, raising notifications on your phone if things don't go to plan. You can specify a connection warning and a range alarm separately. You can also set the range alarm to bypass system volume and play an extra noisy sound clip, which will wake up most normal humans. If you're like me and you tend to plug in only when you notice the range is semi-low, this is a godsend.


2) Real-time monitoring on demand for supercharging. ChargeGuy lurks in the background and monitors your car's charging status, raising notifications when it changes. It also keeps an ongoing notification visible with stats and time left, so you don't have to do battle with the stock app that requires being restarted all the goddamn time.


The monitoring has to be set off manually, since it works by polling the car a few times per minute. To avoid hammering Tesla's servers (and your phone's battery), it automatically stops after charge is complete or a few hours elapse.


---


Thanks to timdorr and others for documenting the REST API - it saved me a lot of reversing time. This app uses the new oauth method of authenticating, so I'm pretty sure it'll work for everyone. Enjoy!
 
Just downloaded and going to give it a try... Thanks for creating this! :biggrin:

*Note: There is a default UserID & PW that is present when you first attempt to login.

Update: My table had a prepopulated UserID and PW phone did not have it prepopulated
 
Last edited:
Sounds like a good plan, however I think Tesla recently modified authentiation and the community-documented API doesn't quite work like it should anymore. Probably check out the VisibleTesla thread and source for details on that. If you're able to get a nice working app I'd be willing to donate/buy/whatever. Bonus points if you make it OSS ;)

For me, I get this with your app:

2015-03-13 20.04.03.png
 
Just downloaded and going to give it a try... Thanks for creating this! :biggrin:

*Note: There is a default UserID & PW that is present when you first attempt to login.

Update: My table had a prepopulated UserID and PW phone did not have it prepopulated

Uh-oh. I hope there's not some dangly test code. Thanks for the heads-up, I'll give it a wipe and make sure.

- - - Updated - - -

Sounds like a good plan, however I think Tesla recently modified authentiation and the community-documented API doesn't quite work like it should anymore. Probably check out the VisibleTesla thread and source for details on that. If you're able to get a nice working app I'd be willing to donate/buy/whatever. Bonus points if you make it OSS ;)

For me, I get this with your app:

Yeah, I've been following that big thread for awhile. I went with the new oauth-style, since the old user_session[email/pw] stuff appears to be going away. Although it's a little annoying that I'm already running into a bump. Naturally, it doesn't occur with my login. :mad:

I'll see how many people are affected, maybe have it fall back to the old authentication if necessary.
 
Let me get this right, your app is going to prompt me for myTesla crendentials?


Ummm no thanks. That's like handing you a key to my car.

I agree this is a terribly bad practice, but since Tesla has no public API it's impossible to make an app that does anything otherwise. This is why I'd like any apps that need this data to be open source, personally.

In this case I changed the password, tried the app, changed it again. I'm sure there will be social engineering attacks along these lines eventually, since the login and password can be used to locate, remotely start, AND drive off with the car all without the key. Then a bunch of Model S thefts will happen. Tesla really needs to beef up security on the keyless driving feature. It should, at the very least, require an additional password or PIN or even an SMS verification or something.
 
Until Tesla provides a better way, then this is it. I definitely understand your concern, but there's not much to do to avoid it, other than build it from source. I don't want to get in the business of processing a bunch of random pull requests, so I'm not putting it on github yet.

However, I'd be more than happy to email anyone the source who wants to help tinker, just drop me a PM.
 
Until Tesla provides a better way, then this is it. I definitely understand your concern, but there's not much to do to avoid it, other than build it from source. I don't want to get in the business of processing a bunch of random pull requests, so I'm not putting it on github yet.

However, I'd be more than happy to email anyone the source who wants to help tinker, just drop me a PM.

I wouldn't mind giving it a little bit of tinkering to see if I can figure out why it isn't working for me.

On a side note, did you design it with multiple vehicles per account in mind? When I added my fiance's Model S to the account this broke almost every 3rd party app/interface previously.
 
I'm sure there will be social engineering attacks along these lines eventually, since the login and password can be used to locate, remotely start, AND drive off with the car all without the key. Then a bunch of Model S thefts will happen.

If they ever do want to embrace any kind of community development, they're going to eventually have to do some kind of tiered access control, or maybe granting access through the stock app.

Unfortunately, I can't think of a way to truly mitigate it without trust. OAuth itself won't solve the problem at all - even if you magically import an access token into an app, then the app could still simply pass the token upstream for the bad guy to take the car. Having some kind of "read-only" tier would be an excellent quick solution for Tesla, especially if they can come up with a way to manage credentials and pass the access token back (like Facebook does on Android/iOS).

Until then, we're stuck with no apps - or trust, which is definitely hard to come by with a car this valuable.
 
If they ever do want to embrace any kind of community development, they're going to eventually have to do some kind of tiered access control, or maybe granting access through the stock app.

Unfortunately, I can't think of a way to truly mitigate it without trust. OAuth itself won't solve the problem at all - even if you magically import an access token into an app, then the app could still simply pass the token upstream for the bad guy to take the car. Having some kind of "read-only" tier would be an excellent quick solution for Tesla, especially if they can come up with a way to manage credentials and pass the access token back (like Facebook does on Android/iOS).

Until then, we're stuck with no apps - or trust, which is definitely hard to come by with a car this valuable.

Right. Definitely need Tesla's support to make a secure solution.

In the mean time, the next best thing is open source.
 
Right. Definitely need Tesla's support to make a secure solution.

In the mean time, the next best thing is open source.

Yep. Although opening the source doesn't resolve the trust issue very well, unless people are actually building the APK from source and installing it. But, hey, that's better than nothing. Speaking of which, I PM'd you a link to it, if you want to build it and give it a spin to see what Tesla is coming back with at auth time.
 
Yep. Although opening the source doesn't resolve the trust issue very well, unless people are actually building the APK from source and installing it. But, hey, that's better than nothing. Speaking of which, I PM'd you a link to it, if you want to build it and give it a spin to see what Tesla is coming back with at auth time.

True.

I'm going to tinker with it tonight most likely and I'll let you know. Thanks. :)
 
So, I put the source into Android Studio, compiled, and ran in debug mode....... and it works fine.


Installed the APK from the store, ran, fails as posted earlier.

:confused:

All right, glad to see multiple cars working! Likely culprit is Proguard or something in the release settings - good data to have. Once I get some coffee in me, should be easy pickings to kill.
 
Quick thread necro: I set up a repo for this little app and updated the version in Google Play to strip out the Proguard stuff that was causing trouble. I also fixed an annoying bug that would sometimes stop the real-time monitoring of the car during a charge. The repo is here: https://github.com/ninthmike/chargeguy

Note that the source being available doesn't magically make the app safe in Google Play, as there's no proof that the source in the repo was used to build the one in Play. So if you want to use this, you have two options:

1) Trust me and install the app from Play. Google could easily find malicious code in the APK if someone reported a car stolen and I have made no attempt to conceal my identity or personal data. And my P85D gets very jealous, so stealing someone's car would probably lead to a major relationship issue.

2) Totally understandable not to trust me. In that case, install Android Studio and pull from the repo to build it yourself. It's actually not that hard to do and I'm sure Google will turn up some guides for doing just that with a little research. Or if you know an Android dev you trust, I'm sure it'd be duck soup for them to handle it. Or if you want to meet up at Tavern Americana for a pint and some Tesla talk (Scottsdale, AZ), then I'll do it. :wink: