My roommate and I are big fans of indirect lighting, especially in our living
room area. Glare is our arch-nemesis, so we work to keep it at bay as much as
possible. In our quest to seek the perfect lighting atmosphere, we came upon the
idea to use dimmers to create various scenes depending upon what you may be
doing. After we received all our requisite parts, we got our automated
web-enabled lighting system up and running in no time. I thought I’d write up a
little tutorial for those of you who, like us, are enthralled at using way too
much technology to do something simple. Suck it Ockham! The simplest solution
may be the best, but it certainly might not be the most awesome and flashy.
Before you can set all this up you’re gonna need a few
things. Basically the only part you’ll really need that you probably don’t have
around somewhere are the dimmers and controller. We picked up four INSTEON LampLinc Dimmers ($34.99 each) and one INSTEON PowerLinc USB
Controller ($69.99). We also are using a Cisco IP Phone to control the web
interface, but you can use anything from your Wii to your cell phone. Anything
that runs a web browser will work.
You’ll also need a couple pieces of software to control the dimmers. We are
using InCmdLine. It’s just a command line utility that executes the
Insteon commands. You’ll also need the Smarthome Device Manager to talk to the actual devices.
The only other thing you’ll need is a web server and a scripting language
(either PHP or ASP — we’re Abyss and PHP but I’ll
let you decide what to use and set those up yourself).
The first step is to plug in your dimmers and your lights (incandescents
only!!) where you want them and your USB controller to your computer.
NOTE: We had some crazy-go-nuts issues when using a computer power
supply that wasn’t very great. Our PLC (PowerLinc Controller) would only work
if we had enough flourescent lights on to cancel the interference created by the
not-awesome power supply. It took forever to figure out. So make sure you’ve
got the PLC plugged into a PC with a good quality PSU and not your 225 watt Wal-Mart PSU.
All these dimmers have what are essentially MAC addresses on them, you’re
going to want to make sure you’ve got those written down.
Basically what we’re going to do is just use the web server to shell out to
run the InCmdLine exe with the options we want to set the lights for our scene.
An easy way to accomplish this is to just use .bat files that basically equate
to macros to set up your scene.
So you’d have something like this to set up a movie scene:
:: —– Begin movie.bat —–
InCmdLine.exe 0A.8D.D7 d50, 0A.82.E2 d25, 0A.8F.BB on
:: —– End movie.bat —–
This just tells the first dimmer to dim to 50%, the second one to dim to 25%,
and the last one to be 100% on. So make your bat files and stick them in the
same directory as your web scripts for the lights.
So, I’d recommend putting InCmdLine.exe in your Windows directory or
something (something in %PATH%) so you can execute it from anywhere. You also
need to make sure that the SmarthomeDeviceManager is running before any of these
things will work.
So, now that you’ve got the hard part done, we just need a simple script that
will let you run your scene batch files from a web browser.
Here’s some really simple php that’ll give you the basic idea with this batch
file model. I have two files, an index.html file that is going to serve as a
barebones interface and then a setMode.php file that will do the work.
The index.html file will just have links to setMode.php?mode=movie where mode
is the filename of your batch file minus the .bat part. We’ll do it this way
for simplicity’s sake.
Here’s the php:
<?php
$mode = trim($_GET['mode']);
exec($mode .
‘.bat’);
header(‘Location: index.php’);
?>
Here’s a little video of our setup in action
That’s it! I went more complicated with an XML config file and stuff, but
this gets the point across. Just point your web browser at your page and see if
your lights change. Now you can come up with some crazy awesome way to control
your lights. We personally opted for a Cisco IP phone on an end table. Maybe
you could do what we did, or an internet device, or even voice recognition.
Good luck!