20 Dec 2013

Installing HomeGenie on Ubuntu 12.04

HomeGenie is an open source home automation server. I'm starting to build a Z-Wave based home automation system and

HomeGenie Alternatives

Fibaro - I'd like a Z-Wave server/controller that is either an embedded system or can run on my Linux server. In addition, I'd like a nice mobile UI to the system. While I'm impressed with Fibaro and they have an impressive demo video, they don't yet support Z-Wave locks and at $700 for their Home Center 2, I'm not willing to buy it and wait for it to support the devices I want to use. Their iOS and Android mobile apps also look well designed.

Vera - The other Z-Wave based system which has excellent device support and pricing is Mi Casa Verde's Vera system. An entry level box is only $179 and their mobile apps look reasonably good. They also have an active user base and forum.

In the end, I think HomeGenie has most of the advantages of Vera, it's free and the web and mobile UI's look better than Vera.

Install HomeGenie on Linux

After downloading the latest Debian package from here I followed the instructions posted here. Here's a summary of the steps.

First get the Mono libraries:

sudo apt-get install libusb.1.0-0 mono-runtime libmono-corlib2.0-cil libmono-system-data4.0-cil libmono-system-core4.0-cil libmono-system-servicemodel4.0-cil libmono-windowsbase4.0-cil libmono-system-runtime-serialization-formatters-soap4.0-cil libmono-system-runtime-serialization4.0-cil libmono-system-xml-linq4.0-cil mono-dmcs libmono-zeroconf-cil-dev libmono-zeroconf1.0-cil lame lirc libv4l-0

Now, install the HomeGenie package itself:

sudo dpkg -i homegenie-beta_1.00.313_all.deb

Access HomeGenie

You should now be able to connect to HomeGenie via your browser at http://localhost. If there's another server running on port 80, HomeGenie will conveniently try the next port - http://localhost:81.

HomeGenie should install a startup file at /etc/init.d/homegenie. You can check on the status of HomeGenie with the command:

/etc/init.d/homegenie status

The same script supports start and stop options. This script invokes the script /usr/local/bin/homegenie/startup.sh.  I wanted to generate a logfile so I changed the startup line as follows:

cd $1 && sudo $MONO HomeGenie.exe >/usr/local/bin/homegenie/homegenie.log  2>&1

First Time Setup with Z-Wave Lights

I'm using the Aeon Z-Stick 2 USB stick on my Ubuntu system to connect to my Z-Wave devices and the first Z-Wave device I've installed is a Leviton VRS15-1LZ swtich.

HomeGenie automatically installs the driver to use the Z-Stick so now I just need to add my Leviton switch. From the main page of HomeGenie, add the switch or other device by going to the Control > Configure page. From this page, Enable the ZWave Interface Option. To add your device, click on the Add Node button and you'll have 10 seconds to initiate the connection from your ZWave device to HomeGenie.

If the connection was successful, you'll see a ZWave node number returned.

You now need to make this device part of a Group in HomeGenie. From the Home page go to ConfigureGroups and Modules and click on the Add Group button in the lower right corner of the screen.  Give your group a name and click Ok.

With the group page open, click on the Add Node button in the lower right and choose Add Module. Choose the pull-down menu and find the device that you just added.

You can now control your new device and program various functions for it.