Xmas webcam & webcontrol FAQ



So you want to build your own webcam and webcontrol?

First you need to know a little bit about X10, which is a protocol sending signals through your house wiring via the A/C sine wave. Note that X10 is NOT www.x10.com - yes, they are the company with the annoying pop-up ads talking about their latest wireless webcam that shows scantily clad women! ;-)

What's really nice about X10 PROTOCOL is that it uses the existing wires - so you don't need to re-wire anything except the outlets/switch/whatever. And you can also do stuff like plug a wireless receiver, a dusk/dawn light sensor, control unit for timed events (I have all of these), and other misc. into a power outlet, which can then receive/send signals through your house wiring to the lights. You assign codes/zones to various outlets and control them individually or as a group. BTW, the reason I only have 4 zones is I bought the low-end/cheapo units, and that is all they support without some additional work.

So my lights are plugged into X10 outlets. Remember that I allready turn the lights ON and OFF (for the day) automatically via a control unit - actually two of 'em for redundancy! ;-) One is plugged in at the garage and other in my office. And allready mentioned on the main web page that I like to "mess with kids" by using a wireless fob to turn them on/off in real-time; this works by sending a signal to the wireless receiver which then tells the outlet to turn itself on/off - stupid geek tricks, eh?!?

All of the above is "old news" and I've had it operational for a couple of years. It's simple and it works (almost all of the time ;-). Now what would you need to do to add the webcam and webcontrol functionality?


The webcam can be obtained from any of the X10 vendors; just don't use it to shoot pictures of scantily clad women, OK? Then you have to find a location where you can good a good view of the lights - a tree or roof location across the street would work well, but you need your neighbor to allow this and provide power. There is no way to communicate *TO* the webcam, but you can configure it to transmit an image (via wireless) *FROM* it periodically to your computer. Note that some webcams are directly adddressible via the network - and I read about on that was capable of doing 1024X768 at 15 fps - hopefully your lights aren't being updated THAT fast! ;-) So you simply keep all these images in temporary storage. And then when someone hits the web page, the Perl/CGI code can grab the latest image from temporary storage and display it for the browser. That's it - pretty simple, and not much different than any old security camera setup.

The webcontrol requires one more device - an X10 "dongle" that connects (typically serial or USB) to the computer and then plugs into wall power. So after the Perl/CGI script on the web server validates the input/selection (such as "TURN OFF #2"), that X10 command is sent to the dongle, which then is sent through the house wiring and the outlet turns off. And that picture you see of the "updated" view ... wellllll ... remember you have no way of communicating **TO** the camera ... but since it sends a new image **FROM** it periodically, just wait until that is available ... so it's not "really" a real-time picture ... but close enough. And oh yeah, how can the web page "know" what zones are on/off? You CAN communicate **TO** the X10 outlets and request status via the dongle, which can then be used by the Perl/CGI code to display status. Again, not so difficult, eh?!?

There was a variety of other X10 tricks demonstrated - click here to read the other_sensors FAQ. And after Xmas, I saw some webcams with pan & zoom capability that looked cool. While the xmas lights are pretty static and so there isn't much to "track", it would be cool to allow folks to pan the camera across the xmas light display; maybe they will have one with zoom capability available by xmas/2003! ;-)

So now that I've described how to do this, I expect to see a lotta xmas webcam & webcontrol pages available on the Web! ;-)

Questions/comments/whatever about this extravaganza? Send Alek an Email which I'll include in a public forum for all to see


P.S. The folks at http://blinkenlights.de/ web-controlled the lights of an entire building!