# iotdb

> IOTDB.org

Latest version **3.0.12** (published 2017-04-15) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install iotdb
pnpm add iotdb
yarn add iotdb
bun add iotdb
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.12 |
| Published | 2017-04-15 |
| First published | 2014-04-18 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 47 |
| Author | David P. Janes |
| Maintainers | dpjanes |
| Keywords | IOTDB, IOT, Internet, Things, Hardware, Raspberry, Pi, Arduino, Firmata |

## Links

- npm: https://www.npmjs.com/package/iotdb
- Repository: https://github.com/dpjanes/node-iotdb
- Issues: https://github.com/dpjanes/node-iotdb/issues
- npm.io page: https://npm.io/package/iotdb

## Dependencies (3)

- [semver](https://npm.io/package/semver.md) ~5.3.0
- [iotdb-thing](https://npm.io/package/iotdb-thing.md) ~3.0.9
- [iotdb-helpers](https://npm.io/package/iotdb-helpers.md) ~3.0.29

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 3.0.12 (latest) — 2017-04-15
- 3.0.11 — 2017-03-31
- 3.0.10 — 2017-03-12
- 3.0.9 — 2017-01-01
- 3.0.8 — 2017-01-01
- 3.0.7 — 2016-10-24
- 3.0.6 — 2016-09-08
- 3.0.5 — 2016-09-06
- 3.0.4 — 2016-09-02
- 3.0.3 — 2016-08-30
- 3.0.2 — 2016-08-23
- 3.0.1 — 2016-08-18
- 0.14.2 — 2016-05-12
- 0.14.1 — 2016-04-30
- 0.13.8 — 2016-04-07
- … 181 more at https://npm.io/package/iotdb/versions

## README

# node-iotdb

<img src="https://raw.githubusercontent.com/dpjanes/iotdb-homestar/master/docs/HomeStar.png" align="right" />

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 off

	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 <code>homestar-wemo</code>
* <code>:on</code> is the "semantic" term that universally means "turn/is something on or off". It expands to <code>iot-purpose:on</code> which in turn expands to the URL <code>https://iotdb.org/pub/iot-purpose#on</code>.

## 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. 
* <code>istate</code> is the actual current state of the Thing. In IOTDB a Thing may have many states associated with it, called <i>bands</i>.

# 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)

---
_Source: https://npm.io/package/iotdb · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
