-
Notifications
You must be signed in to change notification settings - Fork 38
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
[feature request] sleep cycle based alarm #351
Comments
Feature requests are fine, don't worry. :-) Would this be about something like: my preferred sleep length is 8 hours, I'm awake for 16 hours, alarm to signal it's time to go to bed? |
This feature would be like, I would like to wake up at around 6 am, no later than 7 am, no earlier than 5:45 am. Please detect my sleep cycle and wake me up (alarm clock actually) while I am in the shallowest sleep cycle, better to be around 6 am instead of the middle time point of 5:45 and 7 (which is 6:23 am). If I keep sleeping until 7 am, wake me up no matter what. |
This would definitely require some historical statics on sleep cycle to define what level of sensor response is "shallowest sleep cycle". Then I can imagine using a very basic hypothesis testing based on the mean and variance to predict/detect/verify sleep cycle and trigger the alarm clock based on the set time frame. If the "around 6 am" requirement is too hard to configure, this feature request can also be relaxed to, "I would like to wake up between 5:45 and 7am. Please wake me up gentally while I am not in deep sleep." |
Ah, I see. Fine. I have no plans to implement something like this myself, but let's keep it open, I'm not against a PR that does this. I'm more interested in the "timer that counts average" piece. :-) |
Pretty much you need some way to track the user's movements, either through a wearable device, or another sleep tracking device of some kind. While a number of devices exist on the market for this very purpose, some of which are easier to interface with and others definitely less, the phone itself can be turned into a sleep tracking device using some cleverness:
Implementing an actigraph and interfacing with the devices is not exactly a walk in the park and definitely not a small amount of work. |
Maybe this is a better idea, just to keep it simple. If you integrate this with a built-in alarm with a slow volume increase + vibration, snooze button customization/limiter, and maybe that increasing screen brightness trick, it might be almost as good. |
There is also the approach of SleepCycle, which essentially just listens for movement noise, which they replaced the accelerometer method with. The question is if this feature goes too far for this app when the goal (at least according to the website) is to not drain battery.. |
It does go too far if this happens by default. If somebody wants to add this in a way that you need to explicitly opt in, that may be OK. |
Would you consider adding a sleep cycle based alarm clock?
Not sure if this repo accepts feature request or this feature is out of scope of the app. If this is the case, please close the issue.
The text was updated successfully, but these errors were encountered: