Specific alarm on Mi Band #371

Open
by outofbody opened 5 years ago · 6 comments
outofbody commented 5 years ago (Migrated from github.com)
Owner

Since there are many complaints on the theory of how smart alarm works on Mi Band I request the following new alarm that is technically not smart (that is, to be operated from Gadgetbridge, not from Mi Band):

  1. Choose interval in which the alarm can work e.g. from 6 am to 7 am
  2. Detect 10 minutes of continous REM-sleep (i.e. non-movement) during the interval
  3. Fire alarm

The reason behind this request is because embedded smart alarm wakes up during "light sleep" (in Mi Band terminology) which is in fact non-REM sleep (weak movement of body) and thus works contrary to the scientific theory (that states that non-REM sleep with movement is of utmost importance for human physiology and shouldn't be disrupted).

Since there are many complaints on the theory of how smart alarm works on Mi Band I request the following new alarm that is *technically not smart* (that is, to be operated from Gadgetbridge, not from Mi Band): 1. Choose interval in which the alarm can work e.g. from 6 am to 7 am 2. Detect 10 minutes of continous REM-sleep (i.e. non-movement) during the interval 3. Fire alarm The reason behind this request is because embedded smart alarm wakes up during "light sleep" (in Mi Band terminology) which is in fact non-REM sleep (weak movement of body) and thus works contrary to the scientific theory (that states that non-REM sleep with movement is of utmost importance for human physiology and shouldn't be disrupted).
Owner

Thank you for your suggestions. Unfortunately it is so far not feasible to do anything about this inside Gadgetbridge, since the smart alarm is implemented in the Mi Band firmware.

There is the very far fetched option to have the mobile next to your bed with Gadgetbridge running, enabling realtime activity data around the time of the alarm, and then triggering a vibration when your desired sleep state is detected.

As said, this is rather far fetched because it assumes you have your mobile in reach and we actually get the proper sleep values in realtime (I didn't try that).

So unless someone steps up and implements that, I'm afraid this won't get done anytime soon, because, it really is a feature of the Mi Band firmware.

Thank you for your suggestions. Unfortunately it is so far not feasible to do anything about this inside Gadgetbridge, since the smart alarm is implemented in the Mi Band firmware. There is the very far fetched option to have the mobile next to your bed with Gadgetbridge running, enabling realtime activity data around the time of the alarm, and then triggering a vibration when your desired sleep state is detected. As said, this is rather far fetched because it assumes you have your mobile in reach and we actually get the proper sleep values in realtime (I didn't try that). So unless someone steps up and implements that, I'm afraid this won't get done anytime soon, because, it really is a feature of the Mi Band firmware.
outofbody commented 5 years ago (Migrated from github.com)
Poster
Owner

removed "smart alarm" term from proposal since it was confusing (proposed alarm has technically nothing to do with embedded smart alarm).

removed "smart alarm" term from proposal since it was confusing (proposed alarm has technically nothing to do with embedded smart alarm).
Owner

As you seem to have quite some insights on sleep theory and the like, could you point us to some algorithms or research paper we could use to identify sleep phases and user activities using accelerometer data? We have a page in our wiki devoted to that, and we need the help of experts in the field! Thanks!

As you seem to have quite some insights on sleep theory and the like, could you point us to some algorithms or research paper we could use to identify sleep phases and user activities using accelerometer data? We have a page in our wiki devoted to that, and we need the help of experts in the field! Thanks!
outofbody commented 5 years ago (Migrated from github.com)
Poster
Owner

The theory is quite simple.
REM sleep is characterized by paralysis, muscle atonia. So what Mi Band calls "deep cleep" is in fact roughly "REM sleep" because rapid eye movements phase more or less corresponds to "muscle atonia" phase.

Thus accelerometer is fine to detect REM sleep. I'm not sure what are the algorithms Mi Band uses to detect paralysis but if it does so just fine it'd be nice to detect ~10 minutes of constant paralysis by monitoring movements of body (just as @cpfeiffer described)

As you can see from articles below REM sleep is similar to the state of being awaken hence this "Mi Band's deep sleep" is what can be disrupted by alarm to save your time whereas "Mi Band's light sleep" (with movements of body) mustn't be disrupted.

https://en.wikipedia.org/wiki/Sleep_paralysis
https://en.wikipedia.org/wiki/Rapid_eye_movement_sleep

The theory is quite simple. REM sleep is characterized by paralysis, muscle atonia. So what Mi Band calls "deep cleep" is in fact roughly "REM sleep" because rapid eye movements phase more or less corresponds to "muscle atonia" phase. Thus accelerometer is fine to detect REM sleep. I'm not sure what are the algorithms Mi Band uses to detect paralysis but if it does so just fine it'd be nice to detect ~10 minutes of constant paralysis by monitoring movements of body (just as @cpfeiffer described) As you can see from articles below REM sleep is similar to the state of being awaken hence this "Mi Band's deep sleep" is what can be disrupted by alarm to save your time whereas "Mi Band's light sleep" (with movements of body) mustn't be disrupted. https://en.wikipedia.org/wiki/Sleep_paralysis https://en.wikipedia.org/wiki/Rapid_eye_movement_sleep
Owner

Thanks for the info. If anybody has some time to dig into this, I can handhold to implement a wakeup alarm as described in https://github.com/Freeyourgadget/Gadgetbridge/issues/371#issuecomment-237386152

Thanks for the info. If anybody has some time to dig into this, I can handhold to implement a wakeup alarm as described in https://github.com/Freeyourgadget/Gadgetbridge/issues/371#issuecomment-237386152
outofbody commented 3 years ago (Migrated from github.com)
Poster
Owner

rephrased the description so that it's more clear that the proposed solution shouldn't deal with smart alaram.

rephrased the description so that it's more clear that the proposed solution shouldn't deal with smart alaram.
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.