These days I’m building a simple home automation system – turning lights and appliances on/off. Not only do I want to be able to switch appliances on and off, but I want the system to do it for me. Hence, some context inference is in order. The centerpiece of this effort is a bus system that would be used to transmit sensor information, infered high-level context and actuator commands. As it so happens, that bus system was a good opportunity to learn Node.JS.
The outcome of this effort are a few lines of JavaScript which I’ve come to call busfahrn (colloquial German for taking a bus ride). It’s basically a wrapper around EventEmitter, but with a ton of different IO support. Its main features are
  • A lot of IO modules to pass along messages. Out of the box support exists for HTTP(S), Redis, serial ports and the console.
  • A notion of message/state inference using redis and simple rules formulated in JavaScript
  • Clean and simple code, easy to extend and modify
  • Written entirely in Node.JS
If you want to give it a spin or read more, please checkout Github.

3 Responses to “Busfarhn”

  1. [...] hanging around is boring, unless one does something with those sensors. Earlier this year, I wrote busfarhn which is a message bus at the core of my home automation effort. This message bus also sports a GUI [...]

  2. Michael says:

    Hi Christian,

    first I wanted to point out a copy&paste error in your last commit. The 5 minute signal is still a 1 minute signal: https://github.com/32leaves/busfahrn/commit/1507f6910dce9aec8badde797f3acdedd50e682e

    Second, I’m having trouble installing busfahrn on debian 7 32 and 64 bit. “node-gyp rebuild” fails at ffi@1.1.2. As it is a completely clean install in a virtual machine, do you have any pointers where I should investigate?


  3. Michael says:

    The installation problem went away after using Node v0.9.3 instead of v0.10.5, now I’ll look into busfahrn :)

Leave a Reply

Fork me on GitHub