Gadgetbridge: improve sleep time reporting

Created on 25 Oct 2019  Â·  13Comments  Â·  Source: Freeyourgadget/Gadgetbridge

Before requesting a new feature, please confirm the following:

  • [x] I have read the wiki, and I didn't find a solution to my problem / an answer to my question.
  • [x] I have searched the issues, and I didn't find a solution to my problem / an answer to my question.
  • [x] If you upload an image or other content, please make sure you have read and understood the github policies and terms of services

Your issue is:

This is on the My Sleep page and the 24hr window.
If I slept yesterday from say 11 pm to 7 am, and last night from 11 pm to 6 am and check my sleep at 6.15 am it says I slept from
06:15 to 07:00
23.00 to 06.00
5 minutes later it will report
6.20 to 7:00
23.00 to 6:00

As the start date of the first sleep period is on the day before I suggest to report this as:
.... to 7:00
23:00 to 06:00
So a start time before the 24 hr window is shown as ellipsis

Your wearable device is:

mi band 4
Please specify model and firmware version if possible

Your android version is:

71

Your Gadgetbridge version is:

latest from fdroid

New requests about already solved/documented topics could be closed without further comments. Same for too generic or incomplete reports.

All 13 comments

That "works as designed": this tab shows a "moving window" of the last 24 hours. So 24h before 6:15 it was… well, 6:15, right? So that's the earliest reference point. 5min later it's 6:20, so that becomes the earliest reference point.

This is actually fixed in an upcoming release. I added a split at 13:00 hours, so both the charts and sleep sessions only show last night (plus maybe siesta) sleep time. We can close this.
:blush:

Uh? Not arguing but wondering: will night-shift workers now complain, because they start their sleep sessions around 10am? A rolling 24h window is easy to grasp. A break at a "random point" is not. Why 1pm – and not e.g. 12am or 2pm? Or configurable? Or keep the "rolling window"? Or break at midnight to fix it to the date? :confused:

Uh? Not arguing but wondering: will night-shift workers now complain, because they start their sleep sessions around 10am?

I started with an issue and waited if anyone comments...: https://github.com/Freeyourgadget/Gadgetbridge/issues/1668 . This could be made configurable for the 11.5% of people who work nights (quick source). I feel this change is better to the remaining 88.5% of people. Plus for me ;)

A rolling 24h window is easy to grasp.

It more often bites you, rather then helps. Often i check for my sleep after i woke up, that is, during the morning, but the chart + sessions are including last night, which gives faulty result. On the weekend, you might sleep longer, which means that next day (Monday) you can only start checking for correct sleep only say by 10, or some people by 12... Also, the "sleep chart" is a smaller version duplication of the "activity chart" and gives no extra value and just takes up space. So by focusing on night sleep, both sleep sessions and sleep charts provide much more value.

A break at a "random point" is not. Why 1pm – and not e.g. 12am or 2pm? Or configurable? Or keep the "rolling window"? Or break at midnight to fix it to the date? confused

I decided the best i though of. Often, 12 is the "get up already" time. And basically, this only decides if that sleep is counted to yesterday or to today, so it doesn't steal your time, it just splits it to where it belongs to. Yes, there could be some configuration, in the future.

I trust this is helpful and not unhelpful...

@IzzySoft added a switch + changed to 12:00

Wrt the original reply of @IzzySoft
I know this is a 24 hr sliding window. The suggestion was to use an indicator (e.g. ... if the start of the sleep is outside the 24hr window, instead of using the 24hr window boundary.

@vanous Thanks, just saw it and added a :heart: :smiley:

As to the issue of @FransM – maybe simply adding a "+" at the end of the time if sleep period is at the "demarkation line"?

Well, as the data is trimmed to 24h, you cannot really tell that there is a continuation in the past/future...

Try the Noon to noon option, it has been working really well for me. I do not sleep during the day though 😃

So IMHO, issue solved in today tagged 0.38.

0.38 is out. @IzzySoft , what do you think, which version do you prefer now, old style or new style? Would love to know.

@FransM is your issue solved now and can this be closed?

@vanous actually, the first thing I did after updating was enabling old style :see_no_evil: No time to play with it currently, too much to do on the repos (F-Droid and mine).

I was ready for anything, no worries :stuck_out_tongue_winking_eye: thanks for all the f-droid work!

Big overhaul, yes (quality improvements: fixing links, adding details and all that). In my repo, I need to trim down which apps are updates checked for as Github now throttles me for some reason (down to less than 20kb/s – which means downloading a single APK takes more than 15min) – so I disable checks for "silent ones" (where development has stopped etc), while doing the same quality checks as on the main repo. Which, altogether, means checking several thousand apps…

0.38 is out. @IzzySoft , what do you think, which version do you prefer now, old style or new style? Would love to know.

@FransM is your issue solved now and can this be closed?

Yes, it was not what I had in mind, but it works for me.
will close

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Jiack214 picture Jiack214  Â·  4Comments

wYhyzByH picture wYhyzByH  Â·  4Comments

cpfeiffer picture cpfeiffer  Â·  4Comments

6arms1leg picture 6arms1leg  Â·  6Comments

bigretromike picture bigretromike  Â·  8Comments