I actually did not want to make this announcement just yet, I felt like I needed to wait for a proper, working version of what I was building. But 3 months have passed, and my colleague's thought what I created was pretty cool already and that it would be interesting if I shared my progress with the world.
So that's what I'm going to do. But first, what am I creating?
For a very long time I've wanted to make my house smart. I've only ever really tried LinuxMCE, after which I got sidetracked for years trying to get MythTV to work properly. Which never happened, so I finally switched to tvheadend & XBMC. And suddenly I got all this free time on my hands.
Yes, I'm creating an open source home automation system built using Node.js called "elric"
There are already a few similar projects out there, but they didn't appeal to me. Because of what language they were written in (Ew, java), or how specific the code was, ...
So, here's a simple explanation of the system. There are a few screenshots down below, btw.
Elric: what can you do with it?
Here are some features that are implemented, or are on my to-do list:
- Control devices through the web interface
- Monitor your house through security camera's
- Get audio (text-to-speech) response from Elric
- Use speech recognition
- Detect where people are (using camera's, motion detectors, bluetooth, ...)
- Create extensive scenarios by acting upon emitted events (movement, voice commands, time of day, ...)
Elric is composed of a single server, and many "clients", which can perform many capabilities.
You can run everything on only 1 computer, but you can also easily add a client in every room of the house in order to install audio input & output, bluetooth beacons (for positioning), Motion instances, Home Automation interfaces (I'll be using about 3 RFXCOM interfaces spread around the house), ...
The Motion Plugin
What really triggered my "quest" was the urge to install security camera's inside and outside my house. (My neighbours were held at gunpoint last year, at 16:00 hours no less.) I tried Zoneminder for a very long time, but that codebase belongs in a museum. Then I discovered Motion, which works great. The only downside: there's no real interface.
So I created the Motion plugin. It's very basic for now.
Here's a list of all the devices I've registered in my (development) installation. These devices are all "Elro Home Comfort" devices (Using the ARC protocol), which are controlled by the rfxcom interface.
The first button group are commands specific to that device module type. The second group are protocol commands.
Certain devices (like Elro light module AB600L) don't respond to the "on" and "off" signal as you would expect. The "off" button actually toggles the state of the light. Since device states are stored in the database, this can perfectly be remedied with these custom commands.
The house blueprint
Every home automation software lets you build a blueprint of the house, Elric is no different. Instead of using spiffy clipart I wanted to go with a very minimalistic approach. Everything is represented by lines & blocks.
This is how you create scenarios. These are easy blocks you can move around & check for certain conditions. You can check for any activity event.
For example: the Motion plugin emits a "movement" activity whenever it detects movement on a camera. Then you can check for where this movement occured, and act upon it accordingly.
Here's where you handle the client workers. You can enable or disable certain capabilities and configure them.
Get the code on github
As I said before, Elric is not ready. I wouldn't even consider it alpha software. Just a few weeks ago I was able to turn my first device on and off. Just yesterday I got my first scenario up and running.