August 3, 2000
Some sample code fixes: Fixed X10.setHouseCode() to properly update X10.itsHouseCode so that commands will work on a new house code. Fixed storeEvent() to use the correct mode byte.
July 22, 1999
Fixed a bug in CommPortIdentifier.getCurrentOwner(), which was always returning null. It now properly returns the most recent serial port owner application name.
Changed semantics of timeouts, so that if a read times out, it should return any partial results or 0 if no bytes are read before the timeout expires.
April 4, 1999
Improved receive timeout logic, now uses timed wait instead of a Timer thread, which should lower latency in most cases. Changed to use Mac OS memory allocator in all cases, and will throw an exception if any memory allocation fails.
The X10 interface now provides a static open method, which checks that an X10 interface is actually present on the serial port. Uses a 1 second timeout (or program specified) to prevent blocking forever. Test8.java uses this, and has also been enhanced to print out all stored timer events.
April 3, 1999
Fixed reading into an array with an offset and length.
Added an X10 controller test case, Test8.java. This demonstrates simple turning on/off of an X10 module, as well as storing future on/off events. A lot more can be done with the X10 controller interface, but this should be a good start.
The X10 interface this is designed for is called the CP290, and is well documented and widely available. For more information, see http://smarthome.com/1130.html.
March 31, 1999
This isn't actually the first release, just the first to have accompanying release notes. In this release, I've dusted off some old X10 interface code, and added it as a test case for the serial port classes. Here's some sample code for how you might use it:
// find a suitable port.
SerialPort port;
Enumeration portIDs = CommPortIdentifier.getPortIdentifiers();
while (portIDs.hasMoreElements()) {
CommPortIdentifier id = (CommPortIdentifier) portIDs.nextElement();
/* if this port has X10 attached to it... */
port = (SerialPort) inputID.open("X10", 0);
break;
}
// create the X10 controller.
X10 controller = new X10(port);
// turn on the device at address 0.
controller.turnOn(0);
// turn off the device at address 1.
controller.turnOff(1);
See a good X10 reference to learn about other commands, such as setting/getting the clock, and storing events.
Also in this release, fixed some bugs in the async I/O classes, and converted everything to JDirect2.