Discussion:
[wish-info] x10web, x10home, and x10templinc rewritten
Scott Hiles
2004-07-27 04:38:53 UTC
Permalink
OK folks, the summer is almost over. Fortunately I took the summer to
rewrite both the drivers and the applications for the wish project. As many
of you know, the drivers for Linux have been completely rewritten to now
work under both 2.4 and 2.6 (really, this time they work) and I have gotten
positive feedback that they are working well. I have been running the new
drivers for about a month without any issues. I also rewrote the Java
applet/application to be more professional looking and to be easier to
understand.

The new x10templinc application is what I wanted from SmartHome's templinc
software but couldn't get from their Windows version. It displays the
temperature in a "thermometer" style thanks to JFreeChart, but also displays
it in a 24 hour history formation.

The rewritten x10home application now treats the devices as real objects
having their own state machines and unique capabilities. This is reflected
in the new configuration dialog which allows you to select different types
of devices and implements them as unique objects. You can expect that I
will add more devices and objects as I get more toys for my X10 network.

Both applications now use XML to store the configuration. That was partly
because I needed something more flexible for the configuration file, and
because to go for a full object oriented design for each switch I needed a
way to allow the switches to save themselves. So, in the package is what I
think to be a very good, and very small DOM type of XML parser. (Had I
implemented with JDOM or JSAX, the download of the applet would have taken
many minutes since they are over 3 meg in size. My implementation is
basically 1000 lines of code.) The Java Documentation for the myXML parser
is stored in the doc directory off the source tree. myXML takes it a step
further in that it allows the application to manipulate the DOM tree and
then serialize it to disk. I have a paper in the works for JavaWorld on
this one and it was written to be reusable independently from the
application. It was a cool learning experience and would be a great project
if any of you teach programming. Lots of interesting concepts like
recursion, state machines, and token processing.

In any case, summer is drawing to a close and I will be going back to school
for my last 2 semesters. I originally wanted to graduate before hitting 40,
but just couldn't get it done in time. Balancing school and a full time job
(yea, for those of you who didn't know, I got myself a full time job for 60
hours a week) will not leave much time for development so I tried to get as
much done as I could while I had the time. I think the most lacking thing
for the project is the documentation so if anyone wants to volunteer to
revamp it, please have at it. The documentation on
http://wish.sourceforge.net is included in each of the tar.gz files so you
have everything that I have. This, by no means, indicates that the project
is done, but it does mean that changes and development will slow down for a
while.

Enjoy the rest of your summer and I hope that the drivers and applications
are proving useful for everyone.

Scott

Loading...