Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dpjanes/node-iotdb
Easily control the Internet of Things using Semantics
https://github.com/dpjanes/node-iotdb
Last synced: 5 days ago
JSON representation
Easily control the Internet of Things using Semantics
- Host: GitHub
- URL: https://github.com/dpjanes/node-iotdb
- Owner: dpjanes
- License: apache-2.0
- Created: 2014-06-15T15:25:55.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-04-15T19:05:35.000Z (over 7 years ago)
- Last Synced: 2024-04-26T03:45:05.010Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 1.66 MB
- Stars: 47
- Watchers: 10
- Forks: 10
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-starred - dpjanes/node-iotdb - Easily control the Internet of Things using Semantics (others)
README
# node-iotdb
A Node.JS platform for semantically control all your Things.
100% test coverage.**Node.JS 6 or higher is required!**
# Hello, World
## Install IOTDB
$ npm install iotdb
## Turn WeMo on or offconst 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 packagehomestar-wemo
*:on
is the "semantic" term that universally means "turn/is something on or off". It expands toiot-purpose:on
which in turn expands to the URLhttps://iotdb.org/pub/iot-purpose#on
.## Wait for a WeMo to change state
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:
* [https://github.com/dpjanes/node-iotdb/tree/master/docs](https://github.com/dpjanes/node-iotdb/tree/master/docs)