Sleep Data

Greetings All,


HealthKit has SleepAnalysis which I have turned on to read


My Apple Watch is the source of my sleep data into HealthKit


However all it seems to report is a sample with a data range and either Asleep or InBed

So for a night (typical for me) I get 3 - 5 sample pairs (pairs -==> time is identical one says Asleep other says InBed)

perhaps 5 minutes between samples

    Healthkit sleep: 2018-07-02 07:55:00 +0000   2018-07-02 10:50:00 +0000   Asleep          10500.0    02:55:00
    Healthkit sleep: 2018-07-02 07:55:00 +0000   2018-07-02 10:50:00 +0000   InBed           10500.0    02:55:00
    Healthkit sleep: 2018-07-02 06:00:00 +0000   2018-07-02 07:50:00 +0000   Asleep           6600.0    01:50:00
    Healthkit sleep: 2018-07-02 06:00:00 +0000   2018-07-02 07:50:00 +0000   InBed            6600.0    01:50:00
    Healthkit sleep: 2018-07-02 05:45:00 +0000   2018-07-02 05:55:00 +0000   Asleep            600.0    00:10:00
    Healthkit sleep: 2018-07-02 05:45:00 +0000   2018-07-02 05:55:00 +0000   InBed             600.0    00:10:00
    Healthkit sleep: 2018-07-02 04:55:00 +0000   2018-07-02 05:40:00 +0000   Asleep           2700.0    00:45:00
    Healthkit sleep: 2018-07-02 04:55:00 +0000   2018-07-02 05:40:00 +0000   InBed            2700.0    00:45:00
                                                                             TOTAL           20400.0    05:40:00


If you sum up all Asleep samples you get the same number of hours and minutes that the Health App displays (5Hr 40 min)

So that agrees, at least.


BUT, Why or How can we not get back whether the sleep was restless or restful ?

Much like the sleep watch app, Which shows 5h 40m (agrees) and then shows 2h 10m 38% restful sleep


How are we supposed to read sleep data ?


Any ideas here ?


Thanks in advance

Post not yet marked as solved Up vote post of TheBearF8 Down vote post of TheBearF8
2.3k views