From: <pj...@ca...> - 2007-11-17 05:22:43
|
I wanted a single click to be able to trun off Just the Lights in my living room. The problem is that I use many X10 Appliance modules for lights, and other things. In the living room, if I use the available options, it would turn not only the lights off, but the appliances too. I decided that using the Groups that I had setup in mny items.mht and was able to use more than one group, I could better control what was being acted on. So I wrote this code and got it working the way I wanted. I enhanced it so that the state is not changed till after all the units are selected, and they now all come on/off at the same time. So here's the code (attached), with many many comments to make it easy for anyone to use (perhaps the next cut will make it even more generic eg a sub routine with a simple call in ....) I've called it group_runner.pl, because it runs on a group of items.... -Pete Flaherty http://www.mraudrey.net |