What is it?

It's a sleep state aware alarm clock for iPhone and iPod Touch that lets you set alarms by real world conditions instead of just times.

What does "sleep state aware" mean?

IfAlarm detects your sleep states (awake, light sleep, deep sleep, and REM sleep). It uses this information to wake you at the best time, avoiding groggy and lethargic sleep inertia.

How does it work?

While lying on your bed IfAlarm records movement. During different stages of sleep we have different patterns of movement. This technique is called actigraphy and is used in sleep studies to aid the diagnosis of sleep disorders.

Actigraphy based sleep detection have been shown to be effective at distinguishing between awake and asleep states. [Further Validation of Actigraphy for Sleep Studies] For differentiating between light, deep, and REM sleep, IfAlarm uses a proprietary algorithm based on movement patterns combined with heuristic analysis. Accuracy of light, deep, and REM detection will vary between individuals and sleep environments.

For the first few nights, IfAlarm adjusts to your sleep environment, learning your patterns, and responding to your feedback through your self reported Sleep Quality. Within a week IfAlarm should be producing stable, consistent results.

Will it work with two people in the bed?

Short answer: Yes, it should work fine.

Long answer: Over a period of days IfAlarm calibrates to the movement patterns produced by your bed and the people in it, establishing which movement to ignore and which it should pay attention to. As long as the phone is on your side of the bed it should accurately detect the difference between your own movements and your partner's movements.

Cats are light enough that their movements will almost never interfere with the recording. Dogs and children may pose a problem, although if their movements on the bed are so frequent that they interfere with the recording then it's likely they're also interfering with your sleep!

Will my alarms work if IfAlarm isn't running?

Sort of. Apple do not allow this sort of app to run in the background, so for IfAlarm to monitor sleep and check alarm conditions it needs to be in the foreground and your phone unlocked. But if it is either accidentally or intentionally closed while in Sleep Mode it will set iOS notifications to go off at estimated times for each alarm. Because it can't monitor the alarm conditions it must be assumed that all conditions would be true, so an alarm such as "If it's raining wake me at 7 AM" will go off at 7 AM even if it isn't raining.

Can I run the phone on battery overnight?

You can, but it's not advised. A normal sleep may use anywhere from 30% to 80% of the battery charge, so if the battery is already low there is a risk it will run out and your alarms won't go off. iPhone batteries are rated for 400 full charge cycles, so there is also a risk the battery will prematurely age. Because of this it's recommended to keep the phone plugged into a charger overnight.

My alarm didn't go off. What went wrong?

  1. Make sure that IfAlarm is in Sleep Mode before you go to sleep. Sleep mode begins once you press the Start button.
  2. Make sure that IfAlarm is in the foreground and your phone is unlocked while you sleep. Apple do not yet allow this kind of app to run in the background.
  3. Keep your phone plugged in to a charger overnight or ensure that you have at least 80% initial charge to avoid the battery running out.
  4. Make sure that your set alarms are possible, or consider setting a secondary "otherwise alarm".

An alarm for "If it's been snowing wake me at sunrise" will not go off if it never snows. To ensure that IfAlarm still wakes you include a second alarm without any required conditions, for example "Wake me around midday." This combination completes to "If it's been snowing wake me at sunrise. Otherwise wake me around midday."

An alarm for "If I slept at least 7 hours wake me at 7 AM" will not go off if at 7 AM you have not yet slept for 7 hours. "Slept at least" alarms work best when used with a "shortly after" alarm time: "If I slept at least 7 hours wake me shortly after."