US Home
Automation

(Last updated: Monday Sept. 07, 2009)
Google
 

The DollHouse Project (DH)

Purpose

The purpose of the DollHouse HA project is to initially enhance MisterHouse to allow it to work better on embedded systems and to improve MisterHouse overall (documentation and usability). The goals are to make it easy for the end user to use (a web based GUI), make it easy to administer (web GUI and CLI), make it flexible to develop and support new devices and protocols and to improve the overall documentation available via the MisterHouse Wiki (DollHouse v1.0).

Currently there is support for EIB/KNX, Insteon, UPB, X10, and Ethernet attached devices. Along with various other devices such as weather stations and internet web sites. After the code changes to support the limited resources of an embedded system the next phase of the project is to re-architect the code and take advantage of a modern object oriented language (Java/Groovy perhaps?). Hopefully this will improve the performance and abilities of the DollHouse Project (DollHouse v2.0)

Goals

These sound like marketing hype but when you realize that there are 3 distinct groups who will use this project then the goals make a bit more sense. These 3 groups are the end user, the administrator and the programmer/developer.

The first goal is to make the overall project easier for people like my wife to use (the end user). She is the end user and has no time to fiddle with widgets or perform magic incantations or contortions to make anything work! SAF is very important if you want to keep automating your home.

The next goal is to make it easy to administer. While pretty point-n-click GUIs are useful sometimes it just easier to make changes via the command line and and editor. The admin will probably be the person who is creating simple control sequences. They might not be a programmer and should have to be. Because they're also DIY enthusiasts so they won't mind the CLI, if it makes administration easier. Plenty of howtos and useful examples will assist this user.

The next to last goal is to make it easier to develop, extend and integrate existing and new technologies. A developer may be willing to write code but the documentation should be clear enough that reading the source code of another module isn't necessary to get the job done.

The final goal is to take advantage of the latest in new technologies. While cloud computing is the latest marketing hype it promises some interesting services. Also security, redundancy, distributed processing, object oriented methods and other technologies available to the programmer will make for convenient and news services. Hopefully a new architecture will make taking advantage of these technologies a bit easier.

Introduction

Welcome to the DollHouse (DH) project. DH is an Open Source Perl based DIY, HA project intended to run on small, low power, embedded Unix (Linux, BSD, etc.) systems to monitor and control your home using off the shelf components, such as X10, Insteon, Z-Wave and other devices. This project will take Misterhouse (MH) and trim it down to behave well in an embedded system environment. While DH is a derivative of MH (as opposed to a fork) it is my intention to reintroduce the DH code back into the main MH tree, if possible. This means I will attempt to keep DH compatible with MH. At first, the code may be more Unix based than Windows but I hope to have it compatible with both before reintroducing it to the main tree. This means that DH will use the same license as MH (GPL version 2).

History

In 2006, I wrote a book called Linux Smart Homes For Dummies, from 2007 through 2009 I was busy getting another degree (Comp. Science). In 2008 I decided to do a HA presentation for the Trenton Computer Festival (TCF). Leading up to TCF, I did a number of Presentations to local user groups. After my TCF presentation it was suggested to me that I should try to demonstrate my home automation during my presentations in some way. I've tried using an X10 module, a table lamp and a few other devices but the demonstration always left me wanting for something better. Somewhere along the way I got the idea to simply put together a small computer, a doll house, some electronics and lights to actually demonstrate automation in what resembled a home. Hence the idea of a Linux Doll House Automation presentation was born. The initial version was to use Misterhouse, a Perl based Home Automation program that I've been using as my central home control program. Misterhouse can be used to demonstrate how automation should work. I also intend to spend some time creating a new HA project with the same goals as Misterhouse but based on a modern OOP language, using Groovy perhaps. Also the entire system software needs to be geared more towards embedded systems. MisterHouse is very much geared towards PC with more resources (RAM, storage, a math coprocessor, etc.) available to the program.

In 2010, I prepared all the parts needed to demonstrate the automated doll house but failed to account for a few key small details. Instead I pulled together a presentation without the doll house. It went over well (though I ran out of time). While the presentation went well I was rather disappointed that I didn't deliver what I had promised. At the time of the presentation the house was built but not painted, the electronics built but not installed and Misterhouse was running on the SheevaPlug but the Linux device drivers were not working. I couldn't find the FTDI serial driver (ARM kernel) so I couldn't attempt to use a Insteon or X10 PLC. So close yet so far. I also needed to resolve the logging and database issue. Flash memory doesn't really like being constantly written to (though it is much better now than in the past). A temporary solution is to use a USB drive but it eventually needs to be removed (the no moving parts requirement). At that point I decided I would document the project with my notes pages. I've found that by keeping notes I could hash out ideas and more easily communicate what I wanted (to the point of even being understandable to myself ;-) ).

So all these nagging little problems made me look at Misterhouse and consider writing my own home automation package in some Object Orient Language instead of Perl. While I'm still considering writing a package in Groovy I'm sticking with Misterhouse for now as it works very well and I can make a lot of progress on my immediate HA goals. As I grow to understand Groovy (and Java) better I'll consider a rewrite. Basing this project on MH allows me to consolidate several things I'm working on into one project. Since I was going to document my progress on the Doll House, the extra hardware used in the project and Misterhouse I'll just document DH instead.

This project has grown from just being a Trenton Computer Festival (TCF) HA presentation with a DollHouse (yes that's it in the picture to the left) and Misterhouse software to a Misterhouse derivative for embedded systems. I intend to show a completed HA system at the 2011 TCF with all the bells and whistles working. In addition I intend to use this in my own home.

So far I have the Kill-a-watt (to build a Tweet-a-Watt), all the parts and a few extra Digi XBees, various other hardware for IO, various other HA hardware, and the Sheeva Plug w/Misterhouse installed. I've got various other bits and pieces to basically show everything I wrote in my Linux HA book. This alone doesn't merit a project but I believe I can clean up some of the extra code that sits inside the main code of MH. Unfortunately for, at least a little while, this will break some of the modules that I don't have the hardware to test for such as HomeVision, the BSC and other devices.

While poking around for some more HA links I came across this: Energy-Efficient Intelligent House That Can Learn Our Routines. It's from June 2009 and they have a Doll House also. So it's looks like this wasn't a bad idea. :-) I think they're in for a surprise when they figure out X10 but for use as a prototyping system it's a very good idea (inexpensive!).

Why?

Q: Why another project? Why not continue with Misterhouse (MH)? A: Because I want this to work better in an embedded environment. My thinking is as follows: MH works well on PC (or server), I use it as my main HA program. But MH is a bit bloated, features that I don't want or need. There are also features that I want added (I'll share these with MH). Perl is MH strength and weakness. Perl is a very powerful language but it's resource intensive. It's also not an object oriented programming language. Perl is readily available on most Linux systems so it's also ubiquitous. Hence I'm starting off with MH. But since MH is a little bloated I need to trim out some of the excess. MH as a base gives me a large base of tested devices to work with. This leaves me with a working system and a basis for my next generation system.

On the point of my next generation system. At this time I'm struggling with architectural choices for the later versions of DH. I like the Groovy (Java) language choice because object oriented programming gives me a few design aspects that lend themselves nicely to a system like this. It's still interpreted (byte code) but a bit quicker. There are a large array of libraries to work with. I, unfortunately, just need to do a lot of learning to catch up with the technologies.

My equipment list

Some of the equipment that I will be using with the Mr DollHouse.

  • 1 - wooden Doll House
  • 1 - SheevaPlug unit (I prefer the one with the ESATA connector)
  • 1 - 4GB SD card
  • 1 - USB hard drive (optional and temporary)
  • 1 - USB powered hub
  • 1 - Elexol EtherIO 24 digital I/O port
  • 1 - Elexol USB IO 24 digital I/O port (FTDI driver)
  • 1 - USB Xbee unit (Master unit)
  • n - RS232 and direct connect XBee units (slaves)
  • n - USB RS232 and/or Ethernet terminal server ports
  • 1 - Computer Interface module (X10, Insteon and/or Z-Wave)
  • n - device modules (X10, Insteon and/or Z-Wave)
  • 1 - Elk-M1 security system w/remote (bleep-bloop blink)
  • x - Assortment of resistors, caps, LEDs, etc.
  • 1 - 1-Wire interface
  • 1 - Internet Firewall
  • 1 - 10/100M Switch
  • 1 - 2-Way IR interface (RedRat)
  • 1 - TV (small 7" NTSC LCD)
  • 1 - Media Player (DLink)
  • 1 - heating & cooling system (Red LED, Blue LED and a Fan)
  • 1 - Thermostat (1 slider, switches, LEDs)

Links