Lately, I have been experimenting on home automation. I have got a couple of z-wave devices from Home Pro and manage to set up every device properly to work as expected. Although, the devices do work like a normal switch, the interesting part is to implement some kind of automation. So I had bought one of these USB controller from Controlthink. Unfortunately, it’s not the ideal controller to buy especially when using Linux, so I had to figure out a solution. First, I tried to compile the samples which were written in .NET on mono but it wouldn’t compile.
Since my home server runs on Fedora the device is not supported on Linux. So, I installed Virtual Box OSE and installed a copy of Windows XP and used a program developed by Melloware which is a free application that was written especially for the Controlthink USB controller. The zwave controller is a very simple application which detects the devices connected to your z-wave network and allows you to control each device by sending the z-wave commands through the USB controller. It does the job very well but since my z-wave devices do not support scenes, I had to figure out how I could implement the scenes functionality using a work around.
So this is were my project comes in. The z-wave controller written by Melloware, accepts connections through TCP and also HTTP requests. The protocol can be found here. The HTTP requests feature solved my problem to be able to implement the additional features like the Scheduler and Virtual Scenes that I felt missing from the Melloware z-wave controller.
The aim of this project is to have a free Home Automation Solution using available free software (assuming you have a genuine Windows installation).
This project is written in PHP 5 and JQuery and needs a copy of the Melloware Z-wave Controller running either on a native Windows machine or at least virtually like on Virtual Box. You also need the ControlThink USB controller.
The web interface has the following functionalities:
- Status – Showing the list of the devices and their status.
- Setup – Get the list of devices from the server and save a cached copy in an XML file.
- Controller – Lets you control the devices by selecting the device and control it using On/Off and a Slider.
- Scheduler – lets you create cron jobs to automate the HTTP requests to the server.
- Scenes – group devices and set their levels to pre-defined presets.
Currently, under work in progress are the Scheduler and Scenes functionalities.
Currently the solution although not fully implemented, the Controller works fine and can be accessed practically from any device having an Internet connection and a browser capable of running Java Scricpt. The code can be downloaded from here. Currently there is no documentation on how to setup the system since it is still in early alpha stage. Proper documentation will follow as soon as the system will be ready to be released.