My home server setup part 1: basic setup and hardware

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’s start of with the hardware used in my home server, nothing fancy really:

Motherboard: Intel Desktop Board DH55TC
CPU: Intel Core I3 530 2,93Ghz
Memory: OCZ Gold Low Voltage OCZ3G1333LV4GK (8GB)
Harddisk 1: Kingston SSDNow SNV425-S2BN/64GB
Harddisk 2: 500GB Western Digital Green

All of the hardware is housed in a small desktop enclosure (as shown on the picture)

Stupid spammers

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’t the most intelligent spammer and coder of them all:

I think his/her spambot had to a pick a random word from those lists, but somehow it failed :-)
So, here’s a lesson.. if you do things like this, do them right and properly!

Programming and debugging an ATtiny85 using USBTinyISP and an USB-BUB

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 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:

- 8Kb flash (yes, space does matter!)
- 0.5Kb SRAM
- Maximum operating frequency (20Mhz, using an external crystal)

Here’s a picture of this MCU:

Byebye RabbitMQ, hello 0MQ!

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 example routers/NAS devices etc. Most of these devices have a maximum of 16MB flash. RabbitMQ is just no option in those scenarios.

Looking for alternatives ZeroMQ caught my eye. A major difference is that ZeroMQ uses a brokerless design whereas RabbitMQ uses a broker based design.
Let’s have a look at both designs:


Old HouseAgent architecture based on RabbitMQ

Disable firewall on ESXi

I didn’t have a lot of time for blogging lately but here’s just a quick tip (I am currently working hard on HouseAgent behind the scenes!)
Sometimes it’s handy to disable the ESXi host firewall for some quick troubleshooting. Here’s how to accomplish that:

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’s how to re-enable it:

Installing HouseAgent on Linux

Following up on yesterday’s post, here are the instructions to install HouseAgent on Linux.
I took one of the most popular Linux distribution’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 prerequisites, there are two (Erlang and RabbitMQ) but you can install them using a single command line.
Start the terminal in Ubuntu:

Now enter the following command:

Installing HouseAgent on Windows

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 core of HouseAgent. The good news is, that this will get core of HouseAgent up and running. The bad news is that you can’t do anything with, not without plug-ins at least. I will dive into the subject of installing plug-ins in another blog post.

Step 1: installation of RabbitMQ (and Erlang)

RabbitMQ is the message broker required by HouseAgent, you can download it from here.
You need the server with Windows installer:

After you have started the RabbitMQ setup, it will alert you that you also need Erlang:

HouseAgent: plug-ins

Yesterday’s post introduced HouseAgent. In today’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 for the plug-in itself, it doesn’t apply to the plug-ins GUI pages. These GUI pages hook into the coordinator directly.
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..
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.

Introducing HouseAgent

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 are a couple of reasons for that:

Horstmann HRT4-ZW Thermostat – open ends

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’s some things I missed out, or did configure along the way while tinkering with this device but forgot to mention. So here’s a post about these “open ends”.

  • Previously I mentioned an “ERASE” mode, this is actually “EXCLUDE” 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)
  • 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.
  • 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..
  • 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)
  • 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.
  • 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.

Some really valuable additional information, thanks a lot Mr.Anonymous ! :-)

Subscribe to RSS Feed