@supratachophobia , complicated indeed. So you think #3 is over kill? Or at least shouldn't hold up release of the others anyway. What are your thoughts about this sample scenario:
- Scheduled charging is set in the car for 2 AM.
- Desired charge completion time is 6 AM.
- Estimated time to full charge is 3 hours.
- Smart charging start time is calculated to be 3 AM (completion time minus time to full charge).
- BUT, your scheduled charging in the car kicks in 1 hour before the Smart charging calculation, and I don't ever stop the car's charging remember. What now? :\
@agw , I like the use case you've put together there! So incredibly helpful, you have no idea after over a week of smart charging on the mind, that takes a load off.
Per your bug, so you had a default vehicle saved already, you signed in, you saw the vehicle list load with your vehicle, it then auto-selected your vehicle for you, then encountered a server error and kicked you out? Or did you sign in, then immediately got kicked out due to a server error while the vehicle list loaded? If you can give me your repro steps I'll see what I can do. It will only ever kick you out to the sign-in screen if its getting a 401 unauthorized response from Tesla's APIs when not expecting it.
My best educated guess indicates your session token was invalidated by Tesla perhaps due to their OAuth server being restarted. I say this because today around 8pm PST I encountered some strange bugginess with Tesla's APIs where my background services encountered a service error as well, and trying to refresh views in the app caused every state loading operation to fail, and when they didn't fail they loaded hours-old data. Signing out and back in again resolved the issue for me and I haven't been able to reproduce it since.
This does bring to light an issue though, that the background services we schedule (plug in reminder, camper mode, etc) are all currently dependent on your session token being valid for the duration of the scheduled service. Session tokens currently expire after 90 days, and I believe you can have multiple valid tokens so signing out and in again doesn't invalidate your old token.
Sorry your initial experience with the app is so.. undesirable haha. I can't help it if Tesla's services behave unexpectedly though, assuming this IS on Tesla's end (I'd rather it be on my end so I can fix it!). Let me know if you run into any other issues of course, and I'll want your feedback on Smart charging here soon once I implement your ideas.