Category Archives: Open-Zwave-Controller

Android Client for Lights Control

Finally, I managed to find some time to start working on the Android Client for Lights Control.  It is very basic at this stage but works.  The list shows the device and its room in square brackets.   Please find the APK below:

http://conradvassallo.com/downloads/LightsControl.apk

Start by putting in the server settings by pressing the settings menu.  Enter the server IP/hostname and the port (default is 6004).

Make sure you have the latest version of the Lights Control code since some changes were made both to the server and the web interface.  If you cannot get the names and rooms of your devices, go through each device from the Web Interface and update each device.  This will update the device details to the Open Zwave server xml config file.  The android client communicates directly to the sever and not to the Web Interface.

Lights Control

Lights Control, is the latest version of my Home Automation software which makes use of the Open-Zwave library to manage Z-Wave devices.

Mobile version still under construction but coming soon!.

No installation hassle! Now also available as a Raspbian image for the Raspberry Pi!  Click here to download.  Web login username is Admin with first letter uppercase and passwor is admin, all lowercase. SSH login user: lightscontrol, pasword: lightscontrol.  Root password: lightscontrol.  Make sure you first setup the IP of your Raspi.  By default it is set to 10.0.0.100

Code available here: svn checkout http://lights-control.googlecode.com/svn/trunk/ lights-control-read-only

Control / Status of devices
Manage Scenes
Schedule scenes to automate your lights
Settings Menu to manage your devices

Open-Zwave on Raspberry Pi

Raspberry Pi & Aeon Labs Z-Stick

Thanks to the tutorials found below I have managed to get the system up and running:

http://www.instructables.com/id/Raspberry-Pi-Web-Server/

http://thomasloughlin.com/z-wave-controller-setup-on-my-raspberry-pi/

 

Now it’s time to improve the software.  Keep tuned for more updates.

http://code.google.com/p/open-zwave-controller/source/checkout

Open-Zwave-Controller Code available through svn

Finally got some time to put the code on google code which can be found below.  This is not fully ready and needs more work, especially the scheduler.  More updates will follow soon hopefully.

http://code.google.com/p/open-zwave-controller/source/checkout

Basically, first start by compiling the server.  Get the open-zwave code and compile my server code from the cpp/examples folder.  Run the server.

Next, import the mysql database into your mysql server.  Manually enter the admin username and password inside the admin table.

Next, host the control panel and web client php files on the same pc running the socket server.

These are some very crude setup steps. Should you need any more detail, let me know.

Lights Control – Open Zwave

Lately I have been busy building the web interface to customise and control the devices on my z-wave network. The screen shots below will give you a taste of what has been done so far.

Showing list of devices grouped by room
Naming each device and associating a room
Scheduler in its infancy but functional... more to come
The settings section

Resources

Due to several requests asking for code, below please find some sample code of how the system was implemented.

Socket Server

The socket server is based on the sample code by the Open-Zwave  library found in the directory

open-zwave\cpp\examples\linux\MinOZW

It was modified to include the socket server connection and a very basic protocol to control the devices.

Main.cpp

The server is not fully implemented and supports only Multilevel and Binary switches.  Moreover, the status request is still to be implemented.  (Hopefully by next summer).

PHP Socket Client

A client written in PHP to send commands to the socket server.

server.php

Update

Code is available here:

http://conradvassallo.com/2012/06/21/open-zwave-controller-code-available-through-svn/

Open Zwave Project

Aeon Labs Z-Stick Series II Z-Wave USB controller

Lately I bought an Aeon Labs Z-Stick Series II Z-Wave USB controller since it is the most feasible device to use on Linux.  Referring back to the previous solution I had posted here, the problem was that I had to run the system on a virtual machine which does not make it so efficient to run on my green Atom powered home server.  The main problem was that the USB controller from Controlthink was not supported on Linux so I had to seek for another solution.

Finally, thanks to the guys developing the Open Zwave Project now it is possible to control Z-wave devices from Linux.  My solution is  a socket server which accepts requests from different clients such as from a web interface or from an Android phone /  tablet.  Practically, the socket server works very similar to  the same system implemented by http://melloware.com/products/zwave/.

The main challenge in this project was to get my hands dirty with C++ which I am not very familiar with but having said that, the sample examples provided by the Open Zwave team, helped a lot understanding how to use their library.  I managed to kill two birds with one stone, learning a bit of C++ while having my Linux server controlling the Z-wave devices natively.

Server

Currently, the socket server gives a list of devices to the client and accepts commands to control each device.

Server (Left) Telnet client (right)

Clients

Web Client

It is still work in progress, however it does most of the stuff  I need.  The screen shot below shows a PHP socket client displaying the list of devices which can be controlled.

The Z-wave web interface

Setting up each device found on the z-wave network

Android

Below are some screen shots of the Android client.