Kemmey / Kemmey-TeslaWatch-Public

40 stars 21 forks source link

Question - Background Updates #183

Open SilentBlaze opened 4 years ago

SilentBlaze commented 4 years ago

What are the best settings to receive data when the vehicle is awake, but not to wake it when it is asleep. I currently have my settings to the following:

Background updates toggles ON Allow Wake in Background toggled OFF Interval 1hr 30 min

However the app will go days without updating, even when the car is plugged in and awake for 6hrs at a time. It will not update until open the watch app. I just want to make sure I've set it up properly for my desired outcome.
IMG_0167 I did try searching before posting.

Kemmey commented 4 years ago

@SilentBlaze Hey, no worries, always welcome to ask anything - if already answered, I'll just link :-D

Your settings should be exactly as you want them for the scenario you describe. Only issue - if you're not showing the complication on your active watch face the background updates will not trigger, no matter what your settings - as the app will always update when explicitly launched.

For debugging wake issues, please open settings and scroll to the bottom and tap the show debug button and scroll down to the background events section - here you'll be able to see all background events and their outcomes for the past 24 hours. Please have a look at those and compare to your expectations - maybe background events never triggered, maybe the car was asleep unexpectedly, or maybe you were out of internet coverage.

Do report back - there might be a bug in there somewhere that we need to iron out...

Cheers, Kim

TessMKE commented 3 years ago

I use the same settings and have the complication on the active watch face. When I check TeslaFi, I see the car is sleeping only an hour and then being woke up. When I checked the watch debug log I see the following: 8:55 PM: Woke from background 8:55 PM: Is not allowed to wake 8:56 PM: Vehicle is online! 8:56 PM: Got new vehicle data! After 1 hour and 30 minutes the pattern repeats. It appears that the app is still waking the car even though the setting is not to.

all the best, Harry

Kemmey commented 3 years ago

@TessMKE I can assure you, with that log output, the app is not waking your car. It sends one request to the Tesla api, to get new vehicle data. The Tesla api will immediately respond with data from vehicle if it was already awake and online. If not, it would not get new data. I traced the log output in the code - there's no possible way the wake command would ever have been hit.

But the get data endpoint might trigger a wake state change in other services, that might be registered - but the car most certainly was not woken from deep sleep by this background event.

TessMKE commented 3 years ago

Thanks for getting back to me so soon.

From: Kim Hansen [mailto:notifications@github.com] Sent: Tuesday, February 09, 2021 9:54 AM To: Kemmey/Kemmey-TeslaWatch-Public Kemmey-TeslaWatch-Public@noreply.github.com Cc: TessMKE hharsch@wi.rr.com; Mention mention@noreply.github.com Subject: Re: [Kemmey/Kemmey-TeslaWatch-Public] Question - Background Updates (#183)

@TessMKE https://github.com/TessMKE I can assure you, with that log output, the app is not waking your car. It sends one request to the Tesla api, to get new vehicle data. The Tesla api will immediately respond with data from vehicle if it was already awake and online. If not, it would not get new data. I traced the log output in the code - there's no possible way the wake command would ever have been hit.

But the get data endpoint might trigger a wake state change in other services, that might be registered - but the car most certainly was not woken from deep sleep by this background event.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Kemmey/Kemmey-TeslaWatch-Public/issues/183#issuecomment-776042775 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ASZILIIJ62UOGAXNUGRZBJDS6FLADANCNFSM4S2D7FYQ . https://github.com/notifications/beacon/ASZILIOYJDBUBUKPRGSI64DS6FLADA5CNFSM4S2D7FY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFZAXSFY.gif