Automatic fall asleep detection

POST UPDATED on 2018/11/26 with a new feature: Sleep time estimate.

There is a large and growing interest from you, users of Sleep as Android, in automatic fall asleep detection.

Sleep as Android can estimate your sleep time. But there is no reliable way yet to do fall asleep detection on smartphones.

What? Others have fall asleep detection, you pesky liars!

The truth is, others do not have it. They claim it in their marketing materials, and they also trigger their sleep tracking at certain times. But more often than not, you are not really sleeping at those times.

Heck, you are often not even using the device.

Why is that?

To detect falling asleep reliably is a really tough task. There’s a reason why Apple currently makes big waves with their new detection mechanisms like trying to estimate your daily routine and detect your before-bed rituals like toothbrushing.

Because it is next to impossible to detect a sleeping person using just an accelerometer and/or heart beat sensor.

What are the issues?

A large problem is distinguishing between a sleeping person and a person lying in the bed calmly, but awake. For example, someone reading or doing something on a smartphone.

The other issue is battery drain. To detect when you fall asleep, we’d need to monitor your movements for the whole day. Reading accelerometric data on an app level would kill your phone’s battery in just a few hours.

So what does Sleep as Android do?

At this moment we are using the Google Activity recognition API which gives us data about phone states and estimates your current activity. We run the data through our own algorithms to increase reliabililty and reduce false positives. Then we ask you to confirm the sleep duration estimate, and if all checks pass, you get a new sleep record without manually tracking!

We are still actively researching cutting edge methods that we could use or combine to reliably detect falling asleep.

31 thoughts on “Automatic fall asleep detection

  1. Sorry but my Sony (now kind of a really old model) Smartband Talk gets when I fall asleep, does not confuse being in bed quietly watching TV (some very rare days has happened maybe some positioning) does recognize awake on point. No idea about Apple but if it gets better than what this band does recognizing sleep, (does shows sleep phases not sure about that I don’t understand it myself to judge..), then I’m excited for it even if I don’t like Apple products at all. Sony stopped developing these bands and lots of other stuff, now you guys say a definite NO. A really bummer, specially having a good gear but not compatible with Sleep as android at all 😢

  2. I thing Samsung health has a good estimate, though they can’t record sleep cycle (rest, rem, awake, etc) I find that when I forget to start my sleep app Samsugn Health captures the time I fell asleep and woke up based in none use of phone. I don’t know how it doesn’t capture other none use times (like during work since I’m not allowed to have my phone at work so it sits in the car for 8+ hrs without being in use). When i forget to use the app im kust loominh to make sure im maintaining a fairly routine fall asleep and wake up sked.

    1. I agree. My Gear Fit2 is actually pretty accurate in determining when I fall asleep and wake up. So Sleep for Android can’t do this but a Gear Fit2 can. Hmm..

      1. That’s because you wear your watch for the whole day, so it gathers data about your movement very closely. You cannot do this with your phone. For most people, their phone doesn’t move everywhere they do. For example in the evening at home, often the phone would just lie somewhere, maybe on your bedside table, but you might go brush your teeth, shower etc. This is a big difference when trying to detect sleep onset.

  3. A good start to automate recordings is calculate average of first fall asleep start times and use that average time as start point of recording. SAA should absolutely have automated recording start feature because it is annoying to wake up and notice that you havent started sleep recording last evening…

    1. It’s much more complicated than that if you do not want to annoy the users by starting sleep tracking at unpredictable times – as average can be unpredictable a lot if you have e.g. 2 hour range in which you go to sleep.

    1. You might have routines that fall exactly into the prediction patterns of the Mi Band, but for other people it is not working. Just try to read in the bed for an hour and you’ll most probably get detected as asleep.

      1. Mi Band 2 mechanism is working for me as well. It’s true that it might not work for all people perfectly but it would be nice to have such a possibility for us (people who probably have some regular daily patterns). You would satisfy at least some people (and I believe there is lots of people like me or Aleksandr) while you might develop your own mechanism. Mark the feature as experimental and users will find out if it’s working and thus useful for them or not.

        I am now thinking about quitting using SaA (and MiBand Tools) just because of this. Mi Band 2 tracks my sleep without my interaction. Their app doesn’t have so many options and is not so good as SaA but it doesn’t force me to start the sleep tracking manually.

        I really would love to have this feature in SaA even though it might not work for all people.

          1. Hi – not yet, but we have started work on a new idea we had, which could make that possible. No promises yet though…

          2. This is a question for the Mi Band hackers – developers of Miband tools / Notify & Fitness. We just hook to their services.

  4. Autostart at average/most common fall asleep time really seems like a good idea to me.
    Because if you are awake you can always shut it down if it where to start when you are awake and also it would not be difficult to erase that “unwanted” recording.

  5. I have a Pebble Smartwatch and I have to say the sleep detection is very accurate most of the time. Seeing as this already integrates with Sleep as Android I wondered if there would be any way to start sleep tracking when my watch does? 🙂

  6. Samsung Frontier Gear S3 works flawlessly for me! So glad I have Tizen, and it has all the necessities pre-loaded.
    It looks like Android Wear has fallen pretty far behind… too bad for my wife. I expected they’re be first or second in the pack but companies like Urbandroid have work to do if they don’t want to be pushed out by the Apple and Samsung app devs.

  7. I, too, would pay for SaA with automatic sleep detection on a Wear OS device. More often than not I drift off to sleep watching TV or reading. I had an UP band (RIP) that was startlingly accurate. e.g., the readout would show sleep starting at 11:25 and I’d think, “yeah, I saw the sports report on the news but don’t recall anything after that, so that’s exactly when I fell asleep!” I now have a 2nd gen Moto 360 that isn’t working well so hoping to get something new soon. Sleep tracking is a major consideration.

  8. My Fitbit Charge 2 used to be pretty accurate at automatically registering my sleep time… until the software ‘updated’. I now have a Huawei Watch 2 Classic which is accurate to within a couple of minutes, it being particularly adept at knowing when I fall asleep in front of the TV on a Sunday afternoon. So accurate, in fact, that I can use its fall asleep time to rewind a Netflix film to the point at which I fell asleep!

    My preference would be a sleep phase UI in Google Fit being fed by automated sleep detection data from Sleep as Android. That would seem, architecturally and commercially, to be the most sustainable way forward. Sadly, that would rely on Google getting its architectural strategy act together in a way that lasts more than five minutes.

    As an alternative, although direct Huawei to Sleep as Android would be nice, if my sleep data from the Huawei Health app is already being synched on Google Fit, would a Sleep as Android import interface on allow me to synch the Google Fit data to Sleep as Android?

  9. iPhone apps like AutoSleep and Life Cycle do this pretty well. It’s pretty simple mechanism too. The just check when’s the last time the phone is touched/moved at night, and the when’s the first time the phone is touch/moved the next morning.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.