#1763 Amazfit Cor 2: No reliable Sleep Analysis

Open
opened 8 months ago by tlsHello · 5 comments

Before reporting a bug, please confirm the following:

I got Gadgetbridge from:

If you got it from Google Play, please note that version is unofficial and not supported here; it’s also often quite outdated. Please switch to one of the above versions if you can.

Your issue is:

First of all, thank you very much for your time and activity to program Gadgetbridge.

I am using my Amazfit Cor 2 since 2 weeks right now.
The textual line of the summary on the top shows reasonal times when I’ve slept.
The first days with the originally shipped FW version 0.3.0.11 I had mostly reasonable times for the light and deep sleeting times.

Then I’ve updated the Amazfit Cor 2 to 0.3.0.44 using the official Mi Fit App (on an old unsued phone). I have deleted and relinked the Amazfit Cor 2 to Gadgetbridge (on my normal phone).

Since then Gadgetbridge shows the analyzed light sleeping time shows only some minutes to less then 2 hours and the deep sleeping time nothing up to less than 10 minutes. And this during night with more than 8 hours sleeping time in the summary.
There are some regular ‘green’ lines up to 0.111111 or no lines (white space) in between. Only very sporadic green and blue lines exceed this level e.g. up to about 0.25.

Could you please verify if you can improve this.
Thanks in advance.

PS: I’d provide needed data directly, if needed.

Your wearable device is:

Amazfit Cor 2, FW 0.3.0.44

Your android version is:

Android 9

Your Gadgetbridge version is:

0.40.0

#### Before reporting a bug, please confirm the following: - [x] I have read the [wiki](https://github.com/Freeyourgadget/Gadgetbridge/wiki), and I didn't find a solution to my problem / an answer to my question. - [x] I have searched the [issues](https://github.com/Freeyourgadget/Gadgetbridge/issues), and I didn't find a solution to my problem / an answer to my question. - [ ] If you upload an image or other content, please make sure you have read and understood the [github policies and terms of services](https://help.github.com/articles/github-terms-of-service/#1-responsibility-for-user-generated-content) ### I got Gadgetbridge from: * [x] F-Droid * [ ] I built it myself from source code (specify tag / commit) If you got it from Google Play, please note [that version](https://github.com/TaaviE/Gadgetbridge) is unofficial and not supported here; it's also often quite outdated. Please switch to one of the above versions if you can. #### Your issue is: First of all, thank you very much for your time and activity to program Gadgetbridge. I am using my Amazfit Cor 2 since 2 weeks right now. The textual line of the summary on the top shows reasonal times when I've slept. The first days with the originally shipped FW version 0.3.0.11 I had mostly reasonable times for the light and deep sleeting times. Then I've updated the Amazfit Cor 2 to 0.3.0.44 using the official Mi Fit App (on an old unsued phone). I have deleted and relinked the Amazfit Cor 2 to Gadgetbridge (on my normal phone). Since then Gadgetbridge shows the analyzed light sleeping time shows only some minutes to less then 2 hours and the deep sleeping time nothing up to less than 10 minutes. And this during night with more than 8 hours sleeping time in the summary. There are some regular 'green' lines up to 0.111111 or no lines (white space) in between. Only very sporadic green and blue lines exceed this level e.g. up to about 0.25. Could you please verify if you can improve this. Thanks in advance. PS: I'd provide needed data directly, if needed. #### Your wearable device is: Amazfit Cor 2, FW 0.3.0.44 #### Your android version is: Android 9 #### Your Gadgetbridge version is: 0.40.0
tlsHello changed title from Amazfit Cor 2: No reasonalble Sleep Analysis to Amazfit Cor 2: No reasonable Sleep Analysis since Update from 0.3.0.11 to 0.3.0.44 8 months ago
ashimokawa commented 8 months ago
Owner

@tlsHello

I would have assumed that even 0.3.0.11 had that problem.

It is present in ALL Huami devices, with the exception of VERY EARLY factory version of the Amazfit Bip and older Mi Band 2 firmwares.

The reason is that the devices do no longer properly distinguish between light and deep sleep but set some “flags” or “hints” for later analysis which is probably done in Mi Fit.

We ignore those information completely because despite of some theories and discussion, it is still unclear how all this works. This information still lands in the database, so if we fix analysis it will retroactively work.

@tlsHello I would have assumed that even 0.3.0.11 had that problem. It is present in ALL Huami devices, with the exception of VERY EARLY factory version of the Amazfit Bip and older Mi Band 2 firmwares. The reason is that the devices do no longer properly distinguish between light and deep sleep but set some "flags" or "hints" for later analysis which is probably done in Mi Fit. We ignore those information completely because despite of some theories and discussion, it is still unclear how all this works. This information still lands in the database, so if we fix analysis it will retroactively work.
tlsHello changed title from Amazfit Cor 2: No reasonable Sleep Analysis since Update from 0.3.0.11 to 0.3.0.44 to Amazfit Cor 2: No reliable Sleep Analysis 8 months ago
tlsHello commented 8 months ago
Poster

@ashimokawa

Thank you, you are right. It just began to work occasionally up to often, when I had sent this post.
I’ve changed the issue name from
'Amazfit Cor 2: No reasonable Sleep Analysis since Update from 0.3.0.11 to 0.3.0.44'
to ‘Amazfit Cor 2: No reliable Sleep Analysis’.

I have the impression that it works if it starts with ‘deep sleep’ than it changes mostly beween deep and light sleep only rarely to ‘green (active)'. If not it changes between ‘green (active)’ and nothing.

If I export the database eg. to calc/excel, can I try to parse the data like you do? Which tokens do you analyze right now?
Can I manually look for the further undocumented ‘flags’ or ‘hints’?

Thank you and cheers

@ashimokawa Thank you, you are right. It just began to work occasionally up to often, when I had sent this post. I've changed the issue name from <br>'Amazfit Cor 2: <s>No reasonable Sleep Analysis since Update from 0.3.0.11 to 0.3.0.44</s>'<br>to 'Amazfit Cor 2: No reliable Sleep Analysis'.<br> I have the impression that it works if it starts with 'deep sleep' than it changes mostly beween deep and light sleep only rarely to 'green (active)'. If not it changes between 'green (active)' and nothing.<br> If I export the database eg. to calc/excel, can I try to parse the data like you do? Which tokens do you analyze right now? Can I manually look for the further undocumented 'flags' or 'hints'?<br> Thank you and cheers
vanous commented 8 months ago
Collaborator
See here please https://codeberg.org/Freeyourgadget/Gadgetbridge/wiki/Data-Export-Import-Merging-Processing
ashimokawa commented 8 months ago
Owner

@tlsHello

Please also have a look at #686

@tlsHello Please also have a look at #686
ashimokawa commented 8 months ago
Owner

Basically we ignore the upper nibble by just masking the last 4 bit (& 0xf) and map the resulting value (0-15)

Basically we ignore the upper nibble by just masking the last 4 bit (& 0xf) and map the resulting value (0-15)
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.