Home.js? Node.js & Home Automation

375 views
Skip to first unread message

Tys von Gaza

unread,
May 27, 2010, 2:39:34 PM5/27/10
to nodejs
Not sure if this is place for Node.js application ideas...

I've been wanting to use Node.js for a project since I heard about
it. I have also been thinking and doing a lot of research on home
automation. Some thing clicked and it would seem Node.js and home
automation would be the perfect combination.

While I haven't done much home automation, it seems to be largely
event based. Something happens, the system reacts to it. Ie, sensor
in the living room detects motion, turn on all lights in the living
room. It also seems to be async, commands to devices may take awhile,
which would lend itself to node's architecture.

Taking it one step further would be modelling the home using some sort
of DOM. Imagine being able to model your home like an HTML page and
controlling how it looks and behaves with CSS and javascript. Example
w/ jQuery:

// When motion is detected in the living room, turn all lights to 75%
intensity
$(".living-room").delegate(".motion-sensor", "onmotion", function(){
$(".living-room .lights").css("intensity", 0.75)
});

Now I don't know if this would at all be possible with Node.js and
maybe something like Env.js mixed in, but it would be a pretty neat
way to program a house. I hope to start hacking away once the reno's
are done. Just curious if anyone else would be interested in this
project and would like to bounce some ideas around?

Cheers,
Tys von Gaza

Marak Squires

unread,
May 27, 2010, 3:54:53 PM5/27/10
to nod...@googlegroups.com
+5


--
You received this message because you are subscribed to the Google Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com.
To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.


Nicholas Campbell

unread,
May 27, 2010, 4:01:09 PM5/27/10
to nod...@googlegroups.com

Really cool idea. As long as you could hook into the controllable from your computer you'd be able to do it.

- Nick

On May 27, 2010 3:54 PM, "Marak Squires" <marak....@gmail.com> wrote:

+5



On Thu, May 27, 2010 at 2:39 PM, Tys von Gaza <t...@tvg.ca> wrote:
>

> Not sure if this is place fo...

Carl

unread,
May 27, 2010, 4:02:45 PM5/27/10
to nod...@googlegroups.com
+10

I love the idea of modeling a house after the DOM.  :)  Also the event based nature of Node.js works so well with this model!  As for implementation I assume that you could write a wrapper in JS around some software like http://openremote.org/.

Carl Sverre

+----------------------------------------+
|    http://www.carlsverre.com
|    Cell: (250) 360 7329
|    Skype: bloonlabs
+----------------------------------------+

francisco treacy

unread,
May 27, 2010, 4:10:07 PM5/27/10
to nod...@googlegroups.com
Wow, that would be really cool!

2010/5/27 Tys von Gaza <t...@tvg.ca>:

Andrew Lunny

unread,
May 27, 2010, 4:12:55 PM5/27/10
to nod...@googlegroups.com
This is very cool.

It's not using node right now, but one project for bringing the DOM
into the physical world is @nonken's HumanApi - you can check it out
here: http://humanapi.org/

--
Andrew Lunny
Software Developer, Nitobi
604 685 9287
blogs.nitobi.com/andrew

Matt Ranney

unread,
May 27, 2010, 4:14:20 PM5/27/10
to nod...@googlegroups.com
On Thu, May 27, 2010 at 11:39 AM, Tys von Gaza <t...@tvg.ca> wrote:
Now I don't know if this would at all be possible with Node.js and
maybe something like Env.js mixed in, but it would be a pretty neat
way to program a house.  I hope to start hacking away once the reno's
are done.  Just curious if anyone else would be interested in this
project and would like to bounce some ideas around?

Sounds cool.  Maybe just make the binding to EventEmitter work first, and then you can decide whether you still want to tackle mapping that onto some sort of document structure.

David E. Brooks Jr

unread,
May 27, 2010, 4:16:03 PM5/27/10
to nod...@googlegroups.com

On Thu, May 27, 2010 at 4:02 PM, Carl <bloo...@gmail.com> wrote:
+10

I love the idea of modeling a house after the DOM.  :)  Also the event based nature of Node.js works so well with this model!  As for implementation I assume that you could write a wrapper in JS around some software like http://openremote.org/.

A "Domicile Object Model", perhaps? :)

-- Dave

Tys von Gaza

unread,
May 27, 2010, 4:18:13 PM5/27/10
to nodejs
Good point. It looks like Fernand Galiana has done something similar
with Ruby and LinuxMCE in http://github.com/derailed/rhouse

His code is using LinuxMCE and a zwave usb dongle & devices. He
created a "virtual device" in LinuxMCE which adds events to a ruby
queue. Would be relatively easy to setup a similar architecture to
get started. I haven't played with either of these, so that will be
my first step.

I've created a home.js google group for those interested. This may
have been a little pre-emptive as I won't have time to work on it till
fall (house this is happening in is a construction zone right now),
but it would be a good place to start exploring what is possible.

http://groups.google.com/group/homejs

Cheers,
Tys

On May 27, 2:02 pm, Carl <bloonl...@gmail.com> wrote:
> +10
>
> I love the idea of modeling a house after the DOM.  :)  Also the event based
> nature of Node.js works so well with this model!  As for implementation I

> assume that you could write a wrapper in JS around some software likehttp://openremote.org/.


>
> Carl Sverre
>
> +----------------------------------------+
> |    http://www.carlsverre.com
> |    Cell: (250) 360 7329
> |    Skype: bloonlabs
> +----------------------------------------+
>

> >> nodejs+un...@googlegroups.com<nodejs%2Bunsu...@googlegroups.com>


> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/nodejs?hl=en.
>
> >  --
> > You received this message because you are subscribed to the Google Groups
> > "nodejs" group.
> > To post to this group, send email to nod...@googlegroups.com.
> > To unsubscribe from this group, send email to

> > nodejs+un...@googlegroups.com<nodejs%2Bunsu...@googlegroups.com>

Ryan Gahl

unread,
May 27, 2010, 4:28:26 PM5/27/10
to nod...@googlegroups.com
+42

Javascript-powered house... HELL YEAH :)

Make this work, then give me your house. I'll reward you in the next life.



To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.

Jonathan

unread,
May 27, 2010, 4:32:14 PM5/27/10
to nod...@googlegroups.com

Stephen Belanger

unread,
May 27, 2010, 4:46:01 PM5/27/10
to nod...@googlegroups.com
Awesome idea. I'd love to be able to script my house in Javascript. I could tell my lights to dim whenever I start up mplayer, or pause my movie when I move from the couch. Now if only I could program it to make me dinner. :P

On Thu, May 27, 2010 at 1:32 PM, Jonathan <jdkn...@gmail.com> wrote:
--

Alexander Teinum

unread,
May 27, 2010, 5:22:59 PM5/27/10
to nod...@googlegroups.com
Oh yes, that would be great. I’d love to have Node.js controlled
LED-spotlights in my apartment.

From the little research that I have done, I have found it difficult
to find reasonable-priced, good looking home automation hardware
devices using open standards that supports Type F sockets. A bit off
topic, I know, but software alone cannot toggle a lightbulb on or off.
We need some hardware as well.

What standards, equipment, or whatever would be worth targeting? I bet
most Node.js users are comfortable with open standard-type stuff that
does not come with a PDA from 1995. DIY packages are great, but
soldering isn’t. :)

I don’t know much about it, but X10 is an open standard that seems to
be widely used.

--
Best regards,

Alexander Teinum

Ryan Gahl

unread,
May 27, 2010, 5:25:34 PM5/27/10
to nod...@googlegroups.com
X10 all the way.


Tys von Gaza

unread,
May 27, 2010, 5:41:44 PM5/27/10
to nodejs
From the research I've done there are a variety of options on the
hardware side. I'll probably choose to just interface with LinuxMCE
to begin with as it can abstract the choice and can trigger events
through a "virtual device".

Some options are:
- X10: to my knowledge X10 isn't 2-way
- Insteon: X10 follow up, don't know a lot about it
- Zwave: 2-way, close source but lots of device choices. Open-zwave
reverse engineering project does look promising though.
- Zigbee: More open, less device choices. Used a lot more by
utilities to monitor energy usage. Zigbee-IP looks promising for
using ipv6 for devices. #cool

Ideally though the tech used shouldn't matter.

Aaron Heckmann

unread,
May 27, 2010, 5:59:29 PM5/27/10
to nod...@googlegroups.com
Great idea!!!

> --
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com.
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en.
>
>


--
Aaron
http://clickdummy.net

Dean Landolt

unread,
May 27, 2010, 6:13:37 PM5/27/10
to nod...@googlegroups.com
On Thu, May 27, 2010 at 5:41 PM, Tys von Gaza <t...@tvg.ca> wrote:
From the research I've done there are a variety of options on the
hardware side.  I'll probably choose to just interface with LinuxMCE
to begin with as it can abstract the choice and can trigger events
through a "virtual device".

Some options are:
- X10: to my knowledge X10 isn't 2-way

absolute shite
 
- Insteon: X10 follow up, don't know a lot about it

IIUC it's not at all an x10 followup though most insteon devices support x10...

i did some research on this a few years ago and recently built a house...i ended up dropping a small fortune on insteon controllers for every switch but so far it's been worth it -- they're fantastic...that said, i still can't interface with them...i have a device (i haven't had time to play with yet) that bridges insteon to http...

whatever i come up with will be in js, most likely on node...i'll get something on github probably within a month or two

Nikhil Marathe

unread,
May 28, 2010, 12:38:14 AM5/28/10
to nod...@googlegroups.com
On Fri, May 28, 2010 at 12:09 AM, Tys von Gaza <t...@tvg.ca> wrote:
> Not sure if this is place for Node.js application ideas...
>
> I've been wanting to use Node.js for a project since I heard about
> it.  I have also been thinking and doing a lot of research on home
> automation.  Some thing clicked and it would seem Node.js and home
> automation would be the perfect combination.
>
> While I haven't done much home automation, it seems to be largely
> event based.  Something happens, the system reacts to it.  Ie, sensor
> in the living room detects motion, turn on all lights in the living
> room.  It also seems to be async, commands to devices may take awhile,
> which would lend itself to node's architecture.
>
> Taking it one step further would be modelling the home using some sort
> of DOM.  Imagine being able to model your home like an HTML page and
> controlling how it looks and behaves with CSS and javascript.  Example
> w/ jQuery:
>

Please take a look at the UPnP standard for various things like light
switches and media players.
You might want to base your code on it, since it's an industry standard.

Nikhil

Serge in Darkness

unread,
May 28, 2010, 9:47:17 AM5/28/10
to nodejs
I recently thought about more or less related thing: Virtual world
control using Node.js (maybe even Opensim for SecondLife).

Tys von Gaza

unread,
May 29, 2010, 2:00:18 PM5/29/10
to nodejs
I'll have to take a closer look at UPnP, but for the short term I'll
probably avoid actually interfacing with the devices with node for the
time being as there is too many options out there and more coming. By
following the rhouse route and utilizing all the great work done by
LinuxMCE I can get to the interesting problems a lot quicker.

That being said if home.js is developed the right way then there
should be no issues with someone creating native node code to talk to
the devices directly.

Cheers,
Tys

Matteo Collina

unread,
May 9, 2013, 2:53:34 PM5/9/13
to nod...@googlegroups.com
Hi there, 

The jquery-like api to model an house seems super-cool.

While it's not DOM based, I'm trying to put all the pieces together for such API to happen,
from the low-level protocols to the REST apis needed to model this.
It has some Coffeescript inside, I'm going to get rid of it.

I've also done some presentations about this idea: http://www.slideshare.net/matteocollina/making-things-that-works-with-us

Cheers,

Matteo


2013/5/9 Lucas Vikström <lucas.v...@gmail.com>
Hello,
Did you get anywhere on this project? I would be interested in helping out because this is exactly what I would be in need of now also

best regards
Lucas Vikström

You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

JVA

unread,
May 10, 2013, 2:00:04 AM5/10/13
to nod...@googlegroups.com
Hi all,
Couple months ago i descripted about with same target project and already started implementation work. https://github.com/jupe/home.js. Its used node.js, express and mongoDB in backend and REST api with json objects. interested in the topic seems to be, so that all involved in the project ! :) .

Best Regards,
Jussi

Joe McCann

unread,
May 11, 2013, 12:26:16 AM5/11/13
to nod...@googlegroups.com
Yes moar of this.

Ninja blocks and even Arduinos can do some of this stuff. Truly only a matter of time until we progress hobby hacking to actual products for consumers.

AT&T bought a company a few years ago called Xanboo that has some of this functionality but the APIs were tragically bad.

Reply all
Reply to author
Forward
0 new messages