lephisto / tesla-apiscraper

API Scraper for pulling Vehicle Statistics from the Tesla Owner API into an InfluxDB + Grafana Dashboards
GNU Lesser General Public License v3.0
365 stars 104 forks source link

Android app rarely enables scraping #66

Open galmok opened 5 years ago

galmok commented 5 years ago

My experience with the Android app is that while I usually get it to disable scraping automatically, it rarely manages to enable automatically. Is there something I can do to make the Android app more reliable. Often I find I have collected no data of my trip and that is becoming an irritation for me.

I am using the app on my Samsung $9, and while it has lots of battery saving features, I believe I have disabled all of them for this app. I have another app that reliably detects its Bluetooth device coming online, and I didn't have to configure anything for that app (it is Saphe). So I know it is possible to do. :-) I just don't know how...

galmok commented 5 years ago

Looking closer, I notice that Saphe uses a service. That service is probably necessary to reliably detect changes in Bluetooth. The Tesla API Scraper app is unfortunately unreliable.

lephisto commented 5 years ago

Often the problem is caused by the fact that when en/disable wifi disconnect happens as well, and the Android Retrypolicy is not working so great. But I'm far from being an Android expert, feel free to contribute here: https://github.com/lephisto/tesla-apiscraper-app

What always works is setting it manually and getting confirmation of scraper is on or off.

Vipercat commented 5 years ago

Apologies for the dumb question, but do I need to open certain ports on the server where I'm running the Apiscraper for the app to connect to it? In the App I've now put in the URL based on http:// and of course the API key that I've also put in the config file on the server.

galmok commented 5 years ago

Yes. The configured port must be opened in your router and be forwarded to the machine the had the apiscraper running.

lør. 31. aug. 2019 17.43 skrev Vipercat notifications@github.com:

Apologies for the dumb question, but do I need to open certain ports on the server where I'm running the Apiscraper for the app to connect to it? In the App I've now put in the URL based on http:// and of course the API key that I've also put in the config file on the server.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lephisto/tesla-apiscraper/issues/66?email_source=notifications&email_token=ACZKVRC3OJ4CD7EFRHOCRBDQHKGRNA5CNFSM4IK3TUN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5TPGHI#issuecomment-526840605, or mute the thread https://github.com/notifications/unsubscribe-auth/ACZKVRGXD7CRC3G7CNGBD63QHKGRNANCNFSM4IK3TUNQ .

Vipercat commented 5 years ago

And what port is that?

galmok commented 5 years ago

According to the config file:

a_api_port = 8023

Vipercat commented 5 years ago

Yep, it works. Thanks!