Tuesday, January 27, 2015

Spark Lamp

     There is a light switch on the wall at the entrance of the bedroom in my apartment. You would imagine it would turn on the bedroom lights, but since there are not ceiling lights in the bedroom, it can't do that. What it actually controls is the power to a single receptacle on the wall. In the past, I've had two lamps plugged into this one receptacle. The lamps sit on nightstands on either side of the bed, but there is a problem. Imagine you're getting ready for bed. It's dark out, so as you walk into the bedroom, you flip the light switch on and the lamps come on. Just as expected. Now you're going to bed and you want the lights off - you have two choices: go to the wall and flip the switch again, or individually turn the lamp's power switches off. Of course you're not going to get out of a warm and comfortable bed to flip the light switch so you turn the lamps off. Now here's the dilemma. In the morning, you want the lights back on, right? You have to clumsily reach under both lampshades to turn the lights back on because the light switch won't do squat if the lamps are powered off. That's what this project aims to solve. The light switch will work as any other light switch does - flip it up and both lamps come on and down to turn them both off. Each lamp will have a switch that not only has the ability to turn that lamp on or off, but also to control the other lamp just as easily. And finally, have control of the lights and read their status over the internet. Because this is the future and I want to turn lights on I can't even see. Read on to see how to do it.

Thursday, August 21, 2014

electric imp-Controlled 120VAC Relay Switcher Software Update

     About half a year ago I published a post about my electric imp-Controlled 120VAC Relay Switcher project. I used it very often to start making coffee in the morning while I was still in bed. Since I was still using iWebKit for the web app, I searched around for a framework that was visually in the style of iOS7. There are so many available frameworks around like RatchetChocolateChip-UI, and Onsen UI and I tested many of them but none gave me everything I wanted. I finally found Google's Web Starter Kit and it was perfect for me. I could easily extend it with JavaScript, it had a responsive design, and the gulp tool for automatically refreshing all pages on all devices on a file change helped me quickly debug errors. While I was changing the UI, I also added a timer function to the code.


Friday, April 18, 2014

1st 1/4 of '14

     It's April and I haven't posted much about any of the projects I've been working on. I haven't completed any big projects that I thought warranted their own blog post, but I'll use this one to explain what I've been doing and what I plan on doing soon. 

Tuesday, December 10, 2013

electric imp-Controlled 120VAC Relay Switcher

     I bought an electric imp about a year and a half ago when they were released. I loved it's simplicity and made a few temporary projects involving it but wanted to keep it for something more advanced. After all this time, I decided it's better just to use it for anything rather than leave it just sitting in a box in my room, so I've made an internet-controlled 120VAC relay switcher for it and an "app" for my iPhone to switch it remotely. I'm sure there are other ways of accomplishing this project, but I was able to build the whole thing using parts I already had on hand. This blog post will be a high-level overview of what I did to make it.

Update: I've updated the software as shown in this blog post.