I always have been interested in environmental control via computer; seeing how much of an environment I can automate or influence subtly, electronicly, or remotely.
The idea behind this project is simple: three strands of x-mas lights, red, green, and blue, individually controlled via X10 modules. This makes for excellent ambient lighting of a room, in whatever color suits your mood at the time.
The best way to get the lights is to find solid strands, pre-made. Problem is, you won't find that easily. I had to get a bunch of multi-colored strands and pick them apart by hand. I warn you: this is incredibly tedious work. 150 x-mas lights really are quite a lot, especially when you need three strands of such.
It also helps if the strands are the same brand, as that guarantee that the lights will be the correct voltage (there're apparently a few different voltages out there, but the packages usually go by the number of lights in the strand) and the same size. Different brands have different spacing between the lights and it helps a lot if they're all the same.
Once you have three strands, all red, all green and all blue, either tie them together with rubber bands (i don't recommend using twist ties, as they're metal. x-mas lights really aren't the safest of lights) or string. Twisting them together or braiding will probably also work. This ensures that the you'll get RGB clusters and more evenly distribute the light.
You may notice that the filters on the lights tend to be ... well, not very accurate. (my blue is more white than blue, eg.) This is a major problem with using x-mas lights for this purpose, but can be (at least somewhat) corrected through software.
The next step is to get the X10 modules. You can get three lamp modules from X10's website for about $12/module. While this isn't too cheap, the modules are good and can easily be repurposed for other applications if you find the RGB lights too silly. I've looked into other controlling methods and unfortunately, without any electronics skill/knowledge, this is the easiest and least expensive solution out there.
You will also want either the little firecracker controller (X10 sells a nice kit that comes with all the toys needed for this, as well as a lamp module) or the activehome controller (CM11A). I personally use the CM11A, as it's a bit faster and is generally a better device. Either of these devices will let you interface your computer with the lamp modules, so software can control them.
You will need the following software to make this go:
You should first off edit the script. I'm lazy and didn't have it read its config from a config script, so you'll have to edit the default values. The comments should pretty much give you an idea of what to do with it all.
Usage is simple: setrgb deep sky blue should make your
lights be a pleasant shade of blue. run the command with another color,
and it should fade to that color. As X10 units aren't very precisely
controlled, the color the system thinks the lights are and the color
they actually are gets out of sync. Use setrgb -a COLOR
to force it to re-zero the lights and fade to COLOR or
setrgb -d to have it forget the lights were set at all.
One of the unfortionate side-effects of using X10 hardware is that it's slow. It takes about 6.5 seconds to go from entirely off, to "deep sky blue". It takes 6.5 more seconds to fade that to "purple". Not much more can be done about this short of re-designing the X10 hardware itself.
The left photo is what is supposedly white. Of course, my webcam's color really is horrendous, so it's actually a lot less yellow in reality.