Meet this little project I've been working on ...

By on

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, ...)

Server-client architecture

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

::: lightbox 562f3a3a017860cb01831cfa 300 "Elric Motion plugin running in the browser" :::

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.


::: lightbox 562f3a2e017860cb01831cf4 300 "Elric devices" :::

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

::: lightbox 562f3a34017860cb01831cf7 300 "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.


::: lightbox 562f3a40017860cb01831cfd 300 "Scenarios" :::

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.


::: lightbox 562f3a29017860cb01831cf1 300 "Clients" :::

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.


Spent a whole weekend trying to install this for my ubuntu server and there was so many problems that I gave up after 5 attempts when the layout templates failed to render. Unfortunate because the UI looks great! I would have loved to contribute to the repo.
hi. I get an error message like the following. I could not solved. can you help . . . Copying files from /home/pi/node_modules/elric/plugins/motion/hawkejs//motion (subdir: /motion) Copying files from /home/pi/node_modules/elric/plugins/elro/hawkejs/ (subdir: undefined) Update requested, but did not find place to put template "page/index" Getting "elements/menulinks" SYNCHRONOUSLY ... ... SYNCHRONOUS calls are done. Update requested, but did not find place to put template "layout/body-main" Update requested, but did not find place to put template "layout/body-all" We probably need a complete new document for template "layout/base" . . .
Great, I will check back in a few months. Yes, you've got yourself a stalker ;)
Very neat project! It would be great if others would help develop it to add additional features.
submit error done Busy
Jelle De Loecker