Many years ago, I created an API for interacting with the home automation technology called X10. The API interfaced with power line modules via a serial interface. I haven’t done anything with the X10 home automation API that I created a couple years ago. I have gotten a bit sidetracked by fatherhood.
You can find the source code here. If you do try to compile this, you may get an error about a missing class. This isn’t important; you can whack away the reference and compile again. (Not very helpful, I know, but if I get more time, I may update this with some more information.)