Posts for #home-controller-examples

  • Insteon Event Handling API Example

    This is an example of an application using lighting and motion events provided by the home-controller module.

    We'll be looking at how to use the following asynchronous event logic to make complex home automation logic.

    Lighting Turn On Event

    light('insteonId').on('turnOn', function () {

    Motion Sensor Event

    motion('insteonId').on('motion', function () {
    ... read more
  • Insteon Blinking Node.js App

    This is a quick example of a simple Node.js application using the home-controller module.

    To start, we need to add the home-controller module to our package. (I'll assume your package.json exists).

    npm install home-controller --save

    We can start with the following template for using the Insteon class from the home-controller module.

    var Insteon = require('home-controller').Insteon;
    var gw = new Insteon();
    var host = ''; // Hub IP Address
    gw.connect(host, function () {
      // connected to the Insteon Hub
    ... read more