US Home
Automation

(Last updated: Friday, June 25, 2010)
Google
 

DollHouse (DH) Software notes

DollHouse (DH) is a fork of MisterHouse (MH). This fork is not intended as a replacement of Misterhouse but instead a parallel development path. Eventually, when the software is stable, I'd like to see these changes merged back into Misterhouse so it is again one software tree.

One of the misconceptions with MH is that it's no longer being worked on. While the release code has not changed since December of 2008, the development code has (1718 as of June 2010, 1780 as of Nov 2010). This gives people the wrong idea that MH is no longer being developed. Another reason for the fork is to remove a major chunk of Perl code in the main section of MH which which should reside else where. This change may cause a certain amount of breakage and I wouldn't want MH's reputation to be damaged while these changes are taking place. Finally one of the major goals of DH is to build DH/MH such that it runs on an embedded system better. Embedded systems typically run and restricted resources such as smaller CPUs, less RAM and less storage (or read-only storage). Even though today's modern flash technology can handle being written to constantly it would still be nice if the software didn't write to it unnecessarily (e.g., log entries sent out via syslog to a logging server while the most recent entries are queued in RAM).

Goals

  • Fork Misterhouse so the developers can produce release code in addition to svn code
  • Change software architecture while retaining as much backward compatibility as is reasonable
  • Remove legacy code from the main code thread in Misterhouse and put it into the library modules where it belongs
  • Lighten resource intensity for embedded systems.
  • Eventually unfork DH into MisterHouse (or vice versa)

Notes

Lately I've become of habit to make my notes available on the WWW so I can more easily retrieve them when I'm not home. This page is no exception. Undestand that much of it will be my random musing on material I have no understanding of. So the criticisms will not be valid but will remain until I understand them or correct them.

The current MisterHouse code is an 18 (1992) year effort to create a flexible Home Automation package. This effort has been quite successful. Unfortunatley from inside the code you can see the coding of several different architects. This has lead to some code bloat and, in my opinion, some bad code practices (there are 50 Perl Modules being included, such as X10, Caller ID and LCD). Much of this code belongs in the library modules and not the main Perl code.

Originally MH was designed around X10 and the X10 CM11A. Some effort has been made to correct this (the Dummy Device interface for example). This is a huge step in the correct direction and hopefully I can wrap my head around this arch. to the point where I can pull out all the X10 and CM11A code from the main Perl code and still support the CM11A and X10 device or not (in case I decide to use Insteon or X-Wave).

The first begin of MH contains a lot of the version code. The next section contains a lot of var and module use commands (do we need a lot of these modules?). There is an odd eval "use BSC" command midway. Then a little bit further down there are some xxx::startup commands (these don't in here). Then some serial port processing but why is weeder, cm11a, ti103, HomeVision, Marrick, HomeBase, NCPUXA, and CM17A code in here? There are a bunch of TK commands (which I'll need to remove for the embedded system).

Links

Misterhouse on the Sheeva Plug computer.

I've posted on my blog that I managed to get Misterhouse (MH) running on my Sheeva Plug computer. Basically you can load MH on the computer, load Perl and a few modules and MH will run with no modifications. But MH is meant to run on a computer with a hard drive not a flash drive. So a few steps should be taken to make sure the Plug has a long life.

Note there is a Misterhouse Wiki page that describes putting MH on an NSLU and the Sheeva Plug. I'll update those pages when I get a chance.

Step by step

  • First upgrade your Sheeva to the Ubuntu distribution (follow directions found on the Plug Computer site.
  • cd <path_to_mh_directory>
  • svn checkout https://misterhouse.svn.sourceforge.net/svnroot/misterhouse/trunk mh
  • cd mh
  • wget http://ushomeautomation.com/Software/DollHouse/cleanup.sh
  • chmod a+x cleanup.sh
  • ./cleanup.sh
  • cd ..
  • date=$(date +%Y%m%d)
  • tar zcvf mh-${date}.tgz mh

Sheeva Plug drivers

The default kernel and the Ubuntu kernels don't come with many drivers installed so if you add a USB device you man need to hunt down the appropriate driver for your Kernel. First determine the release of you kernel (uname -r). Then visit the link below and find the matching sub directory and then the appropriate drivers.

I eventually hope to compile my own kernel and maybe even build my own distribution but at the moment that's a lot of work in progress.