<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>bits4life &#187; openwrt</title>
	<atom:link href="http://blog.export.be/category/openwrt/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.export.be</link>
	<description>Bits and bytes for your daily life.</description>
	<lastBuildDate>Thu, 12 Nov 2009 10:55:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to setup a misterhouse proxy on openwrt</title>
		<link>http://blog.export.be/2009/03/how-to-setup-misterhouse-as-a-proxy-on-openwrt/</link>
		<comments>http://blog.export.be/2009/03/how-to-setup-misterhouse-as-a-proxy-on-openwrt/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 13:05:26 +0000</pubDate>
		<dc:creator>nixo</dc:creator>
				<category><![CDATA[misterhouse]]></category>
		<category><![CDATA[openwrt]]></category>

		<guid isPermaLink="false">http://blog.export.be/?p=195</guid>
		<description><![CDATA[If 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 processes from the main misterhouse process. Another reason could be that you cannot connect some hardware physically to your main misterhouse box but like [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="misterhouse logo" src="http://misterhouse.sourceforge.net/mh_logo.gif" alt="" width="99" height="97" />If you have followed my <a href="http://blog.export.be/?p=115" target="_self">guide to install misterhouse on an openwrt router</a> you may use it as proxy. A misterhouse proxy is used to offload slow hardware interfaces or slow processes from the main misterhouse process. Another reason could be that you cannot connect some hardware physically to your main misterhouse box but like to have that hardware available to your main misterhouse box. Gregg from the misterhouse mailing list pointed me to <a title="Xap explained" href="http://misterhouse.wikispaces.com/xAP+and+xPL+-+Getting+started" target="_self">the Xap protocol support</a> build into the misterhouse code. So I started testing out the code.<span id="more-195"></span> The principle is that you define the same Item types on both the proxy and the main misterhouse machine. The Xap protocol then takes care of keeping these variables in sync. The first thing I did was creating my own directories outside the misterhouse install directory, this will make further upgrades much easier. Here are my steps :</p>
<p>Create a directory on the same level as the misterhouse install directory</p>
<p class="textbox">root@OpenWrt:/mnt/usb# ls<br />
etc         lib         lost+found  mh       usr<br />
mkdir my-mh<br />
cd my-mh</p>
<p>Copy the code dir and data dir</p>
<p class="textbox">mkdir code<br />
cp -r ../mh/code/proxy code<br />
mkdir data<br />
cp -r ../mh/data/proxy data</p>
<p>Because I am setting up a misterhouse proxy I only copied the proxy sub directories of the data and code directories. I also copied the mh.private.ini config file and some startup scripts and altered them to use the newly created directories.</p>
<p class="textbox">cp ../mh/bin/mh_proxy.ini mh.private.ini</p>
<p>The mh.private.ini file overrides the main mh.ini configuration file in the misterhouse installation directory and is used to make your personal configuration changes. This is how my file looks like:</p>
<p class="textbox">code_dir=$Pgm_Root/../my_mh/code/proxy<br />
data_dir=$Pgm_Root/../my_mh/data/proxy<br />
code_select   = code_select.txt<br />
code_unselect = code_unselect.txt<br />
sound_program=<br />
server_telnet_port=<br />
server_mhsend_port=<br />
xpl_disable=1<br />
xap_enable_items=1<br />
voice_text=<br />
#only_load=proxy_server.pl<br />
no_log=serial_unmatch<br />
xcmd_file=<br />
sleep_time=100<br />
sleep_count=1<br />
tk=0<br />
title=Proxy MisterHouse<br />
gd=0<br />
x10_errata=1<br />
server_proxy_port=<br />
xap_echo_all=1<br />
http_port = 8080</p>
<p>I also copied the mh_proxy startup script and the mhl script and altered them to reflect my proxy setup</p>
<p class="textbox">cp ../mh/bin/mhl ../mh/bin/mh_proxy .</p>
<p>This is my mh_proxy script that I use to start misterhouse as a proxy</p>
<p class="textbox">#!/bin/sh<br />
export mh_parms=/mnt/usb/my_mh/mh.private.ini<br />
./mhl &#8220;$@&#8221;</p>
<p>And this is the mhl script that actually starts and monitors the misterhouse process</p>
<p class="textbox">#!/bin/sh<br />
while [ 1 = 1 ]; do<br />
echo<br />
echo Deleting startup file<br />
touch mh.startup<br />
export LANG=C<br />
echo Running mh<br />
perl /mnt/usb/mh/bin/mh &#8220;$@&#8221;<br />
rc=$?<br />
echo mh rc=$rc<br />
if [ $rc = 1 ]; then<br />
echo mh exited normally<br />
exit<br />
fi<br />
if [   -f mh.startup ]; then<br />
echo mh failed on startup &#8230; will not restart<br />
exit<br />
fi<br />
echo mh had an unexpected exit &#8230; sleep a bit, then restarting<br />
date &gt;&gt; mh_restart.log<br />
sleep 5<br />
done</p>
<p>Now you can use the mh_proxy script to start misterhouse on your router.<br />
Next you can start enabling or disabling code. Because I enabled the web interface on port 8080 in mh.private.ini you can browse to your router and use the web interface to enable or disable code. Note that you need a reload to activate the changes. You can also go to the data directory and edit the code_select.txt and code_unselect.txt files to list the code files you want to enable or disable. It is important to understand that the code_select.txt file list the code files you want to enable from the &#8220;misterhouse install directory&#8221;/code/common directory and that code_unselect.txt lists the files you want to disable from your personal code directory. I enabled the following code files from the common code dir</p>
<p class="textbox">mh_control.pl<br />
xAP_command.pl<br />
xAP_send.pl</p>
<p>My own code dir has the following files</p>
<p class="textbox">root@OpenWrt:/mnt/usb# ls my_mh/code/proxy/<br />
digitemp.pl      k8055-file.pl    mh.menu          proxy_server.pl  triggers.mhp</p>
<p>and my code_unselect.txt looks like this</p>
<p class="textbox">proxy_server.pl</p>
<p>So this means that all code files (the ones with .pl extension) are running except proxy_server.pl .</p>
<h2>The Xap setup</h2>
<p>Like you can see in the code_select.txt file I enabled the xAP_command.pl and xAP_send.pl code files you need to also enable them on your main misterhouse box and add the line &#8220;xap_enable_items=1&#8243; to your mh.private.ini file on the main misterhouse box. I have only tested this with Generic_Items but if you create a new Item with the same name on both your proxy and the main misterhouse box the state of these Items will be synced. This works very well for me.</p>
<p>Have a look at my <a href="http://blog.export.be/?p=153" target="_self">1-wire</a> and <a href="http://blog.export.be/?p=182" target="_self">K8055</a> code files for some working examples.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.export.be/2009/03/how-to-setup-misterhouse-as-a-proxy-on-openwrt/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Velleman K8055 IO board misterhouse glue</title>
		<link>http://blog.export.be/2009/03/velleman-k8055-io-board-misterhouse-glue/</link>
		<comments>http://blog.export.be/2009/03/velleman-k8055-io-board-misterhouse-glue/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 15:21:45 +0000</pubDate>
		<dc:creator>nixo</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[misterhouse]]></category>
		<category><![CDATA[openwrt]]></category>

		<guid isPermaLink="false">http://blog.export.be/?p=182</guid>
		<description><![CDATA[The next device I added to my misterhouse proxy running on my router is the Velleman K8055 IO board. This is a USB powered experimental IO board with 8 outputs, 5 inputs, 2 DAC outputs and 2 analog inputs. I used the k8055 openwrt kernel module from the sourceforge project homepage.
I have compiled the module [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="Velleman K8055 USB IO board" src="http://www.designnotes.com/Merchant2/graphics/00000001/K8055.JPG" alt="" width="163" height="123" />The next device I added to my misterhouse proxy running on my router is the <a title="Velleman k8055 product page" href="http://www.velleman.be/ot/en/product/view/?id=351346" target="_blank">Velleman K8055 IO board.</a> This is a USB powered experimental IO board with 8 outputs, 5 inputs, 2 DAC outputs and 2 analog inputs. I used the k8055 openwrt kernel module from <a title="K8055 openwrt kernel module" href="http://sourceforge.net/projects/k8055d/" target="_blank">the sourceforge project homepage.</a><span id="more-182"></span></p>
<p>I have compiled the module myself because there was no package available for the openwrt kamikaze 8.09 release, if you need it you can <a title="K8055 openwrt kernel module" href="http://blog.export.be/downloads/kmod-k8055d_0.1.2_2.4.35.4-brcm-2.4-1_mipsel.ipk">download it here</a> so you don&#8217;t need to install the buildroot etc.or you can install the package directly.</p>
<p class="textbox">opkg install http://blog.export.be/downloads/kmod-k8055d_0.1.2_2.4.35.4-brcm-2.4-1_mipsel.ipk<br />
opkg install kmod-usb-uhci-iv</p>
<p>Like you can see I also installed the kmod-usb-uhci-iv package which was needed for the module to work. If all went well you now a /proc/k8055/0 directory with a file for every input and output. By reading or writing to these files you can read or write values to the board.<br />
Next I wrote some misterhouse code to create misterhouse items for all the IO and the read and write commands to interface the files. Here is my code :<br />
<em>$k8055_out1 = new Generic_Item;<br />
</em> <em>$k8055_out2 = new Generic_Item;<br />
$k8055_out3 = new Generic_Item;<br />
$k8055_out4 = new Generic_Item;<br />
$k8055_out5 = new Generic_Item;<br />
$k8055_out6 = new Generic_Item;<br />
$k8055_out7 = new Generic_Item;<br />
$k8055_out8 = new Generic_Item;<br />
$k8055_in1 = new Generic_Item;<br />
$k8055_in2 = new Generic_Item;<br />
$k8055_in3 = new Generic_Item;<br />
$k8055_in4 = new Generic_Item;<br />
$k8055_in5 = new Generic_Item;<br />
$k8055_out1 -&gt; set_states (&#8216;aan&#8217;,'uit&#8217;);<br />
$k8055_out2 -&gt; set_states (&#8216;aan&#8217;,'uit&#8217;);<br />
$k8055_out3 -&gt; set_states (&#8216;aan&#8217;,'uit&#8217;);<br />
$k8055_out4 -&gt; set_states (&#8216;aan&#8217;,'uit&#8217;);<br />
$k8055_out5 -&gt; set_states (&#8216;aan&#8217;,'uit&#8217;);<br />
$k8055_out6 -&gt; set_states (&#8216;aan&#8217;,'uit&#8217;);<br />
$k8055_out7 -&gt; set_states (&#8216;aan&#8217;,'uit&#8217;);<br />
$k8055_out8 -&gt; set_states (&#8216;aan&#8217;,'uit&#8217;);<br />
if ($state = state_changed $k8055_out1){<br />
if ($state eq &#8216;aan&#8217;) {<br />
file_write(&#8216;/proc/k8055/0/out1&#8242;,1);<br />
}<br />
else {<br />
file_write(&#8216;/proc/k8055/0/out1&#8242;,0);<br />
}<br />
}</em></p>
<p><em>if ($state = state_changed $k8055_out2){<br />
if ($state eq &#8216;aan&#8217;) {<br />
file_write(&#8216;/proc/k8055/0/out2&#8242;,1);<br />
}<br />
else {<br />
file_write(&#8216;/proc/k8055/0/out2&#8242;,0);<br />
}<br />
}</em></p>
<p><em>if ($state = state_changed $k8055_out3){<br />
if ($state eq &#8216;aan&#8217;) {<br />
file_write(&#8216;/proc/k8055/0/out3&#8242;,1);<br />
}<br />
else {<br />
file_write(&#8216;/proc/k8055/0/out3&#8242;,0);<br />
}<br />
}</em></p>
<p><em><em>if ($state = state_changed $k8055_out4){<br />
if ($state eq &#8216;aan&#8217;) {<br />
file_write(&#8216;/proc/k8055/0/out4&#8242;,1);<br />
}<br />
else {<br />
file_write(&#8216;/proc/k8055/0/out4&#8242;,0);<br />
}<br />
}</em></em></p>
<p><em><em><em>if ($state = state_changed $k8055_out5){<br />
if ($state eq &#8216;aan&#8217;) {<br />
file_write(&#8216;/proc/k8055/0/out5&#8242;,1);<br />
}<br />
else {<br />
file_write(&#8216;/proc/k8055/0/out5&#8242;,0);<br />
}<br />
}</em></em></em></p>
<p><em><em><em>if ($state = state_changed $k8055_out6){<br />
if ($state eq &#8216;aan&#8217;) {<br />
file_write(&#8216;/proc/k8055/0/out6&#8242;,1);<br />
}<br />
else {<br />
file_write(&#8216;/proc/k8055/0/out6&#8242;,0);<br />
}<br />
}</em></em></em></p>
<p><em><em><em>if ($state = state_changed $k8055_out7){<br />
if ($state eq &#8216;aan&#8217;) {<br />
file_write(&#8216;/proc/k8055/0/out7&#8242;,1);<br />
}<br />
else {<br />
file_write(&#8216;/proc/k8055/0/out7&#8242;,0);<br />
}<br />
}<br />
if ($state = state_changed $k8055_out8){<br />
if ($state eq &#8216;aan&#8217;) {<br />
file_write(&#8216;/proc/k8055/0/out8&#8242;,1);<br />
}<br />
else {<br />
file_write(&#8216;/proc/k8055/0/out8&#8242;,0);<br />
}<br />
}<br />
my $input;<br />
if ($New_Second){<br />
$input = file_read(&#8216;/proc/k8055/0/in1&#8242;);<br />
set $k8055_in1 $input;<br />
$input = file_read(&#8216;/proc/k8055/0/in2&#8242;);<br />
set $k8055_in2 $input;<br />
$input = file_read(&#8216;/proc/k8055/0/in3&#8242;);<br />
set $k8055_in3 $input;<br />
$input = file_read(&#8216;/proc/k8055/0/in4&#8242;);<br />
set $k8055_in4 $input;<br />
$input = file_read(&#8216;/proc/k8055/0/in5&#8242;);<br />
set $k8055_in5 $input;<br />
#print_log &#8220;Input 1 is now $input1&#8243;;<br />
}</em></em></em></p>
<p>Handles for the DA and AD ports are not yet implemented because I don&#8217;t use them for the moment.</p>
<p>Update : I just finished doing the same setup on a NSLU2 . I compiled the k8055 module via the buildroot for the ixp4xx harware. The only difference was that I had to use the kmod-usb-ohci_2.6.28.10-1_ixp4xx.ipk module instead of the uhci one. If anyone needs tha packages for the Linux OpenWrt 2.6.28.10 #2  armv5teb GNU/Linux NSLU2 harware let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.export.be/2009/03/velleman-k8055-io-board-misterhouse-glue/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>1-wire usb interface and misterhouse glue</title>
		<link>http://blog.export.be/2009/03/1-wire-usb-interface-and-misterhouse-glue/</link>
		<comments>http://blog.export.be/2009/03/1-wire-usb-interface-and-misterhouse-glue/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 15:54:50 +0000</pubDate>
		<dc:creator>nixo</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[misterhouse]]></category>
		<category><![CDATA[openwrt]]></category>

		<guid isPermaLink="false">http://blog.export.be/?p=153</guid>
		<description><![CDATA[After installing misterhouse on my openwrt router I started adding devices. I plugged a 1-wire usb interface into my router and started playing around. There are at least two software programs that work for me in openwrt kamikaze 8.09
owserver
I installed the package owserver with the opkg command line tool
opkg -d usb install owserver
When the package [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="1-wire usb adapater" src="http://www.hobby-boards.com/catalog/images/ds9490r-a.jpg" alt="" width="100" height="80" />After installing misterhouse on my openwrt router I started adding devices. I plugged a 1-wire usb interface into my router and started playing around. There are at least two software programs that work for me in openwrt kamikaze 8.09<span id="more-153"></span></p>
<h2>owserver</h2>
<p>I installed the package owserver with the opkg command line tool</p>
<p class="textbox">opkg -d usb install owserver</p>
<p>When the package was installed i started the owserver.</p>
<p class="textbox">owserver &#8211; u -p 5555</p>
<p>On my desktop running ubuntu I installed owfs</p>
<p class="textbox">sudo apt-get install owfs</p>
<p>which is the client for the owserver program and will create a filesystem whit all the sensors data.</p>
<p class="textbox">sudo mkdir /mnt/ow<br />
sudo owfs -s 192.168.1.1:5555 /mnt/ow</p>
<p>Works like a charm for me</p>
<p class="textbox">drwxr-xr-x  1 root root    8 2009-03-16 21:28 .<br />
drwxr-xr-x 22 root root 4096 2009-02-23 21:16 ..<br />
drwxrwxrwx  1 root root    8 2009-03-19 15:59 10.096994010800<br />
drwxrwxrwx  1 root root    8 2009-03-19 15:59 10.585394010800<br />
drwxrwxrwx  1 root root    8 2009-03-19 15:59 10.6A6E94010800<br />
drwxrwxrwx  1 root root    8 2009-03-19 15:59 10.A09B94010800<br />
drwxrwxrwx  1 root root    8 2009-03-19 15:59 10.A77594010800<br />
drwxrwxrwx  1 root root    8 2009-03-19 15:59 10.F77094010800<br />
drwxrwxrwx  1 root root    8 2009-03-19 15:59 81.E74C2A000000<br />
drwxr-xr-x  1 root root    8 2009-03-16 21:28 bus.0<br />
drwxr-xr-x  1 root root    8 2009-03-16 21:28 settings<br />
drwxr-xr-x  1 root root    8 2009-03-16 21:28 statistics<br />
drwxr-xr-x  1 root root   30 2009-03-16 21:28 structure<br />
drwxr-xr-x  1 root root    8 2009-03-16 21:28 system<br />
drwxr-xr-x  1 root root    8 2009-03-16 21:28 uncached</p>
<p>Nice if you need to share your 1-wire data over the network but what i want is to have my temperature sensors values available in misterhouse that runs on the router as well.<br />
So let&#8217;s go on to the next solution.</p>
<h2>digitemp</h2>
<p>Digitemp is another command line tool to interface a 1-wire network. To install type</p>
<p class="textbox">opkg -d usb install digitemp</p>
<p>Let&#8217;s do a first test :</p>
<p class="textbox">root@OpenWrt:~# digitemp_DS2490 -w<br />
DigiTemp v3.5.0 Copyright 1996-2007 by Brian C. Lane<br />
GNU Public License v2.0 &#8211; http://www.digitemp.com<br />
Found DS2490 device #1 at 003/004<br />
Turning off all DS2409 Couplers<br />
&#8230;&#8230;.<br />
Devices on the Main LAN<br />
10A09B9401080052 : DS1820/DS18S20/DS1920 Temperature Sensor<br />
105853940108009D : DS1820/DS18S20/DS1920 Temperature Sensor<br />
106A6E9401080076 : DS1820/DS18S20/DS1920 Temperature Sensor<br />
10096994010800BD : DS1820/DS18S20/DS1920 Temperature Sensor<br />
10A77594010800AF : DS1820/DS18S20/DS1920 Temperature Sensor<br />
10F7709401080053 : DS1820/DS18S20/DS1920 Temperature Sensor<br />
81E74C2A000000A5 : Unknown Family Code</p>
<p>That&#8217;s good ! Next create a conf file.</p>
<p class="textbox">digitemp -i</p>
<p> Now you can read a value like this
<p class="textbox">digitemp_DS2490 -t 2 -q -c /root/.digitemprc<br />
Feb 08 22:09:23 Sensor 2 C: 21.00 F: 69.80</p>
<p>All that we need now is some perl code to read the sensors values and store them in a misterhouse variable. I came up with the following code.</p>
<p class="textbox">use vars &#8216;$tempsensor1&#8242;;<br />
if ($New_Minute){<br />
$_=`digitemp_DS2490 -t 5 -q -c /root/.digitemprc`;<br />
/\sC:\s(.*)\sF/;<br />
$tempsensor1 = $1;<br />
print_log &#8220;Temperatuur is nu $tempsensor1&#8243;;<br />
}
</p>
<p>This is just some test code but it proofs that it works so I am happy for now.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.export.be/2009/03/1-wire-usb-interface-and-misterhouse-glue/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to install misterhouse on openwrt kamikaze 8.09</title>
		<link>http://blog.export.be/2009/03/how-to-install-misterhouse-on-openwrt-kamikaze-809/</link>
		<comments>http://blog.export.be/2009/03/how-to-install-misterhouse-on-openwrt-kamikaze-809/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 14:52:32 +0000</pubDate>
		<dc:creator>nixo</dc:creator>
				<category><![CDATA[misterhouse]]></category>
		<category><![CDATA[openwrt]]></category>

		<guid isPermaLink="false">http://blog.export.be/?p=115</guid>
		<description><![CDATA[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&#8217;t have openwrt already running on your hardware first follow my guide to install openwrt with USB media for extra [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="misterhouse logo" src="http://misterhouse.sourceforge.net/mh_logo.gif" alt="" width="99" height="97" />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&#8217;t have openwrt already running on your hardware first follow <a title="install openwrt 8.09 on asus WL-500g deluxe with USB media for extra space" href="http://blog.export.be/?p=70" target="_self">my guide to install openwrt with USB media for extra space.</a></p>
<p>The first step is to install perl and all the modules misterhouse need . <span id="more-115"></span>Install following packages with the opkg command</p>
<p class="textbox">opkg install packagename</p>
<p>perl<br />
perlbase-autoloader<br />
perlbase-base<br />
perlbase-bytes<br />
perlbase-config<br />
perlbase-cwd<br />
perlbase-data<br />
perlbase-db-file<br />
perlbase-errno<br />
perlbase-essential<br />
perlbase-fcntl<br />
perlbase-file<br />
perlbase-filehandle<br />
perlbase-getopt<br />
perlbase-integer<br />
perlbase-io<br />
perlbase-posix<br />
perlbase-re<br />
perlbase-selectsaver<br />
perlbase-socket<br />
perlbase-symbol<br />
perlbase-term<br />
perlbase-text<br />
perlbase-time<br />
perlbase-xsloader<br />
perlbase-sys<br />
perlbase-encode<br />
perlbase-universal<br />
perlbase-net<br />
perlbase-filehandle</p>
<p>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.</p>
<p class="textbox">cd /mnt/usb<br />
wget http://prdownloads.sourceforge.net/misterhouse/misterhouse-2.105.tar.gz<br />
tar xzvf misterhouse-2.105.tar.gz .</p>
<p>Now you have a directory /mnt/usb/mh<br />
As a first test you can try to run misterhouse to see if all perl packages  needed are installed and working.</p>
<p class="textbox">cd /mnt/usb/mh/bin<br />
./mhl</p>
<p>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 &#8220;PM: Saving object states &#8230; done&#8221; 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.<br />
The next step is to create your own code files and to alter the misterhouse configuration file for your needs. This is explained on <a title="Misterhouse documentation" href="http://misterhouse.sourceforge.net/mh.html" target="_blank">the misterhouse homepage</a> or in the docs section of your misterhouse install directory .<br />
A first step could be to disable TK and GD code by adding the following lines to your mh.private.ini file</p>
<p class="textbox">tk=0<br />
gd=0</p>
<p>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.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.export.be/2009/03/how-to-install-misterhouse-on-openwrt-kamikaze-809/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>install openwrt 8.09 on asus WL-500g deluxe with usb media for extra space</title>
		<link>http://blog.export.be/2009/03/install-openwrt-809-on-asus-wl-500g-deluxe-with-usb-media-for-extra-space/</link>
		<comments>http://blog.export.be/2009/03/install-openwrt-809-on-asus-wl-500g-deluxe-with-usb-media-for-extra-space/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 20:44:44 +0000</pubDate>
		<dc:creator>nixo</dc:creator>
				<category><![CDATA[openwrt]]></category>

		<guid isPermaLink="false">http://blog.export.be/?p=70</guid>
		<description><![CDATA[Installing openwrt on your router is already well explained on the openwrt wiki This guide describes my experience with installing kamikaze 8.09 on my  router but it should work on other hardware too . I have the Asus WL-500g Deluxe and installed the latest openwrt image kamikaze 8.09
After installation make sure you setup your network [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="Asus Wl-500g deluxe" src="http://www.mk-stuff.de/artikel/openwrt_on_an_asus_wl-500g_deluxe/asus_wl-500g_deluxe.jpg" alt="" width="174" height="140" />Installing openwrt on your router is already well explained on the <a title="OpenWrt wiki" href="http://wiki.openwrt.org/" target="_blank">openwrt wiki</a> This guide describes my experience with installing kamikaze 8.09 on my  router but it should work on other hardware too . I have the <a title="install openwrt on the Asus WL-500g deluxe" href="http://wiki.openwrt.org/OpenWrtDocs/Hardware/Asus/WL500GD" target="_blank">Asus WL-500g Deluxe</a> and installed the latest openwrt image kamikaze 8.09<span id="more-70"></span><br />
After installation make sure you setup your network and enable ssh access. Just login to your router with telnet</p>
<p class="textbox">telnet 192.168.1.1</p>
<p>and type passwd</p>
<p class="textbox">passwd</p>
<p>this will set a password for the root user, disables telnet and enables ssh. After this you should always use ssh to access your router.</p>
<p>- add usb stick</p>
<p>The next step is to add some extra storage because my router only has 4 Mb flash on board. I use an USB memory stick for this, an USB hard drive  also works but uses more power. The first thing I do after logging in (with ssh this time)</p>
<p class="textbox">ssh 192.168.1.1</p>
<p>is updating the packages list with the package management tool &#8216;opkg&#8217;.</p>
<p class="textbox">opkg update</p>
<p>If the update fails your network is most likely not yet configured. You can point your browser to http://192.168.1.1 and fill in the settings under the network link or you can do it command line. With the command</p>
<p class="textbox">uci show network</p>
<p>you can check your settings. And with the following commands</p>
<p class="textbox">uci set network.lan.ipaddr=192.168.1.1<br />
uci set network.lan.netmask=255.255.255.0<br />
uci set network.lan.gateway=192.168.1.254<br />
uci set network.lan.dns=192.168.1.254</p>
<p>you can change your settings. Don&#8217;t forget</p>
<p class="textbox">uci commit</p>
<p>to activate your changes and to save them so they survive a reboot.</p>
<p>When your packages list is updated you are ready to start installing the packages needed to mount an USB memory stick or hard drive. On my asus WL-500g deluxe i installed the following packages :</p>
<p class="textbox">opkg install kmod-usb-storage kmod-usb2 kmod-fs-ext2</p>
<p>with the &#8216;dmesg&#8217; command you should now see your hardware in the kernel log.</p>
<p>From here I followed the <a title="OpenWrt wiki" href="http://wiki.openwrt.org/PackagesOnExternalMediaHowTo" target="_blank">Packages on external media</a> guide from the openwrt wiki to use my usb stick for extra package space. Below is a summary of my command line commands.</p>
<p class="textbox">mkdir -p /mnt/usb<br />
mount /dev/scsi/host0/bus0/target0/lun0/part1 /mnt/usb<br />
echo &#8216;mount  /dev/scsi/host0/bus0/target0/lun0/part1 /mnt/usb&#8217; &gt; /etc/init.d/externalmount<br />
chmod +x /etc/init.d/externalmount<br />
ln -s /etc/init.d/externalmount /etc/rc.d/S60externalmount</p>
<p>Also the following lines are added to /etc/opkg.conf and /etc/profile :<br />
Add</p>
<p class="textbox">dest usb /mnt/usb</p>
<p>to /etc/opkg.conf and</p>
<p class="textbox">export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/mnt/usb/bin:/mnt/usb/sbin:/mnt/usb/usr/bin:/mnt/usb/usr/sbin<br />
export LD_LIBRARY_PATH=/lib:/usr/lib:/mnt/usb/lib:/mnt/usb/usr/lib</p>
<p>to /etc/profile.</p>
<p>Reboot your router and check if your media is mounted under /mnt/usb .</p>
<p>If all went well you can start installing packages</p>
<p class="textbox">opkg -d usb install packagename</p>
<p class="textbox"><strong>Important remark !</strong><br />
Depending on how much space you have left on your routers flash you may receive errors like : <em>Only have 1016 available blocks on filesystem /mnt/usb/, pkg perl needs 1302</em> I believe this is because opkg looks at the needed disk space and checks your routers flash space and not the mounted usb media ! Even if you use the -force_space argument to the opkg command the package still fails to install. I found a dirty hack for this. Open the  <em>/var/opkg-lists/snapshots </em>file and search for the package you want to install. The next line that reads <em>Installed-Size: 1117718</em> for example describes how much space the package needs once installed. If you make this number smaller than the available space on your routers flash memory, the opkg program no longer complains and installs your package.</p>
<p>You now have a base system that you can use for hundreds of purposes.<br />
I will explain how i run misterhouse home automation software on my router in my next post.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.export.be/2009/03/install-openwrt-809-on-asus-wl-500g-deluxe-with-usb-media-for-extra-space/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
