Prefix Your Phone Alarm With A Desk Lamp

AlarmLamp

If you are like [Gbola], then you have a hard time waking up during the winter months. Something about the fact that it’s still dark outside just makes it that much more difficult to get out of bed. [Gbola] decided to build his own solution to this problem, by gradually waking himself up with an electric light. He was able to do this using all off-the-shelf components and a bit of playing around with the Tasker Android application.

[Gbola] started out with a standard desk lamp. He replaced the light bulb with a larger bulb that simulates the color temperature of natural daylight. He then switched the lamp on and plugged it into a WeMo power switch module. A WeMo is a commercial product that attempts to make home automation accessible for consumers. This particular module allows [Gbola] to control the power to his desk lamp using his smart phone.

[Gbola] mentions that the official WeMo Android application is slow and includes no integration with Tasker. He instead decided to use the third-party WeMoWay application, which does include Tasker support. Tasker is a separate Android application that allows you to configure your device to perform a set task or series of tasks based on a context. For example you might turn your phone to silent mode when your GPS signal shows you are at work. WeMoWay allows [Gbola] to interact with his WeMo device based on any parameter he configures.

On top of all of that, [Gbola] also had to install three Tasker plugins. These were AutoAlarm, Taskkill, and WiFi Connect. He then got to work with Tasker. He configured a custom task to identify when the next alarm was configured on the phone. It then sets two custom variables, one for 20 minutes before the alarm (turn on the lamp) and one for 10 minutes after (turn it off).

[Gbola] then built a second task to actually control the lamp. This task first disconnects and reconnects to the WiFi network. [Gbola] found that the WeMoWay application is buggy and this “WiFi reset” helps to make it more reliable. It then kills the WeMoWay app and restarts it. Finally, it executes the command to toggle the state of the lamp. The project page has detailed instructions in case anyone wants to duplicate this. It seems like a relatively painless way to build your own solution for less than the cost of a specialized alarm clock lamp.

11 thoughts on “Prefix Your Phone Alarm With A Desk Lamp

    1. As opposed to using an IDE, using a soldering iron, or using a screwdriver?

      Mate, I accept that this is not your usual hardware hack, going from junk or components to something usable. This is a different kettle of fish, and while its entirely accessible and understandable to the common consumer, it is still a great idea with a great execution.

      Yes, he could have built the whole thing with some TTL logic and a relay, but he chose the path he knew, the end result is the same, and he should be celebrated for what is actually a great hack, rather than ridiculed for using something different, albeit more accessible.

      Im sick of oldschool elitists who keep executing /SMARTYDERP/elitepost.sh

  1. I achieved the same result with a raspberry pi and a SSR. Tasker will wait for my phone alarm and then curl a cgi script on my pi to turn the light on. The same is done when I enter the radius of my house. Never coming home to a dark room is nice. Good work!

  2. My Wemos have been doing that for ~6 months now; home server turns on my desk light at 6.40am to light up the room dimly, brighter lamp next to bed at 6.45am. Sometimes I wake up before phone starts to make noises. I also have Osram Lightify RGB bulb, which could slowly start to fade in, but no (open) API on Lightify gateway… should’ve bought Philips Hue kit instead.

    Anyone else noticed that Wemo socket keeps NAT session open on router to xbcs.net? I know it’s for remote control outside home, but does anyone know how to disable the feature? If I set router to block the traffic, Wemo “goes nuts” on the network, harrassing DNS servers twice a minute, etc. That’s not a problem though, but unnecessary network traffic just bothers a bit. :)

  3. HaD You’re reading my mind again :D.

    This is exactly what I did a few days ago.

    But my setup is a little bit different:
    I’m using OpenHAB and pilight, running on a Raspberry PI, to control the rf power outlets.

    Tasker is a great software to automate tasks in Android and is fun with AutoVoice Google Now integration.

    Greets,

    vimtut0r

  4. This is great. I’ve developed a sunrise light myself that I’m planning to post here soon that just uses a light timer to come on, but this kind of automation would bring it to a different level. Nice job!

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

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