Sleep Detection for Smarter Surroundings
WINNER: Best Use of SmartThings
WINNER: Best Pebble Hack
WINNER: 3rd Prize
Drowsiness, whether it lasts for a single post-hackathon Monday or a lifetime of going to bed a little bit too late, can be a huge annoyance. Before now, if you were tired enough to fall asleep accidentally with the TV on, while in class, or on the road, there wasn't anything you could do about it. Now, however, with the help of wearable technologies and the Internet of Things, Wake will detect when you unintentionally fall asleep and enable your environment to respond intelligently -- pausing your TV show, gently nudging you to return wake up in class without alerting those around you, or sounding emergency alarms if you doze off behind the wheel.
Sometimes falling asleep isn't the problem, but rather the housekeeping tasks that go undone when you nod off early. Did you turn all the lights off? Did you lock the door? Depending on electricity costs and neighborhood safety, failing to do these things can be problematic. Therefore when Wake detects that you have fallen asleep while relaxing at home, it sends a message to the SmartThings home hub, which wirelessly turns off all lights attached to its SmartThings SmartPower outlets and locks the network-connected door lock. Falling asleep while the television is playing is also a common problem. According to Sleep Review: The Journal for Sleep Specialists, 61% of Americans fall asleep with the TV on . This wastes electricity, leads to poor sleep quality , and means that the viewer misses the rest of the show after he or she falls asleep. With Wake and DirecTV, however, the television pauses and eventually goes into standby mode as soon as you fall asleep, saving electricity, giving you a more restful night's sleep, and making sure you can resume your TV programs right where you left off.
Some of our daytime activities can be less than exciting. One study found that 28% of high school students fall asleep in class at least once per week , and many adults find it difficult to stay awake during work meetings. Unlike situations like doing homework, however, audio alarms cannot be used in these situations, since they would disrupt people around you and reveal the potentially embarrassing fact that you were sleeping. Therefore instead of a typical alarm Wake has integrated a vibrating wrist alarm with the Pebble smart watch, so that you can be woken up without letting everyone around you know that you fell asleep. Wake uses integration with Google Calendar to determine whether you are in an event and should be woken up with this subtle method.
Driving while drowsy is dangerous, conservatively accounting for 100,000 car crashes per year in the United States, but more than 60% of drivers continue to do it.  Wake detects nodding off at the wheel, and counters with an audio and tactile alarm system for maximum impact. We use a headband-mounted Pebble smart watch to detect head nodding for close-to-real-time sleep detection, then use Twilio to call your phone and Pebble watch to vibrate in order to wake you up.
In an enterprise-grade version of our solution, sleep detection would likely use a combination of an eye tracking device and a pulse oximeter, both expensive pieces of hardware with few customization opportunities at this time. Instead of buying (and expecting our users to buy and carry around) these new devices, we combined a Pebble watch with a FitBit fitness tracker, both wearable technologies that are already integrated into our lives. When the user wants to be alerted of sleep as quickly as possible, e.g. as soon as their head nods while driving, we ask the user to clip the Pebble to a headband or directly to their hair so we can detect the position of their head with the Pebble's accelerometer. When the user wants a less intrusive, higher latency solution we subscribe to FitBit's data to find out when they fall asleep. Depending on the model, the FitBit detects sleep through motion sensing or a combination of motion sensing and heart rate monitoring.