Here is my home automation software built for the Rasberry Pi released to everyone in hopes that someone will find it useful. I just got into Python with this project so it may be pretty bad coding on the server side. Any tips would be greatly appreciated.
What I'm working on now
Just got done with 0.2.0 ALPHA release. Will start on security and getting the rest of the overview page done. I'm also noticing some problems in the server side with some noise when an event is triggered. Ill have to look into getting this right. I think it has to do with the way my relay board is setup and connected to my Pi. I'm really focused on this issue before I get started on the other things.
My aim is to turn the Rasberry Pi into a full home automation controller. This means lights, A/C, security, events, multi-room audio, and a nice interface to manage it all!
Features (0.2.0 Alpha):
- Full light control over Pis GPIO ports to a relay board
Curses-based server GUI
Add/Delete lights with names
Add/Delete sensors with names
Mass light control (all lights off)
Create events to be ran when certain conditions are met (i.e channel 3 is triggered so turn on channels 2, 5, and 6)
Enable/Disable events from being ran
Set time constraints for events and lights
System overview (currently only shows lights on out of total lights i.e 5/8 on)
Multithreaded websocket server for multiple clients to control at once
- MAKE THE INTERFACE MORE PRETTY! Its really only proof of concept right now. Once the actual coding is complete I will work on this
Get the security page going. What kind of device should handle this? Let me know
Dimmable / PWM lighting support
A/C control using thermometers, humidity sensors, etc. Or just control a networked thermostat (examples of such devices?)
Multi-Pi setups to allow for more inputs/outputs maybe some load balancing
Very lastly bundle it into a minimal OS and call it HomeOS!
And the never ending task of performance enhancement
Give me more ideas...
Release 0.2.0 ALPHA
- Server script now has a curses based GUI to show you info about current states of everything
- Renamed Macros to Events
- Removed Timers section. Events now have timer options on setup. Lights have timer options in their settings page.
- Many server side improvements such as running events in seperate process instead of scripts
- Server now communicates with MySQL directly instead of through polling PHP scripts to do the work
- Web interface now takes advantage of 2 way websocket server to get the GPIO/event states from server instead of MySQL
- Added installation of python-tornado dependency in the install script
- Install script now only asks for the password once
Release 0.1.9 ALPHA
- Adding lights and macros now checks to make sure there is something entered for a name instead of submitting without a name
- Setup script new sets the correct file permissions to allow macros and crons to be created
- Websocket server is now threaded. Multiple clients can now use the interface at once!
- Shell script now asks for the mysql password and puts it in the appropriate scripts automatically
Release 0.1.1 ALPHA
- Minor fix to the websocket server to allow it to run without any GPIOs setup
Release 0.1 ALPHA
- First public release
Now a bit about the actual project. I am working with a Rasberry Pi Rev B. (512MB model) as the controller. I have an 8 channel sainsmart relay board that I am controlling. For inputs I have a PIR motion sensor from Adafruit and a magnetic door switch.
The lights and macros control communicate with the web interface through the Python-based web socket server for quick responsiveness. Its more of a one way communication because the server cant send any data back to the client at this point. Light states are stored in a MySQL database along with configurations, lights, sensors, etc.
Setup instructions and other information is located in the readme.txt.
Also make sure you look at the Channel Reference.txt!
Contributions are more then welcome!