node package manager

iotdb

IOTDB.org

node-iotdb

A Node.JS platform for semantically control all your Things. 100% test coverage.

Hello, World

$ npm install iotdb
const iotdb = require("iotdb");
iotdb.use("homestar-wemo");

things = iotdb.connect("WeMoSocket");
things.set(":on", true)
things.set(":on", false)

N.B.

  • you must have installed the NPM package homestar-wemo
  • :on is the "semantic" term that universally means "turn/is something on or off". It expands to iot-purpose:on which in turn expands to the URL https://iotdb.org/pub/iot-purpose#on.
const iotdb = require("iotdb");
iotdb.use("homestar-wemo");

things = iotdb.connect("WeMoSocket");
things.on("istate", thing => {
	console.log("istate", thing.state("istate"));
	console.log("on", thing.get(":on"));
})

N.B.

  • istate is the actual current state of the Thing. In IOTDB a Thing may have many states associated with it, called bands.

Documentation

We are in the process of collecting all the documents into this project.

Start here: