-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Impossible to consult weather data after device went offline #57
Comments
The "refresh date" is expected to be the timestamp of the last refresh
whether it was successful, or not. So, if I understand correctly, what you
observe is the expected behavior.
(Note that each refresh starts by a cleanup of the model that will leads
to a "blank screen" in case of failure; But when it fails the refresh date
is updated.)
Looks coherent to me. Not very useful, I admit; at least, gives an
indication that nothing nasty has happened. Also it keeps the code simple!
Matthias
Le mar. 10 oct. 2023, 07:36, Swanny ***@***.***> a écrit :
… The current date/time is still written as if the update succeeded, but
obviously no weather data is shown.
Do you think it's worth storing the last successful data payload received
to show (rather than a blank screen) in this scenario?
—
Reply to this email directly, view it on GitHub
<#57>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAPYMIVD2IT2SV2T5RZ7NLLX6TNGNAVCNFSM6AAAAAA5ZYG746VHI2DSMVQWIX3LMV43ASLTON2WKOZRHEZTINBRGM2TQOA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Ah, I see. So showing the last successful weather payload with the associated date/time would be to much of a deviation from the current code, overcomplicated etc. |
Good point. But it should be already possible with current implementation (apart from automatic refresh that happens once per hour). @neilswann80 Are you "quitting" the application using menu or just putting it in the background using the home key? In other words do you want the application to dump all the weather data, in order to find them after a restart? Plan:
|
It's fine if I leave Taranis in the background, but if I exit the app, or if the device (is set to) powers off automatically the app then needs to be launched again.
I think this could be a useful feature when travelling/commuting and temporarily away from the internet. If the date/time correlates to this "last successful" update it shouldn't cause confusion. |
I understand. There's no difficulties to implement dump/restore of all model data now that we already have the infrastructure to do it for the location history. But, at startup, when the application is initialized, there's an unconditional refresh that is triggered; See: https://github.com/orontee/taranis/blob/main/src/app.cc#L86 With the use case you mention, one want to skip this. On what basis? Configuration? What do you think of a new three state configuration setting, say When equal to
|
Tricky. I do like the autorefresh option. Would it be feasible to launch the app with autorefresh disabled and only enable it after testing for internet? |
At current time, each request to refresh weather data or set new location tries to ensure that the device is connected to Internet. See https://github.com/orontee/taranis/blob/main/src/http.cc#L26 In order to cover the "disconnected" use case, we could:
In your use case, Editing the location, will still try to connect the device: It's then up to the user to accept or not. @neilswann80 What do you think? |
Sounds great to me. |
Experimenting the |
...But I just realized that managing a configuration parameter for this is not necessary. Devices have a "flight mode": With last commit on this branch, the application dump/restore the weather data at exit/startup and won't try to refresh weather data when device has flight mode enabled. I am convinced it's the right "user interface". Summary:
|
Available in pre-release : https://github.com/orontee/taranis/releases/tag/v1.3.0-rc0 |
Tested and loving it! 👍 Noticed a slight issue though: When flightmode is enabled, the "last updated" date/time is correct for the dump. ✔️ BUT if flightmode is disabled, WIFI disabled and you click "cancel" to the WIFI activation message the date/time eventually updates to current rather than remaining as the correct one for the dump. ❌ |
Thanks for your feedback Swanny!
Good catch! Should be fixed in https://github.com/orontee/taranis/releases/tag/v1.3.0-rc1 |
The current date/time is still written as if the update succeeded, but obviously no weather data is shown.
Do you think it's worth storing the last successful data payload received to show (rather than a blank screen) in this scenario?
Would be useful to be able to look at the 8-day forecast again when away from the internet.
The text was updated successfully, but these errors were encountered: