Kemmey / Kemmey-TeslaWatch-Public

40 stars 21 forks source link

Sleeping indicator missing for "large" state complication #376

Open ThelloD opened 3 years ago

ThelloD commented 3 years ago

I created an "infograph modular" watch face and selected state/status for the large complication in the middle of the watch face. Although it looks pretty neat already, I'm missing the "sleeping" indicator that is visible in most other state complications.

Since I would like to use the lower right complication for something else (don't need to see the SOC twice) but still want to know whether the car is currently sleeping or awake, it would be great if the sleeping indicator would be added to the large complication as well.

image

Kemmey commented 3 years ago

@ThelloD

So sorry for the super late response!

Yeah - of course I'll fix it and add the sleeping indicator!

Do be aware though, that it's not a very reliable indicator, in that it only shows if the vehicle was asleep last time the app tried to grab data - vehicle could have been woken many times since, and not currently be asleep.

For reliable sleep tracking you should look into Teslascope or similar.

Cheers,

Kim

ThelloD commented 3 years ago

Yeah - of course I'll fix it and add the sleeping indicator!

That's great to hear, thank you! :)

Do be aware though, that it's not a very reliable indicator, in that it only shows if the vehicle was asleep last time the app tried to grab data - vehicle could have been woken many times since, and not currently be asleep.

For reliable sleep tracking you should look into Teslascope or similar.

Thanks for the heads up!

I've also noticed that the data shown in the complications and even more the widget often lags behind, likewise because I disallow background activities to wake the car (interval is set to 1 hour). It seems that complications are only updated if they are shown in the current watch face, i.e. if I'm using a watch face without any Watch for Tesla complications and only switch back to a watch face that has such complications after the car fell asleep, the SoC indicator etc. will be incorrect. (For example, the complication currently shows "charging, at 54%", although charging completed at 70% approx. 28 hours ago).

So I assume there is no way to pull data from Tesla's API such as current or last known state and SoC without waking the car, right?

(btw, I'm already using Teslamate for this purpose. Also really great, but can't be used on the Apple Watch)

Kemmey commented 3 years ago

Hey @ThelloD

Correct - car has to be awake to get data - the Tesla api basically bridges between your device and vehicle - so all data is stored on the vehicle and not at Tesla. So if vehicle is asleep, pretty much no data is available.

Teslamate has the luxury of infinite background processing, so it can just continuously monitor the streaming api and wait for the car to wake up naturally and then grab data. Watch app runs solely on your devices, and communicate directly with Tesla - no 3rd party servers in between - so all processing and backgrounding has to happen on your battery power. And Apple has very strict control over such processing - with good reason.

As for the complications not updating - they really should always reflect what data the watch app has. So if you open the app and you see different data than what is shown in complications, that's a bug.

I've been fighting a lot with watchOS 7.6 and 7.6.1 which has introduced a lot of issues with updating complications. Not just mine, but also apples own. So I hope they'll fix this quickly, as I'm seeing a lot of people having issues currently due to watchOS 7.6.

As for the widgets it's a different story - they are updated on an iOS controlled schedule individually - and that is co trolled by how often you look at them and interact with them. So they will show seemingly random data at times :-(

ThelloD commented 3 years ago

Thanks for the detailed explanation how the API works and when what data is available! Maybe that kind of information could be added to the FAQ as well, might be handy for everyone who is interested about the technical details.

However, speaking about the API, isn't it possible to obtain at least some data about the car, like whether it's currently sleeping, charging or online etc. without waking it? Would be nice to have at least this kind of data always available.

Otherwise, personally I would rather prefer that the data disappears (or is greyed out) after a while than displaying that it's online and charging at 65% SOC for days.

As for the complications not updating - they really should always reflect what data the watch app has. So if you open the app and you see different data than what is shown in complications, that's a bug.

When I open the app, and it pulls new data by waking the car, the complications updates, so this is fine. However, I really want to wake the car as rarely as possible, that's why I only open the app when I need to, resulting in outdated data shown on the complications once the car sleeps.

However, what's a little bit strange is that I haven't seen the sleeping indicator for quite a while. 🤔 And pulling the latest data by opening the app doesn't make much sense in this case since this would wake the call, so maybe there's indeed a bug?

Kemmey commented 3 years ago

Hey @ThelloD

The only data that is available without waking the car, is wether or not it is online.

You can consider the vehicle to be your webserver - basically, whenever the vehicle is sleeping, there's no webserver responding to requests - so no data is being served.

The data age indicator in the main app top left corner is integral to understanding the UI. If this is not counted in seconds, you're looking at outdated data in the UI. If data is older than 15 minutes, the entire app will be grayed out.

I've recently added this indicator to some of the complications as well - in 1.1.8 it is only for the graphic corner complication - please give that a try. In the 1.1.9 betas I've added this indicator to even more complications. It serves the same function - to be able to gauge if what you're seeing correlates with what you'd expect.

As for the widgets - these already show this, as a very thin line at the bottom.

If you're not letting the app background update, you'll almost never see the sleeping indicator - as the sleeping indicator is a point-in-time observation. If you've opened the app up and it woke the car - the car was not asleep at the point-in-time of the complication update. So in fact, to show the sleeping indicator, you should allow background updates to happen - but disallow wake during these updates - then you'll see the sleeping indicator, if the app was unable to wake the car.

In general, unless you park your car unplugged and sentry mode disabled, you should always allow wake when you yourself is awake - and just disallow wake when you yourself is asleep. The app updating once an hour will drain about 1% if a M3 LR a day along with the rest of the active systems - so barely noticeable. But I get it, if you're only using public charging and not using sentry mode - then you'll want to conserve as much battery as possible.

Cheers,

Kim