Introduction: Home Automation With HomeGenie
So you want to step up your home automation game? Look no further! A lot of us tried home automating by ad-hoc method, now here is a great open source system that gives reliable foundations for your next project.HomeGenie gives you a web server for PC / Linux / Mac / Raspberry PI (7W!) / any other that can run Mono middleware. It also has native apps for Android/Windows Phone (smartphones and tablets).
For Android phones/tablets:
For Windows Phone:
The user interface for the browser and in the apps is very slick and responsible (unlike html).
Key features of HomeGenie
- DLNA/UPnP Control Point
- Lighting Control and Scenarios
- IR/RF Remotes and Voice Control
- Energy Monitor and Statistics
- Basic alarm
- And a lot more
For more info visit: http://www.homegenie.it
Currently supported Interfaces:
X10 (CM11, CM15Pro, W800RF32), Z-Wave, Philips Hue, UPnP devices, RS-232/RS-422/RS-485 serial, and external web services.
These modules are supported out of the box, but you can implement any other protocols.
In this tutorial I will show you how to communicate with custom protocol/application/HW through serial port (this should work on every supported platform, even on Raspberry PI).
HomeGenie (HG) is open source (feel free to contribute https://sourceforge.net/projects/homegenie), it’s written in C#, which is productive and fast (even with Mono middleware running on Raspberry).
Inside HG there are various sub processes (programs), typically one mini-program for one module, these are written in C# like script language (easy to use, knowing C# is not necessary).
Response time is really fast (even over Wi-Fi) <100ms (unlike html), so it's wife safe.
HomeGenie is result of hard work of Generoso Martello, so give him big thanks, and don’t forget to donate to keep up the development. (Left side, in the middle http://www.homegenie.it/docs/index.php)
Step 1: Hardware
So let’s get started.
I used the MSP430 Launchpad devboard with MSP430G2553 microcontroller, with Energia IDE (which is very similar to Arduino, so it takes little effort to adopt). http://www.ti.com/tool/msp-exp430g2
Download Energia IDE: http://energia.nu/download
Open the attached firmware: HomeGenie_Tester_Firmware.zip/HomeGenie_Tester.ino
- Select the board you are using:
- Select the serial port, where you connected the board.
- Verify the program:
- Upload the program to board:
You may try its functionality by opening serial monitor, press the left button on the Launchpad, Red LED should light up, and you should receive either '0' or '1' character in terminal. Press it again; now expect the other binary value '1' or '0'.
If you send '0' or '1' from the terminal the Green LED should be set to the according value.
Open the serial monitor for testing:
Okay, so now we have a functioning Home Automation node that we can control from HomeGenie.
Next step is setting up HomeGenie to recognize our simple protocol, and assign a simple module for it.
Step 2: HG Software
Here is the script you will need: 132-MCU_Test_program.hgx
Download and install the HomeGenie server: http://www.homegenie.it/download.php
Follow the instructions in: HomeGenie setup for serial port.pdf (we are working on to make this simpler)
Now you will be able to reproduce the function seen on the video.
If you have a good idea/bug post it here: https://sourceforge.net/p/homegenie/tickets
This was a basic project introducing HomeGenie. We encourage you to share your project and use this great open source software. If you need deeper support you are welcome to join the HG forum: http://www.homegenie.it/forum
Next step would be e.g. controlling a simple RF outlet, for hints check out this instruction:
Or would you like to connect a Bus Pirate to it and have bitbang, SPI, I2C, UART, 1-Wire, and raw-wire protocols to control?
Don't reinvent the wheel, rather contribute.
Big thanks to Generoso,
2014. February 15.