<?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>Maartendamen&#039;s blog</title>
	<atom:link href="http://www.maartendamen.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.maartendamen.com</link>
	<description>Blogging on various IT subjects</description>
	<lastBuildDate>Tue, 22 Nov 2011 21:27:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>My home server setup part 1: basic setup and hardware</title>
		<link>http://www.maartendamen.com/2011/11/my-home-server-setup-part-1-basic-setup-and-hardware/</link>
		<comments>http://www.maartendamen.com/2011/11/my-home-server-setup-part-1-basic-setup-and-hardware/#comments</comments>
		<pubDate>Thu, 10 Nov 2011 16:28:55 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[Others]]></category>
		<category><![CDATA[corei3]]></category>
		<category><![CDATA[esxi]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[home]]></category>
		<category><![CDATA[homeserver]]></category>
		<category><![CDATA[hypervisor]]></category>
		<category><![CDATA[intel]]></category>
		<category><![CDATA[kingston]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[ssd]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.maartendamen.com/?p=1064</guid>
		<description><![CDATA[I have been running on a new home server setup for a little over a year right now. I am very satisfied with the setup and I figured it might be of interest to others out there. So, in a few blog posts I will explain my complete setup (from hardware to backup). Let&#8217;s start [...]]]></description>
			<content:encoded><![CDATA[<p>I have been running on a new home server setup for a little over a year right now. I am very satisfied with the setup and I figured it might be of interest to others out there.<br />
So, in a few blog posts I will explain my complete setup (from hardware to backup).<br />
Let&#8217;s start of with the hardware used in my home server, nothing fancy really:</p>
<p>Motherboard: Intel Desktop Board DH55TC<br />
CPU: Intel Core I3 530 2,93Ghz<br />
Memory: OCZ Gold Low Voltage OCZ3G1333LV4GK (8GB)<br />
Harddisk 1: Kingston SSDNow SNV425-S2BN/64GB<br />
Harddisk 2: 500GB Western Digital Green</p>
<p>All of the hardware is housed in a small desktop enclosure (as shown on the picture)</p>
<p><a href="http://www.maartendamen.com/2011/11/my-home-server-setup-part-1-basic-setup-and-hardware/antec/" rel="attachment wp-att-1076"><img src="http://www.maartendamen.com/wp-content/uploads/2011/11/antec.jpg" alt="" title="antec" width="400" height="400" class="aligncenter size-full wp-image-1076" /></a><br />
<span id="more-1064"></span><br />
<strong>Hypervisor/Virtualization</strong><br />
With the initial setup of my home server I started with a Windows 2008 R2 installation, with Hyper-V on top.<br />
After running on this system for about 2 months, I really couldn&#8217;t overcome the lack of USB passthrough in Hyper-V. A lot of domotica interfaces use USB, so I couldn&#8217;t use them within virtual machines.<br />
I could off course still run my home automation software on the host (Windows 2008 R2), but this has a downside on the flexibility side. I just want my home automation software within a VM so it can be easily moved around to different hardware in case my server crashes.<br />
This is where VMware ESXi comes to the rescue! ESXi does offer USB passthrough, it works very convenient. You can just plugin USB devices to the host and then add them to a Virtual Machine as hardware.<br />
Here&#8217;s an example of a few interfaces connected to my home automation VM:</p>
<p><a href="http://www.maartendamen.com/2011/11/my-home-server-setup-part-1-basic-setup-and-hardware/vmware_usb/" rel="attachment wp-att-1065"><img src="http://www.maartendamen.com/wp-content/uploads/2011/11/vmware_usb.png" alt="" title="vmware_usb" width="547" height="258" class="alignnone size-full wp-image-1065" /></a></p>
<p>VMware ESXi (5.0) is offered for free with a few limitations:</p>
<p>- You can use a maximum of 32GB<br />
- You can use only one processor (with unlimited amount of cores)</p>
<p>Both limitations are not a big problem for my home server setup. More information about VMware ESXi editions can be found <a href="http://www.vmware.com/vmwarestore/vsphere_purchaseoptions.html">here</a>.</p>
<p><strong>Virtual machines</strong></p>
<p>I run quite a few VM&#8217;s on my home server, here&#8217;s a list:</p>
<p>- One Linux (Debian 6.0) machine running my home automation software (HouseAgent).<br />
- One OSX Lion machine, for testing purposes (basically to test HouseAgent on OSX)<br />
- Two Windows servers for general purpose (file sharing etc.)<br />
- One Windows 7 Virtual Machine for general purpose and testing<br />
- I also have some VM&#8217;s that are in the &#8220;Off&#8221; state but are sometimes powered on for testing, such a System Center Operations Manager (SCOM) test environment.</p>
<p>I hear you asking, OSX on ESXi? But isn&#8217;t that unsupported? Yes, it&#8217;s indeed unsupported but thanks to the ESXi unlocker for OSX this is now possible. The unlocker can be downloaded <a href="http://www.insanelymac.com/forum/index.php?showtopic=267339">here</a>. It runs very smooth with VMware tools installed.</p>
<p>So there you have it: three platforms (Linux, Windows and OSX) on one single server! Something I was looking for, for quite a while.. </p>
<p><em>Disk layout</em><br />
All VM&#8217;s use more or less the same disk layout. The OS disks are created on the SSD disk, whereas the data disks are created on the Western Digital disk.<br />
My home automation is entirely created on the SSD, for optimal performance. </p>
<p><em>Performance</em><br />
So what about performance? Well, even with 5 VM&#8217;s located on this hardware it still runs very smooth. Most of the time the VM&#8217;s are idle anyway.<br />
CPU usage is around 15% on average. Memory usage is 7GB out of 8GB. </p>
<p>This concludes the first part of these blog series, I hope you enjoyed it so far. In the next post we&#8217;ll dive into the backup methods I use for my home server.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maartendamen.com/2011/11/my-home-server-setup-part-1-basic-setup-and-hardware/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Stupid spammers</title>
		<link>http://www.maartendamen.com/2011/10/stupid-spammers/</link>
		<comments>http://www.maartendamen.com/2011/10/stupid-spammers/#comments</comments>
		<pubDate>Mon, 24 Oct 2011 20:21:29 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[Others]]></category>
		<category><![CDATA[anti-spam]]></category>
		<category><![CDATA[spammer]]></category>
		<category><![CDATA[stupid]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.maartendamen.com/?p=1051</guid>
		<description><![CDATA[Everyone that runs a weblog has to deal with them: spammers! I installed all sorts of counter measures to prevent spam, but every now and then one or two messages get through. This week I had a spam message that made me smile, obviously this wasn&#8217;t the most intelligent spammer and coder of them all: [...]]]></description>
			<content:encoded><![CDATA[<p>Everyone that runs a weblog has to deal with them: spammers!<br />
I installed all sorts of counter measures to prevent spam, but every now and then one or two messages get through.<br />
This week I had a spam message that made me smile, obviously this wasn&#8217;t the most intelligent spammer and coder of them all:</p>
<p><a href="http://www.maartendamen.com/2011/10/stupid-spammers/stupid_spammer-2/" rel="attachment wp-att-1055"><img src="http://www.maartendamen.com/wp-content/uploads/2011/10/stupid_spammer1.png" alt="" title="stupid_spammer" width="601" height="114" class="alignnone size-full wp-image-1055" /></a></p>
<p>I think his/her spambot had to a pick a random word from those lists, but somehow it failed :-)<br />
So, here&#8217;s a lesson.. if you do things like this, do them right and properly!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maartendamen.com/2011/10/stupid-spammers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programming and debugging an ATtiny85 using USBTinyISP and an USB-BUB</title>
		<link>http://www.maartendamen.com/2011/10/programming-and-debugging-an-attiny85-using-usbtinyisp-and-an-usb-bub/</link>
		<comments>http://www.maartendamen.com/2011/10/programming-and-debugging-an-attiny85-using-usbtinyisp-and-an-usb-bub/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 18:29:49 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[arduino-tiny]]></category>
		<category><![CDATA[attiny]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[isp]]></category>
		<category><![CDATA[programmer]]></category>
		<category><![CDATA[usbtinyisp]]></category>

		<guid isPermaLink="false">http://www.maartendamen.com/?p=994</guid>
		<description><![CDATA[I have been working a bit on hardware again lately, and I am currently playing around with ATtiny micro controllers These tiny little buggers have 8 pins, out of these pins a maximum of 6 I/O pins can be used (you would have to re-purpose the reset pin for 6th I/O pin, which is a [...]]]></description>
			<content:encoded><![CDATA[<p>I have been working a bit on hardware again lately, and I am currently playing around with ATtiny micro controllers<br />
These tiny little buggers have 8 pins, out of these pins a maximum of 6 I/O pins can be used (you would have to re-purpose the reset pin for 6th I/O pin, which is a very bad idea! This basically makes the chip unprogrammable from an ISP. So just stick with 5 I/O pins.). Some other specs of this of this MCU:</p>
<p>- 8Kb flash (yes, space does matter!)<br />
- 0.5Kb SRAM<br />
- Maximum operating frequency (20Mhz, using an external crystal)</p>
<p>Here&#8217;s a picture of this MCU:</p>
<p><a href="http://www.maartendamen.com/2011/10/programming-and-debugging-an-attiny85-using-usbtinyisp-and-an-usb-bub/attiny85_900/" rel="attachment wp-att-995"><img src="http://www.maartendamen.com/wp-content/uploads/2011/10/ATtiny85_900-150x150.jpg" alt="" title="ATtiny85_900" width="150" height="150" class="alignnone size-thumbnail wp-image-995" /></a><br />
<span id="more-994"></span><br />
To program this MCU you have to use an ISP (In System Programmer) programmer. I own an <a href="http://www.ladyada.net/make/usbtinyisp/">USBTinyISP </a> produced by Adafruit, which is perfect for this job. There is a minor drawback though: the ATtiny chips are not supported out of the box within the Arduino IDE. However, there is a perfect open source library by the name of <a href="http://code.google.com/p/arduino-tiny/">arduino-tiny</a> available to support this MCU within the Arduino IDE. </p>
<p>Here&#8217;s a picture of my test setup with the USBTinyISP (on the right) connected:</p>
<p><a href="http://www.maartendamen.com/2011/10/programming-and-debugging-an-attiny85-using-usbtinyisp-and-an-usb-bub/img_20111019_233422/" rel="attachment wp-att-1000"><img src="http://www.maartendamen.com/wp-content/uploads/2011/10/IMG_20111019_233422-620x463.jpg" alt="" title="IMG_20111019_233422" width="620" height="463" class="alignnone size-medium wp-image-1000" /></a></p>
<p>The pins are connected as follows: </p>
<ul>
<li>ATtiny Pin 2 to USBTinyISP SCK</li>
<li>ATtiny Pin 1 to USBTinyISP MISO</li>
<li>ATtiny Pin 0 to USBTinyISP MOSI</li>
<li>ATtiny RST pin to USBTinyISP RESET</li>
</ul>
<p>After getting the connections right, I started my first programming attempt. The test sketch blink, which is the &#8220;hello world&#8221; for MCU&#8217;s compiled correctly but then: </p>
<p><a href="http://www.maartendamen.com/2011/10/programming-and-debugging-an-attiny85-using-usbtinyisp-and-an-usb-bub/20-10-2011-0-07-13/" rel="attachment wp-att-1005"><img src="http://www.maartendamen.com/wp-content/uploads/2011/10/20-10-2011-0-07-13-523x600.png" alt="" title="20-10-2011 0-07-13" width="523" height="600" class="alignnone size-medium wp-image-1005" /></a></p>
<p>Hmm, nasty java exception there. After some digging around I figured out the incorrect programmer was getting addressed in the boards.txt file coming with the arduino-tiny project. This file is located under in the Arduino hardware/tiny/ folder. In order to make it work with the USBTinyISP, you have to change the following line for each target board (the ATtiny85 at 1mhz is illustrated here):</p>
<p><code>attiny85at1.upload.using=pololu</code></p>
<p>Into the following:</p>
<p><code>attiny85at1.upload.using=arduino:usbtinyisp</code></p>
<p>After restarting the IDE, I was able to program the sketch!</p>
<p><strong>Debugging</strong></p>
<p>For standard Arduino&#8217;s, you can use a  built in serial interface to debug. There is no such thing available for ATtiny chips. However, the arduino-tiny library does offer a debug interface. I used the USB-BUB from Modern Device to setup a debug interface. For the ATtiny85 the standard arduino-tiny debug interface is tied to PB3 of the ATtiny.<br />
Once setup, you can use the regular Serial.begin() and Serial.print/println() functions. I connected PB3 to the RX pin of the USB-bub, off course there&#8217;s also a ground connection required so I connected the GND of the USB-BUB to the GND of my ATtiny. After that I was ready to start debugging&#8230;</p>
<p>So, here we go.. ready to start tinkering!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maartendamen.com/2011/10/programming-and-debugging-an-attiny85-using-usbtinyisp-and-an-usb-bub/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Byebye RabbitMQ, hello 0MQ!</title>
		<link>http://www.maartendamen.com/2011/10/byebye-rabbitmq-hello-0mq/</link>
		<comments>http://www.maartendamen.com/2011/10/byebye-rabbitmq-hello-0mq/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 21:05:14 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[HouseAgent]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[broker]]></category>
		<category><![CDATA[brokerless]]></category>
		<category><![CDATA[zeromq]]></category>

		<guid isPermaLink="false">http://www.maartendamen.com/?p=957</guid>
		<description><![CDATA[The core architecture of HouseAgent is build around a messaging system known as RabbitMQ. This worked out fine so far, however during development we discovered a major drawback of RabbitMQ. RabbitMQ uses Erlang, which is a 70MB download.. *yikes*. In the future I want to be able to run HouseAgent on low memory platforms: for [...]]]></description>
			<content:encoded><![CDATA[<p>The core architecture of HouseAgent is build around a messaging system known as RabbitMQ. This worked out fine so far, however during development we discovered a major drawback of RabbitMQ.<br />
RabbitMQ uses Erlang, which is a 70MB download.. *yikes*. In the future I want to be able to run HouseAgent on low memory platforms: for example routers/NAS devices etc. Most of these devices have a maximum of 16MB flash. RabbitMQ is just no option in those scenarios. </p>
<p>Looking for alternatives <a href="http://www.zeromq.org/">ZeroMQ</a> caught my eye. A major difference is that ZeroMQ uses a brokerless design whereas RabbitMQ uses a broker based design.<br />
Let&#8217;s have a look at both designs: </p>
<p><a href="http://www.maartendamen.com/2011/10/byebye-rabbitmq-hello-0mq/houseagent_architecture/" rel="attachment wp-att-959"><img src="http://www.maartendamen.com/wp-content/uploads/2011/10/houseagent_architecture.png" alt="" title="houseagent_architecture" width="400" height="325" class="aligncenter size-full wp-image-959" /></a><br />
<center><em>Old HouseAgent architecture based on RabbitMQ</em></center></p>
<p><span id="more-957"></span><br />
<br />
<a href="http://www.maartendamen.com/2011/10/byebye-rabbitmq-hello-0mq/houseagent_architecture_new/" rel="attachment wp-att-960"><img src="http://www.maartendamen.com/wp-content/uploads/2011/10/houseagent_architecture_new.png" alt="" title="houseagent_architecture_new" width="457" height="249" class="aligncenter size-full wp-image-960" /></a><br />
<center><em>New HouseAgent architecture based on ZeroMQ</em></center></p>
<p>As you can see, there is a major change in architecture. However because we use a central &#8220;coordinator&#8221; already, that coordinator took over the role of &#8220;broker&#8221; role as well.<br />
This way the change to ZeroMQ has minimal impact on plugins, or the way HouseAgent works in general. This architecture leaves some space for future high availability/failover scenarios, by implementing a second &#8220;coordinator&#8221;. I don&#8217;t want this post to become a RabbitMQ vs ZeroMQ comparison (just Google if you are looking for that), but I did want to point out this essential change. </p>
<p>So let&#8217;s look at the size of ZeroMQ. The size of ZeroMQ is a lot less (being c/c++), the shared library is 1.6MB and can probably be stripped down quite a bit by removing unused features. 70MB-1.6MB = 68,4MB space saving!</p>
<p>The code to implement ZeroMQ is available on Github right now, in the branch &#8220;zeromq&#8221;. In an upcoming blog post I will post a developers update, to adjust existing plugins so they work with the new system (the changes are minimal, promised!)</p>
<p>Feedback on the new architecture and code is greatly appreciated!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maartendamen.com/2011/10/byebye-rabbitmq-hello-0mq/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Disable firewall on ESXi</title>
		<link>http://www.maartendamen.com/2011/10/disable-firewall-on-esxi/</link>
		<comments>http://www.maartendamen.com/2011/10/disable-firewall-on-esxi/#comments</comments>
		<pubDate>Mon, 10 Oct 2011 17:36:56 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[VMware vSphere]]></category>
		<category><![CDATA[disable]]></category>
		<category><![CDATA[esxi]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[howto]]></category>

		<guid isPermaLink="false">http://www.maartendamen.com/?p=943</guid>
		<description><![CDATA[I didn&#8217;t have a lot of time for blogging lately but here&#8217;s just a quick tip (I am currently working hard on HouseAgent behind the scenes!) Sometimes it&#8217;s handy to disable the ESXi host firewall for some quick troubleshooting. Here&#8217;s how to accomplish that: After you have done your testing, please make sure you re-enable [...]]]></description>
			<content:encoded><![CDATA[<p>I didn&#8217;t have a lot of time for blogging lately but here&#8217;s just a quick tip (I am currently working hard on HouseAgent behind the scenes!)<br />
Sometimes it&#8217;s handy to disable the ESXi host firewall for some quick troubleshooting. Here&#8217;s how to accomplish that:</p>
<p><a href="http://www.maartendamen.com/2011/10/disable-firewall-on-esxi/10-10-2011-19-29-03/" rel="attachment wp-att-944"><img src="http://www.maartendamen.com/wp-content/uploads/2011/10/10-10-2011-19-29-03.png" alt="" title="10-10-2011 19-29-03" width="399" height="62" class="alignnone size-full wp-image-944" /></a></p>
<p>After you have done your testing, please make sure you re-enable your firewall. As it is a good practice to always have it enabled. Here&#8217;s how to re-enable it:</p>
<p><a href="http://www.maartendamen.com/2011/10/disable-firewall-on-esxi/10-10-2011-19-34-27/" rel="attachment wp-att-945"><img src="http://www.maartendamen.com/wp-content/uploads/2011/10/10-10-2011-19-34-27.png" alt="" title="10-10-2011 19-34-27" width="396" height="87" class="alignnone size-full wp-image-945" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.maartendamen.com/2011/10/disable-firewall-on-esxi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing HouseAgent on Linux</title>
		<link>http://www.maartendamen.com/2011/07/installing-houseagent-on-linux/</link>
		<comments>http://www.maartendamen.com/2011/07/installing-houseagent-on-linux/#comments</comments>
		<pubDate>Wed, 13 Jul 2011 18:00:33 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[HouseAgent]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.maartendamen.com/?p=912</guid>
		<description><![CDATA[Following up on yesterday&#8217;s post, here are the instructions to install HouseAgent on Linux. I took one of the most popular Linux distribution&#8217;s (Ubuntu) for this blog post, but it should be easy to apply this guide for other distributions as well. Step 1: installing HouseAgent prerequisites The first step is to install the HouseAgent [...]]]></description>
			<content:encoded><![CDATA[<p>Following up on yesterday&#8217;s post, here are the instructions to install HouseAgent on Linux.<br />
I took one of the most popular Linux distribution&#8217;s (Ubuntu) for this blog post, but it should be easy to apply this guide for other distributions as well.</p>
<p><strong>Step 1: installing HouseAgent prerequisites</strong></p>
<p>The first step is to install the HouseAgent prerequisites, there are two (Erlang and RabbitMQ) but you can install them using a single command line.<br />
Start the terminal in Ubuntu:</p>
<p><a href="http://www.maartendamen.com/2011/07/installing-houseagent-on-linux/start_terminal/" rel="attachment wp-att-913"><img src="http://www.maartendamen.com/wp-content/uploads/2011/07/start_terminal.png" alt="" title="start_terminal" width="434" height="230" class="size-full wp-image-913" /></a></p>
<p>Now enter the following command:</p>
<p><a href="http://www.maartendamen.com/2011/07/installing-houseagent-on-linux/rabbitmq/" rel="attachment wp-att-914"><img src="http://www.maartendamen.com/wp-content/uploads/2011/07/rabbitmq-620x407.png" alt="" title="rabbitmq" width="620" height="407" class="alignnone size-medium wp-image-914" /></a><br />
<span id="more-912"></span><br />
Hit &#8220;Y&#8221; to continue the installation. </p>
<p><strong>Step 2: Installing HouseAgent</strong></p>
<p>Download &#8220;HouseAgent.tar.gz&#8221; from the HouseAgent forum pages, and put it in a location of your liking. I chose HouseAgent in my home directory.<br />
Now extract HouseAgent:</p>
<p><a href="http://www.maartendamen.com/2011/07/installing-houseagent-on-linux/untar2/" rel="attachment wp-att-933"><img src="http://www.maartendamen.com/wp-content/uploads/2011/07/untar2-620x494.png" alt="" title="untar2" width="620" height="494" class="alignnone size-medium wp-image-933" /></a></p>
<p>After extracting you need to copy the configuration file to /etc, you can do this with the following command line (you need to sudo this): </p>
<p><a href="http://www.maartendamen.com/2011/07/installing-houseagent-on-linux/config_file/" rel="attachment wp-att-934"><img src="http://www.maartendamen.com/wp-content/uploads/2011/07/config_file-620x134.png" alt="" title="config_file" width="620" height="134" class="alignnone size-medium wp-image-934" /></a></p>
<p><strong>Step 3: Starting HouseAgent</strong></p>
<p>You are now ready to start HouseAgent. You can do this by running: &#8220;./Houseagent&#8221; :</p>
<p><a href="http://www.maartendamen.com/2011/07/installing-houseagent-on-linux/start_ha/" rel="attachment wp-att-923"><img src="http://www.maartendamen.com/wp-content/uploads/2011/07/start_ha-620x490.png" alt="" title="start_ha" width="620" height="490" class="alignnone size-medium wp-image-923" /></a></p>
<p>After HouseAgent has been started, point your browser to http://localhost:8080:</p>
<p><a href="http://www.maartendamen.com/2011/07/installing-houseagent-on-linux/ha_browser/" rel="attachment wp-att-926"><img src="http://www.maartendamen.com/wp-content/uploads/2011/07/ha_browser.png" alt="" title="ha_browser" width="564" height="452" class="alignnone size-full wp-image-926" /></a></p>
<p>Congratulations, you have successfully installed HouseAgent! In tomorrow&#8217;s blog post we will look into installing the first plug-in in order to make HouseAgent actually useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maartendamen.com/2011/07/installing-houseagent-on-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing HouseAgent on Windows</title>
		<link>http://www.maartendamen.com/2011/07/installing-houseagent-on-windows/</link>
		<comments>http://www.maartendamen.com/2011/07/installing-houseagent-on-windows/#comments</comments>
		<pubDate>Tue, 12 Jul 2011 18:05:23 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[HouseAgent]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[domotica]]></category>
		<category><![CDATA[erlang]]></category>
		<category><![CDATA[housagent]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[rabbitmq]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.maartendamen.com/?p=886</guid>
		<description><![CDATA[It has been two weeks ago since I released the first (private) beta version of HouseAgent. A handful of people starting testing and playing with it, and I noticed that documentation and instructions are lacking a bit. In this blog post I will guide you through the process (in very basic steps) of installing the [...]]]></description>
			<content:encoded><![CDATA[<p>It has been two weeks ago since I released the first (private) beta version of HouseAgent. A handful of people starting testing and playing with it, and I noticed that documentation and instructions are lacking a bit.<br />
In this blog post I will guide you through the process (in very basic steps) of installing the core of HouseAgent. The good news is, that this will get core of HouseAgent up and running. The bad news is that you can&#8217;t do anything with, not without plug-ins at least. I will dive into the subject of installing plug-ins in another blog post.</p>
<p><strong>Step 1: installation of RabbitMQ (and Erlang)</strong></p>
<p>RabbitMQ is the message broker required by HouseAgent, you can download it from <a href="http://www.rabbitmq.com/server.html">here</a>.<br />
You need the server with Windows installer:</p>
<p><a href="http://www.maartendamen.com/2011/07/installing-houseagent-on-windows/download_rabbitmq/" rel="attachment wp-att-889"><img src="http://www.maartendamen.com/wp-content/uploads/2011/07/download_rabbitmq-620x277.png" alt="" title="download_rabbitmq" width="620" height="277" class="aligncenter size-medium wp-image-889" /></a></p>
<p>After you have started the RabbitMQ setup, it will alert you that you also need Erlang:<br />
<span id="more-886"></span><br />
<a href="http://www.maartendamen.com/2011/07/installing-houseagent-on-windows/erlang/" rel="attachment wp-att-897"><img src="http://www.maartendamen.com/wp-content/uploads/2011/07/erlang.png" alt="" title="erlang" width="492" height="176" class="size-full wp-image-897" /></a></p>
<p>Go ahead and download and install the latest Erlang version, choose the Windows binary form:</p>
<p><a href="http://www.maartendamen.com/2011/07/installing-houseagent-on-windows/erlang2/" rel="attachment wp-att-898"><img src="http://www.maartendamen.com/wp-content/uploads/2011/07/erlang2.png" alt="" title="erlang2" width="331" height="193" class="size-full wp-image-898" /></a></p>
<p>Now complete the installation of both Erlang and RabbitMQ, the default settings will suffice.<br />
<strong><br />
Step 2: Installation of HouseAgent</strong></p>
<p>Download the latest beta release from the HouseAgent forum. And start the HouseAgent installation.<br />
It&#8217;s an easy next->next->finish installation.</p>
<p><strong>Step 3: Enjoy HouseAgent<br />
</strong><br />
Congratulations! You should now be ready to use HouseAgent!<br />
There&#8217;s a HouseAgent start menu group in the start menu to get you going.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maartendamen.com/2011/07/installing-houseagent-on-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HouseAgent: plug-ins</title>
		<link>http://www.maartendamen.com/2011/06/houseagent-plug-ins/</link>
		<comments>http://www.maartendamen.com/2011/06/houseagent-plug-ins/#comments</comments>
		<pubDate>Wed, 15 Jun 2011 18:00:57 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[HouseAgent]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[mako]]></category>
		<category><![CDATA[plug-ins]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.maartendamen.com/?p=820</guid>
		<description><![CDATA[Yesterday&#8217;s post introduced HouseAgent. In today&#8217;s post we will dive deeper into HouseAgent plug-ins and their architecture. HouseAgent plug-ins can be programmed in any language, but Python is by far the preferred language for plug-ins. The previous post mentioned that a plug-in is a completely isolated component in the HouseAgent network. While this is true [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday&#8217;s post introduced HouseAgent. In today&#8217;s post we will dive deeper into HouseAgent plug-ins and their architecture. HouseAgent plug-ins can be programmed in any language, but Python is by far the preferred language for plug-ins.<br />
The previous post mentioned that a plug-in is a completely isolated component in the HouseAgent network. While this is true for the plug-in itself, it doesn&#8217;t apply to the plug-ins GUI pages. These GUI pages hook into the coordinator directly.<br />
Inside the plug-in you have total freedom of what you want to do with it, do you want to talk to a serial port? No problem. Do you want to fetch a website and report those values? No problem either. Maybe you want to read out a certain file generated by another program? Guess what..<br />
Although you have total freedom of what happens inside the plug-in, there are certain rules to stick to when it comes to reporting to the broker. This is required for other components to understand the messages send by your plug-in. To provide the plug-in developer with an easy way to interact with the broker and use certain standardized messages (value updates, power on commands etc.) HouseAgent provides a plug-in API.<br />
<span id="more-820"></span><br />
<strong>Plug-in API</strong><br />
Let&#8217;s look at some basic usage of the plug-in API. Creating a basic plug-in connection to the broker is an easy, 2 line process.</p>
<pre class="brush: python; title: ; notranslate">
from plugins.pluginapi import PluginAPI

pluginapi = PluginAPI('922d6504-b58f-4d9a-b6eb-870aa06f2d00', 'TestPlugin')
</pre>
<p>The first argument is a unique GUID for the plug-in, a GUID can be created in the coordinator web interface:</p>
<p><a href="http://www.maartendamen.com/2011/06/houseagent-plug-ins/register_plugin/" rel="attachment wp-att-833"><img src="http://www.maartendamen.com/wp-content/uploads/2011/06/register_plugin.png" alt="" title="register_plugin" width="524" height="229" class="aligncenter size-full wp-image-833" /></a></p>
<p>The second argument is a plug-in type, this type can be used to identify plug-ins of the same kind. Optionally you can supply the following arguments:</p>
<ul>
<li>broker_ip (default: &#8217;127.0.0.1&#8242;) </li>
<li>broker_port (default: 5672)</li>
<li>username (default: &#8216;guest&#8217;)</li>
<li>password (default: &#8216;guest&#8217;)</li>
<li>vhost (default: &#8216;/&#8217;)</li>
</ul>
<p>These arguments are useful when you want to connect to a RabbitMQ broker other then on the localhost (yes, you could connect to a broker based in Sydney from Amsterdam!), or you could use different credentials for example. Of course you are not limited to setting up one plug-in connection, you could connect to multiple brokers for use in high availability scenario&#8217;s.<br />
After you are connected to the broker you can use some built-in API commands to send data to the broker. Here is an value update example taken from one of the plug-ins I developed:</p>
<pre class="brush: python; title: ; notranslate">
            values = {'Light': str(light), 'Humidity': str(humidity),
                      'Temperature': str(temperature), 'Motion': str(motion), 'Battery': str(battery)}

            pluginapi.value_update(node_id, values)
</pre>
<p>As you can see, you can supply an dictionary Python object with an unlimited number of values. What you do need to supply is the node address, this is an unique value to identify a device. A device is identified in the database based up-on a plug-in ID (which is the GUID) and a device address (which could be node number 1, 2, 3). The plug-in API also allows you to register to certain events, one example would be the power_on command (i.e. turn on a lamp module). Here is a basic registration, and callback function for the power_on command: </p>
<pre class="brush: python; title: ; notranslate">
# Register ourselves to receive power-on callbacks
pluginapi.register_poweron(self)

# This is the callback function
def on_poweron(self, address):
    self._set_node_on(int(address))
    return {'processed': True}
</pre>
<p>All the helper functions supplied by the plug-in actually translate to AMQP messages, which can get quite complex. For the ease of development this is hidden from the developer. There is still an option though to talk directly to the broker (for example if you prefer a different language then Python). One other important thing to note is that error handling is done by the plug-in API, so you don&#8217;t need to take care about for example connection failures.</p>
<p><strong>Plug-in GUI &#8211; Menu&#8217;s</strong></p>
<p>HouseAgent allows you to create your own custom GUI for your plug-in, but you may still use standardized functions for your plug-in (for example for adding a device). You can also re-use the HouseAgent master template, for styling. One of the handy features is the menu.xml file, you can use this file to create your own custom menu items but still use the standard HouseAgent menu style which looks like this:</p>
<p><a href="http://www.maartendamen.com/2011/06/houseagent-plug-ins/menu/" rel="attachment wp-att-840"><img src="http://www.maartendamen.com/wp-content/uploads/2011/06/menu.png" alt="" title="menu" width="390" height="215" class="aligncenter size-full wp-image-840" /></a></p>
<p>To create a custom menu you need to create a menu.xml file in the templates/plugins/yourpluginname/ folder. Here is an example of what the menu.xml file should look like:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;items&gt;
	&lt;item name=&quot;Latitude&quot; url=&quot;#latitude&quot; image=&quot;/images/plugins/latitude/latitude_icon.png&quot;&gt;
		&lt;subitem&gt;
			&lt;name&gt;Latitude approval&lt;/name&gt;
			&lt;url&gt;/latitude_approval&lt;/url&gt;
			&lt;description&gt;Setup Google Latitude approval, to allow HouseAgent access to your location data.&lt;/description&gt;
		&lt;/subitem&gt;
		&lt;subitem&gt;
			&lt;name&gt;Manage accounts&lt;/name&gt;
			&lt;url&gt;/latitude_accounts&lt;/url&gt;
			&lt;description&gt;Manage Google Latitude accounts and approval.&lt;/description&gt;
		&lt;/subitem&gt;
		&lt;subitem&gt;
			&lt;name&gt;Manage known locations&lt;/name&gt;
			&lt;url&gt;/latitude_locations&lt;/url&gt;
			&lt;description&gt;Manage latitude known locations. You can for example set your home location in this page.&lt;/description&gt;
		&lt;/subitem&gt;
	&lt;/item&gt;
&lt;/items&gt;
</pre>
<p>The structure of this file speaks for itself. </p>
<p><strong>Plug-in GUI &#8211; Pages</strong><br />
Now that we can create our own menu entry&#8217;s and get them visible in HouseAgent it&#8217;s time to actually create those pages. In order to host custom pages for your plug-in you need to create a file in the pages/ folder. You can just create a yourpluginname.py file inside that folder. There is one requirement, and that is to create an entry point function inside your pages file. The entry point function (exact name must be init_pages!) looks like this:</p>
<pre class="brush: python; title: ; notranslate">
def init_pages(web, coordinator, db):
    web.putChild(&quot;zwave_add&quot;, Zwave_add(coordinator, db))
    web.putChild(&quot;zwave_networkinfo&quot;, Zwave_networkinfo(coordinator, db))
    web.putChild(&quot;zwave_added&quot;, Zwave_added(coordinator, db))
</pre>
<p>As you can see there are three important arguments passed, argument one (web) is an instance to the web controller of HouseAgent. You can extend this object to allow your own pages, this is done using web.putChild() function as listed above. The second argument is an instance of the coordinator, you can use this to interact with the broker (for example send a power_on command to the network). The last argument is an instance of the database, you can use this to interact with the HouseAgent database. Once you have defined your entry point function you can use web.putChild to extend the web object with a custom page class. Here&#8217;s an example of a custom web page (zwave_add):</p>
<pre class="brush: python; title: ; notranslate">
class Zwave_add(Resource):
    &quot;&quot;&quot;
    Class that shows an add form to add a z-wave device to the HouseAgent database.
    &quot;&quot;&quot;
    def __init__(self, coordinator, db):
        Resource.__init__(self)
        self.coordinator = coordinator
        self.db = db

    def result(self, result):

        lookup = TemplateLookup(directories=['templates/'])
        template = Template(filename='templates/plugins/zwave/add.html', lookup=lookup)

        self.request.write(str(template.render(result=result[1], locations=result[0], node=self.node, pluginid=self.pluginid, pluginguid=self.pluginguid)))
        self.request.finish()

    def render_GET(self, request):

        self.request = request
        self.node = request.args[&quot;node&quot;][0]
        self.pluginguid = request.args[&quot;pluginguid&quot;][0]
        self.pluginid = request.args[&quot;pluginid&quot;][0]

        deferlist = []
        deferlist.append(self.db.query_locations())
        deferlist.append(self.coordinator.send_custom(self.pluginguid, &quot;get_nodevalues&quot;, {'node': self.node}))
        d = defer.gatherResults(deferlist)
        d.addCallback(self.result)

        return NOT_DONE_YET
</pre>
<p>This page is actually a bit complex, because there is some interaction with the coordinator. But it should give you an idea of what custom pages look like.</p>
<p><strong>Plug-in GUI &#8211; Templates</strong><br />
HouseAgent also allows you to use templates to display data. For this the Mako template engine is used. As you can see in the above example page there is a template function which refers to &#8220;templates/plugins/zwave/add.html&#8221;. This is actually a Mako template file which looks like this:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;%inherit file=&quot;/master.html&quot;/&gt;
&lt;%def name=&quot;content()&quot;&gt;
&lt;div id=&quot;output&quot;&gt;&lt;/div&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; align=&quot;center&quot; width=&quot;100%&quot; id=&quot;devices&quot;&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td class=&quot;HeadText&quot;&gt;Add z-wave device to the HouseAgent database&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td class=&quot;body info&quot;&gt;
				&lt;p&gt;This page allows you to add this device to the database. Please select the values you would like to log..&lt;/p&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
        &lt;tr&gt;
            &lt;td class=&quot;body&quot;&gt;
                &lt;form name=&quot;device_add&quot;&gt;
                    &lt;table class=&quot;InfoTable&quot; cellspacing=&quot;0&quot; cellpadding=&quot;2&quot; border=&quot;0&quot; width=&quot;40%&quot;&gt;
                        &lt;tbody&gt;
                            &lt;tr&gt;
                                &lt;td class=&quot;Head2&quot; colspan=&quot;3&quot;&gt;Device properties&lt;/td&gt;
                            &lt;/tr&gt;
                            &lt;form&gt;
                            &lt;tr&gt;
                                &lt;td class=&quot;Label&quot;&gt;
                                    &lt;span class=&quot;requiredfield&quot;&gt;*&lt;/span&gt;
                                    Device name:
                                &lt;/td&gt;
                                &lt;td&gt;
                                    &lt;input class=&quot;Field250&quot; name=&quot;name&quot; id=&quot;name&quot;&gt;
                                &lt;/td&gt;
                            &lt;/tr&gt;
                            &lt;tr&gt;
                                &lt;td class=&quot;Label&quot;&gt;
                                    &lt;span class=&quot;requiredfield&quot;&gt;*&lt;/span&gt;
                                    Location:
                                &lt;/td&gt;
                                &lt;td&gt;
                                    &lt;select id=&quot;locations&quot;&gt;
                                        % for location in locations:
                                            &lt;option value=&quot;${location[0]}&quot;&gt;${location[1]}&lt;/option&gt;
                                        % endfor
                                    &lt;/select&gt;
                                &lt;/td&gt;
                            &lt;/tr&gt;
                        &lt;/tbody&gt;
                    &lt;/table&gt;
                &lt;/form&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td class=&quot;body&quot;&gt;
                &lt;table class=&quot;InfoTable&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;40%&quot;&gt;
                    &lt;tbody&gt;
                        &lt;tr class=&quot;HeadTable&quot;&gt;
                            &lt;td nowrap=&quot;&quot; width=&quot;5%&quot;&gt;&lt;/td&gt;
                            &lt;td nowrap=&quot;&quot; width=&quot;30%&quot;&gt;Command Class&lt;/td&gt;
                            &lt;td nowrap=&quot;&quot; width=&quot;30%&quot;&gt;Label&lt;/td&gt;
                            &lt;td nowrap=&quot;&quot; width=&quot;30%&quot;&gt;Value&lt;/td&gt;
                        &lt;/tr&gt;
                        % for value, details in result.iteritems():
                        &lt;tr class=&quot;Row&quot;&gt;
                            &lt;td&gt;&lt;input type=&quot;checkbox&quot; id=${value}&gt;&lt;/td&gt;
                            &lt;td&gt;${details[&quot;class&quot;]}&lt;/td&gt;
                            &lt;td&gt;${details[&quot;label&quot;]}&lt;/td&gt;
                            &lt;td&gt;${details[&quot;value&quot;]} ${details[&quot;units&quot;]}&lt;/td&gt;
                        &lt;/tr&gt;
                        % endfor
                    &lt;/tbody&gt;
                &lt;/table&gt;
                &lt;br&gt;
                &lt;table class=&quot;PanelPlain&quot; cellspacing=&quot;0&quot; cellpadding=&quot;2&quot; border=&quot;0&quot; width=&quot;100%&quot;&gt;
                    &lt;tbody&gt;
                        &lt;tr&gt;
                            &lt;td height=&quot;30&quot; valign=&quot;top&quot;&gt;
                                &lt;button id=&quot;adddevice_button&quot;&gt;Add device&lt;/button&gt;&lt;br&gt;&lt;br&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;
                    &lt;/tbody&gt;
                &lt;/table&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;/%def&gt;
</pre>
<p>In the first line we extend from the master.html and re-use that style to create our plug-in page. One other important thing used here is for loop in the template to display locations in a select box. You can use all of the Mako templates features which is beyond the topic of this blog post to describe. But, I suggest you check out the Mako template <a href="http://www.makotemplates.org/">website</a> for more information.<br />
This concludes the post about HouseAgent plug-ins. If anything is unclear please leave a comment or use the HouseAgent <a href="http://www.houseagent.nl/forum/">forum</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maartendamen.com/2011/06/houseagent-plug-ins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing HouseAgent</title>
		<link>http://www.maartendamen.com/2011/06/introducing-houseagent/</link>
		<comments>http://www.maartendamen.com/2011/06/introducing-houseagent/#comments</comments>
		<pubDate>Tue, 14 Jun 2011 20:08:03 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[HouseAgent]]></category>
		<category><![CDATA[amqp]]></category>
		<category><![CDATA[Home automation]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mako]]></category>
		<category><![CDATA[multi-platform]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[rabbitmq]]></category>
		<category><![CDATA[rrd]]></category>
		<category><![CDATA[twisted]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[z-wave]]></category>

		<guid isPermaLink="false">http://www.maartendamen.com/?p=784</guid>
		<description><![CDATA[HouseAgent is a multi platform, open source home automation application. That was the short introduction of something I have been working on for quite some months already. HouseAgent has been running as my own home automation software for some time. I hear you asking, why not use one of the standard software products available? There [...]]]></description>
			<content:encoded><![CDATA[<p><em>HouseAgent is a multi platform, open source home automation application.</em></p>
<p><a href="http://www.maartendamen.com/2011/06/introducing-houseagent/houseagent1-2/" rel="attachment wp-att-794"><img src="http://www.maartendamen.com/wp-content/uploads/2011/06/houseagent11-620x325.png" alt="" title="HouseAgent main" width="620" height="325" class="alignnone size-medium wp-image-794" /></a></p>
<p>That was the short introduction of something I have been working on for quite some months already. HouseAgent has been running as my own home automation software for some time.<br />
I hear you asking, why not use one of the standard software products available? There are a couple of reasons for that:<br />
<span id="more-784"></span></p>
<ul>
<li>Most software is expensive, for a full set-up €500,- is no exception;</li>
<li>I wanted to learn from my home automation hobby, by writing my own software I got and still get a lot of insight on new frameworks/protocols/techniques etc;</li>
<li>Really, I wanted free home automation software to be available to others out there as well!</li>
<li>Most software out there is not designed to run on a low power/low profile systems. HouseAgent can be run on low power system without hassle.</li>
<li>Also most software only runs on one platform i.e. Windows or Linux. I believe in a truly open platform where all kinds of developers can contribute.</li>
</ul>
<p>Let&#8217;s look at some core components used in HouseAgent:</p>
<p><strong>AMQP/RabbitMQ</strong><br />
One of the core components used in HouseAgent is AMQP. The Advanced Message Queuing Protocol (AMQP) is an open standard application layer protocol for message-oriented middleware. The defining features of AMQP are message orientation, queuing, routing (including point-to-point and publish-and-subscribe), reliability and security.<br />
AMQP is used within HouseAgent for plugin communication. Here is a picture, which hopefully explains all the bits and pieces a bit better:</p>
<p><a href="http://www.maartendamen.com/2011/06/introducing-houseagent/houseagent_arch/" rel="attachment wp-att-807"><img src="http://www.maartendamen.com/wp-content/uploads/2011/06/houseagent_arch.png" alt="" title="houseagent_arch" width="408" height="299" class="aligncenter size-full wp-image-807" /></a></p>
<p>As you can see all plug-ins are separate isolated components, in fact the plug-ins don&#8217;t even know about the coordinator or each other. The coordinator is the main HouseAgent application which runs important features such as the event handler and the web-based GUI. A plug-in communicates with the broker, and the message protocol used for this is AMQP.<br />
Certain types of messages are &#8220;published&#8221; on the broker, for example a device_value_update message might be send to the broker by a plug-in. The coordinator is &#8220;subscribed&#8221; to such messages and handles them appropriately (i.e. run a certain action based upon an event or save history to a history file)<br />
The coordinator on it&#8217;s turn can publish messages to the broker as well, commanding the plug-ins to do certain action. One example would be the power_on message. This message commands a certain plug-in to turn on a device with a certain address. </p>
<p>So what&#8217;s RabbitMQ? RabbitMQ is a broker which implements AMQP, there are several other AMQP implementations which might work as well with HouseAgent (not tested!). You can read more about AMQP on it&#8217;s <a href="http://en.wikipedia.org/wiki/Advanced_Message_Queuing_Protocol">wikipedia page</a>. You can read more about RabbitMQ on it&#8217;s <a href="http://www.rabbitmq.com/">homepage</a>.</p>
<p><strong>Twisted (Matrix)</strong><br />
Twisted is used for serial communication and all networking communication in HouseAgent. Twisted is a networking engine written in Python, supporting numerous protocols. It contains a web server, numerous chat clients, chat servers, mail servers, and more. The main difference between Twisted and other networking engine&#8217;s is that Twisted is asynchronous. You can read about the differences between synchronous and asynchronous communication <a href="http://en.wikipedia.org/wiki/Comparison_of_synchronous_and_asynchronous_signalling">here</a>. Twisted certainly was an eye opener for (thanks Rene) but also required a completely different way of thinking about networking and communication in general.</p>
<p>Among these core components some other frameworks/packages are used:</p>
<ul>
<li>Mako Template (for web page templating)</li>
<li>PyRRD (for historic graphing)</li>
<li>py-serial (serial communication)</li>
<li>pywin32 (Windows only)</li>
</ul>
<p>Although the development of HouseAgent is just getting started, it already includes some nice features. Some core functionality HouseAgent offers right now:</p>
<ul>
<li>Storing and logging of device values</li>
<li>Graphing (based upon RRDtool)</li>
<li>Event handling (triggers include: time based, device value changes)</li>
<li>Flexible plug-in development and easy extension</li>
</ul>
<p>This concludes the short introduction of HouseAgent. In future blog posts I will dive deeper in different aspects of HouseAgent.<br />
Right now a group of beta testers has been selected, I will send out a first beta version a.s.a.p. after that a public version will come available.<br />
As of today the source code is available for the core of HouseAgent! You can review the source code, and watch the development progress on <a href="https://github.com/maartendamen/HouseAgent">Github</a>. But please don&#8217;t expect a complete system out that source code, stand-by for binary releases.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maartendamen.com/2011/06/introducing-houseagent/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Horstmann HRT4-ZW Thermostat &#8211; open ends</title>
		<link>http://www.maartendamen.com/2011/06/horstmann-hrt4-zw-thermostat-open-ends/</link>
		<comments>http://www.maartendamen.com/2011/06/horstmann-hrt4-zw-thermostat-open-ends/#comments</comments>
		<pubDate>Mon, 13 Jun 2011 18:53:40 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[Home automation]]></category>
		<category><![CDATA[horstmann]]></category>
		<category><![CDATA[hrt4-zw]]></category>
		<category><![CDATA[thermostat]]></category>
		<category><![CDATA[wireless]]></category>
		<category><![CDATA[z-wave]]></category>

		<guid isPermaLink="false">http://www.maartendamen.com/?p=775</guid>
		<description><![CDATA[A few weeks ago I received an e-mail from a guy who rather stays anonymous, but had some really great additional/detailed information about the HRT4-ZW thermostat. There&#8217;s some things I missed out, or did configure along the way while tinkering with this device but forgot to mention. So here&#8217;s a post about these &#8220;open ends&#8221;. [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago I received an e-mail from a guy who rather stays anonymous, but had some really great additional/detailed information about the HRT4-ZW thermostat.<br />
There&#8217;s some things I missed out, or did configure along the way while tinkering with this device but forgot to mention. So here&#8217;s a post about these &#8220;open ends&#8221;.</p>
<ul>
<li>Previously I mentioned an &#8220;ERASE&#8221; mode, this is actually &#8220;EXCLUDE&#8221; mode. This mode should only be used if your thermostat was previously installed in a z-wave network, I guess this was the case when I first set-up my thermostat. The protocol reset does more or less the same but is more extensive. It removes any network information from the HRT4-ZW and returns it to the factory default state (The double press of the dial is to avoid accidental operation)</li>
<p></p>
<li>The way incorporate the devices with a controller (in my case the Aeon Labs Z-Stick) is to start with both in an unassigned state. Install each device separately on to your controller. The Association between the two devices may be done using the ‘A’ command on the HRT4-ZW and pressing the install button on the ASR. This does not require knowledge of the node numbers. The install (network) button is required for installation. You need to hold the button down for over a second.</li>
<p></p>
<li>I forgot to mention about the wake-up time, I changed the wake-up time while it was in the LI (listen) mode. The default wake-up time is around 23 hours, which is a bit long when you want your thermostat changed. I changed it to 256 seconds or in other words 4 minutes and 16 seconds (the bare minimum value), but I might change it to a higher value again later on.. please see the point below why..</li>
<p></p>
<li>The 2 year battery life (as reported by Horstmann) is based on normal use as a stand-alone thermostat. Use in a network where the HRT4-ZW is woken up regularly will reduce this time. That’s why there is a minimum wake-up interval. Battery life should not be a problem in practice, but please note that when the HRT4-ZW is in installer mode (switch 1 up) the Z-Wave module is permanently powered and takes much more power. This is why my battery life reported 90% after some tests. 0% is 2V and 100% is 3V or above. A new set of batteries will normally give just over 3V (2xAAA, 1.5v each)</li>
<p></p>
<li>There is actually a second and third configuration parameter I forgot to mention about. The second one allows you to change to Fahrenheit messages. The third one allows you to set a delta t for reporting temperature changes. A message will be sent to associated nodes if the temperature changes by delta t. This parameter defaults to 1°C.</li>
<p></p>
<li>When controlled by Z-Wave messages rather than turning the dial, you can actually set the setpoint to 0.1°C steps. This will not show up on the display as it’s only 2 digits, but it will attempt to control to it. For example you could set the setpoint to 20.6°C if you wished. 21°C will be shown on the display as the demand temperature is rounded up. Fahrenheit temperatures are converted internally to the nearest 0.1°C so will not give you more accuracy.</li>
</ul>
<p>Some really valuable additional information, thanks a lot Mr.Anonymous ! :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maartendamen.com/2011/06/horstmann-hrt4-zw-thermostat-open-ends/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

