# domoio

> Domoio api client

Latest version **0.1.0** (published 2018-01-12) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2018-01-12 |
| First published | 2018-01-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Domoio S.L. |
| Maintainers | domoio |

## Links

- npm: https://www.npmjs.com/package/domoio
- Repository: https://github.com/eloy/domoio.js
- Homepage: https://github.com/eloy/domoio.js#readme
- Issues: https://github.com/eloy/domoio.js/issues
- npm.io page: https://npm.io/package/domoio

## Dependencies (3)

- [phoenix](https://npm.io/package/phoenix.md) ^1.3.0
- [request](https://npm.io/package/request.md) ^2.83.0
- [websocket](https://npm.io/package/websocket.md) ^1.0.25

## Recent versions

- 0.1.0 (latest) — 2018-01-12

## README

# Javascript client for Domoio
This library let you receive notifications from Domoio, and change port states easily.

    var Domoio = require('domoio');

    const email = "user@somedomain.com";
    const password = "ultrasecret";
    const project_id = "ea739c8c-f82b-4e13-88ec-83ead4dd6014";

    // Register a port change listener
    Domoio.on('port_changed', (body) => {
      let {device_id, port_id, value} = body;

      // Turn off the device sendind 0
      if (value) {
        setTimeout(() => Domoio.setPort(device_id, "in", 0), 1000);
      }
    });

    // Connect to Domoio
    Domoio.start({email, password, project_id});

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