I recently set up a home automation system that is controllable from Tasker on my phone, and am currently getting familiar with it for the coming review. The latest addition is one of Nexa’s dimmable socket adapters (controlled by the Tellstick Net)and a bulb that goes with it, which has now replaced my old ceiling lamp as the primary light source in my tiny apartment. This means that Tasker can not only turn the light on or off, but also control what percentage the light should be dimmed to. Queue funsies.

The RemoteStick app that contains the Tasker plugin is able to control the dimmer directly as well, which basically gives you a slider as shown below.

That’s your most basic use, which is neat, but not as fun as what you can do with Tasker. One of the first things I did was to edit my pop-up settings scene and add buttons for the new lamp, with on, off, and 50% as the available options. I also changed the shortcuts on my lock screen to set the lamp to 50% of off, instead of them controlling the desk lamp.
The next thing I did was to play around with a movie mode addition to Nelly, my Tasker-based voice assistant. The basic idea being that a simple voice command dims the light to 20% and opens Unified Remote, which I use to control Netflix or other media systems when I’m really watching anything (not just running it in the background). It also plays a certain tune…

I also integrated the new light into my existing profiles. My sleep mode now turns off the light (and my PC) at night, and then back on in the morning. I also edited my outside profile so that it now turns off the light, and the home profile turns them back on. That profile is based on WiFi connection, so it’s very reliable.

The last setup I created was the most advanced one, and was hinted at in yesterday’s Tasker article. I’ve seen these lamps that gradually turn on before you alarm goes off, giving you a chance to wake up naturally, and I thought I would replicate that feature. I originally wanted to read the next alarm time into Tasker and have the so-called “sunrise mode” be automatic based on that, but the existing known method for doing that doesn’t work due to an abandoned plugin. That left me making a scene (pun intended) that adds a new UI bit to my alarm clock app (ref the article linked to above), allowing me to set the sunrise “alarm” separately from my main alarm, but from the same exact app and screen.

At 5:50 every morning, a profile checks to see if there’s a time set for sunrise mode to activate. Using some simple math it calculates how many seconds from then the mode is set to activate, and sets a Wait action for that duration. Hardly the most elegant solution, but unfortunately something as simple as using a variable in the time context isn’t possible in Tasker, and has been on the dev’s infamous todo list for too long. This means that instead of having a variable based time context, I need to use a static time context that is guaranteed to be before my alarm and use a Wait action to delay it.

Once the delay is over, the actual sunrise mode begins. It dims the light up from 0% to 20%, waits 5 minutes, dims to 40%, waits 5 minutes, dims to 65%, waits 5 minutes, dims to 90%. So, over the course of about 15 minutes, the light goes from being off, to (what I use as) on. It didn’t manage to wake me this morning, but I hope that I’ll have a few soft wake ups because of it in the future.

I have to say, I didn’t expect a simple lamp to amuse me this much. Then again, it’s not your typical lap either, when you can control it with Tasker. I’m sure I’ll find even more uses for it in the future, but for now, I’m just amused by seeing the light dim all the way off when I go to bed.