How to install misterhouse on openwrt kamikaze 8.09
Misterhouse is home automation software written in perl. Because it is written in perl it can run on any OS that has perl binaries so even on a small router that runs openwrt. If you don’t have openwrt already running on your hardware first follow my guide to install openwrt with USB media for extra space.
The first step is to install perl and all the modules misterhouse need . Install following packages with the opkg command
opkg install packagename
perl
perlbase-autoloader
perlbase-base
perlbase-bytes
perlbase-config
perlbase-cwd
perlbase-data
perlbase-db-file
perlbase-errno
perlbase-essential
perlbase-fcntl
perlbase-file
perlbase-filehandle
perlbase-getopt
perlbase-integer
perlbase-io
perlbase-posix
perlbase-re
perlbase-selectsaver
perlbase-socket
perlbase-symbol
perlbase-term
perlbase-text
perlbase-time
perlbase-xsloader
perlbase-sys
perlbase-encode
perlbase-universal
perlbase-net
perlbase-filehandle
Then install misterhouse. Installing misterhouse is nothing more than unpacking the code to your mounted USB media and altering the config file(s). First download the latest stable code tarball and unpack it.
cd /mnt/usb
wget http://prdownloads.sourceforge.net/misterhouse/misterhouse-2.105.tar.gz
tar xzvf misterhouse-2.105.tar.gz .
Now you have a directory /mnt/usb/mh
As a first test you can try to run misterhouse to see if all perl packages needed are installed and working.
cd /mnt/usb/mh/bin
./mhl
You may see some GD.pm and TK perl module errors in the log but can ignore them for the moment. We will disable these functions later. If you see a line “PM: Saving object states … done” then you are good and know that misterhouse is running. You can even browse to http://192.168.1.1:8080 to see the web interface.
The next step is to create your own code files and to alter the misterhouse configuration file for your needs. This is explained on the misterhouse homepage or in the docs section of your misterhouse install directory .
A first step could be to disable TK and GD code by adding the following lines to your mh.private.ini file
tk=0
gd=0
For my own project I run misterhouse as a proxy. A proxy is a stripped down misterhouse process that can interact with a main full misterhouse install on another server for example. In my next post I will explain how i setup my misterhouse proxy with a Velleman K8055 USB IO board, a 1-wire usb interface and a bluetooth dongle to detect if my mobile phone is nearby.
March 23rd, 2009 at 14:05
[...] you have followed my guide to install misterhouse on an openwrt router you may use it as proxy. A misterhouse proxy is used to offload slow hardware interfaces or slow [...]
May 10th, 2009 at 19:49
I really very liked this post. Can I copy it to my blog? Thank you in advance. Sincerely
May 13th, 2009 at 14:39
I love it! That is way cool man! The steps weren’t that complicated too, which is great.
November 12th, 2009 at 16:12
Anyone have an idea why the webserver won’t come up on :8080. I run the script ./mhl and the debug looks good. However I just don’t get a response from the webserver it’s like something is blocking it. I also tried “mhsend” and what I
perl mhsend ‘hi there’
In openwrt I get:
Sending 10 bytes of data to localhost port 8084, socket made, data sent
Response:
on wintel:
Sending 10 bytes of data to localhost port 8084, socket made, data sent
Response: Data was logged default.log
the catch is the debug logs show nothing – I also have TK=0; GD=0 and swapon???
November 13th, 2009 at 19:12
Some things that may help :
- Another process is already using port 8080 ( a proxy for example)
- There are different log files that you need to check, the webserver logs in a seperate file
- Start MH with the mh command instead of the mhl wrapper script, then you may see more debug output
- check with netstat -at | grep 8080 command if openwrt is listening on port 8080
I hope this helps.
Nico