[ANN] just for fun.. X10 Firecracker Driver.
[ANN] just for fun.. X10 Firecracker Driver.
- Subject: [ANN] just for fun.. X10 Firecracker Driver.
- From: Charles Bennett <email@hidden>
- Date: Thu, 25 Oct 2001 13:15:39 -0400
I had a couple of these around the office and decided that the world needed an OS X
driver.. The GUI part is ugly but functional (I'm rendering some cool buttons as time allows).
An X10 Firecracker
http://www.x10.com/firecracker/fc_offer_br1ab.htm
is a (very) small device that plugs into a 9 pin serial port and drives the X10
lamp and appliance modules.
So if you have a USB to Serial convertor
http://www.keyspan.com/products/
and a firecracker kit (what true geek doesn't? ;-) ) you are good to go.
Follow the Downloads link at
http://www.powerguardian.com/
There are two user programs installed by this package.
/Applications/Firecracker is a GUI interface that lets you control modules.
/usr/sbin/firecracker is a command line version so you can add X10 commands
to your crontab or shell scripts.
In addition the fircracker server /usr/sbin/firecrackerd is installed and /Library/StartupItems/Firecracker starts it
automatically.
/Library/PreferencesPanes/Firecracker Control allows you to select the default serial
port.
Example:
/usr/sbin/firecracker A1 ON
/usr/sbin/firecracker A1 OFF
valid commands are
ON
OFF
BRIGHTER Means: Last selected unit (via ON) brighten 1 step
DIMMER Means: Last selected unit (via ON) dim 1 step
LIGHTSON Means: ALL Lights ON
LIGHTSOFF Means: ALL Lights OFF
ALLOFF Means: EVERY unit OFF (applicance too)
If you want to controll the firecracker from your own software it pretty simple
//using these defines
UNIT_ON @"0"
UNIT_OFF @"1"
UNIT_BRIGHTER @"2"
UNIT_DIMMER @"3"
UNITS_OFF @"4"
LIGHTS_OFF @"5"
LIGHTS_ON @"6"
NSDictionary *eventDict;
eventDict = [NSArray arrayWithObjects:
[NSString stringWithString:@"A1"],
[NSString stringWithString:UNIT_ON],
[NSString stringWithString:@"A1"],
[NSString stringWithString:UNIT_OFF],
nil];
[[NSDistributedNotificationCenter defaultCenter]
postNotificationName:@"com.benatong.X10Firecracker.REQUEST"
object:nil
userInfo:[NSDictionary dictionaryWithObjectsAndKeys:eventDict,@"EVENTS",nil]
deliverImmediately:TRUE];
Will turn Housecode A Unit 1 ON and then back off..
That's it, have fun and send me an email if you use it or want more features.
Now back to "as the iPod turns"
chuck
email@hidden
[demime 0.98b removed an attachment of type application/x-pkcs7-signature which had a name of smime.p7s]