My intelligent alarm clock lifehack
We’ve been talking a lot at Fotango recently about how to make products which people not only find useful but actually love/are delighted with. Well I was sitting waiting one morning at the train station thinking about what problems I had in my life that I’d like solved for me, and the obvious one was I didn’t like sitting on a cold platform waiting for a train, so I decided to solve it with a new type of Alarm Clock.
My alarm clock would consult live departure board (LDB) for my station and wake me up at the best time. Let me explain, imagine I want to wake up around about time T, lets say T is 8.00am. And I know it takes me D minutes to get ready, say 30 minutes. Well then my alarm clock would go and consult the LDB's and work out what time the next train will depart on or after T+D, 8.30am. Lets say this is an 8.40am train, so really I don’t need to wake up till this new train time - D, in other words 8.10am - my alarm clock has just given me an extra 10 minutes in bed and i didn't have to check any timetables - result!
Now the fun doesn’t stop there, if I hit the snooze there is no point snoozing for just 5 or 10 minutes if the next train is not for 30 minutes. I might as well have the whole 30 minutes in bed and so that’s what my alarm clock does. Add in the fact that some trains are cancelled and some trains can be late and I get even more time asleep as opposed to waiting at the platform. I'm actually hoping for leaves on the line this autumn
Ok theory over, so I was sitting figuring out how to build such a beast as I didn’t want to buy something like a silent microatx based linux box just for this and equally I didn’t want one of my existing noisy boxes beside the bed. So I tried to think of other ways to do it, and the problem I always came back to was - how I could display the time at my bedside. When I explained this to my friend Kake on friday night she suggested the most obvious (but not to me) of solutions - why don’t I just use a normal clock and not build that as part of your alarm clock (small tools doing one job well). With this stumbling block removed there was no stopping me, I built a plunger from lego (also borrowed from Kake) that would act as a snooze button and the next day went out shopping for really long USB leads. On sunday I started the build. The plan was to build the following,
- Some code (Perl) to encapsulate JustePort and handle starting and stopping it. Then I could use the airport express already in the bedroom to wake me.
- Dismantle a mouse for its microswitch and add it to the lego plunger to make a snooze button.
- Some code to talk to the mouse device directly (via /dev/input/mouse*/).
- Some screen scraping code to get the information from the LDB’s.
- A state machine that tied it all together and implemented the logic.
Well it was a hectic day, but full of fun. At present the code is a little buggy and I need to refactor it by adding a TimePair object (the pair of times for wakeup time and the train time), so that the statemachine gac is simpler, once that’s done I’ll release the code. In the meantime you can see some pictures of the plunger here.
After that, I’m going to add some more features, the ones currently on the wishlist are as follows,
- check my ical to see if I have a morning meeting and hence disable the snooze feature
- mail work if I’m running late
- themed music - for mondays perhaps The Boom Town Rat’s “I Don’t Like Mondays” and maybe it could also check the weather reports and play a song like the Beatles’ “Here comes the sun” if its going to be nice weather.
I’d welcome any other suggestions.

That's brilliant, Greg. You could also, as you said, get it to read things out to you - the weather; the day's news; the times of your favourite TV/radio programmes that day; anniversaries (or warnings that one is approaching in a few days...!).
Maybe it could tell you how many emails you have received, and who they are from, and/or their subjects. Or even read the text of the emails themselves so that you know what's going on even without opening your eyes!
Posted by: Peter Nye | 2005.10.10 at 02:45 PM
Nifty, can't wait to see how it works out in practice.
Whilst I can definately see the benefit of maximising ones sleep it would be more useful to me to be woken in time to catch an alternative train to get to my chosen station on time since I have to be in the office providing cover from 8am every morning.
I suppose armed with information of destination station and required arrival time this would be as easy to calculate so long as the LDB website advertised delays with sufficient notice.
Posted by: Adam Auden | 2005.10.10 at 02:49 PM
Let me know when you figure out how to hack supplying motivation to go to work in a convenient drip feed form. And also the first perl powered coffee pot. :)
Posted by: hfb | 2005.10.10 at 06:36 PM
You may be dismayed to find that your extra 10-30 minutes in bed does not translate to restfulness, but is merely a result of lazyness and (i dare say) lack of integrity. Not to be high and mighty, I hate waking up too.
Timing your wake-up based on when you need to wake up is the wrong approach.
http://glenrhodes.com/index.php?option=com_content&task=view&id=54&Itemid=9
And there's already an alarm clock invention for this: www.sleeptracker.com
Nice design though. You should abandon the concept and run with the Lego idea. "DIY Lego Projects for Everyday Life". =)
Posted by: Morgan Sutherland | 2005.11.27 at 05:27 PM
Having seen this particular item presented by Greg himself at DorkBotLondon, I am intrigued by it. I wander if it could be harnessed with the Glen Rhodes concept of 90 minutes, so instead of syncing to the trains, it tried to sync to your bodies cycles.
Using a method to sense when you naturally moved more (during light sleep between cycles), and using running (that is over many months) stats to build up a good analysis of your cycles it could then try to gently wake you up - not with a huge alarm, but gentle music and light, bringing you quietly up to conciousness at the right crucial moments.
However - for those more conventional, and just wanting to wake up according to the train boards, you could get the snooze button to take the functionality of the clock described in Make 03, and drive into a corner of the room, making you get up. Integrate it with a very small linux box or microcontroller, in one package with a wifi port talking to a desktop computer doing the screenscraping etc.
Posted by: orionrobots | 2005.11.28 at 08:12 PM
Good stuff :)
Posted by: Ivan Minic | 2006.02.13 at 12:54 AM
So did you ever complete it then?
Posted by: anon | 2006.09.07 at 02:42 PM
hi
my name is chiru my url is in free servers.com how to keep cloock mouse in my url
Posted by: chiranjeevi | 2007.06.21 at 09:20 PM
Your theme deserves consideration.
Extrefox
Posted by: othemsthesk | 2008.01.05 at 06:04 PM
I wanted to take time to thank you for this interesting site. I found it to be helpful and full of great information. I look forward to more being posted in the future.
Posted by: florida rentals | 2008.03.23 at 07:27 PM