# ring-alarm

> Ring.com Doorbell API (based on doorbot)

Latest version **0.1.1** (published 2018-10-26) · BSD-3-Clause license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install ring-alarm
pnpm add ring-alarm
yarn add ring-alarm
bun add ring-alarm
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2018-10-26 |
| First published | 2018-10-22 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 28.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Marshall Rose |
| Maintainers | mrose17 |
| Keywords | ring, alarm |

## Links

- npm: https://www.npmjs.com/package/ring-alarm
- Repository: https://github.com/homespun/ring-alarm
- Issues: https://github.com/homespun/ring-alarm/issues
- npm.io page: https://npm.io/package/ring-alarm

## Dependencies (2)

- [debug](https://npm.io/package/debug.md) ^2.6.8
- [socket.io](https://npm.io/package/socket.io.md) ^2.1.1

## Alternatives

- [persona-harness](https://npm.io/package/persona-harness.md) — 4.7K weekly downloads
- [@tsparticles/effect-bubble](https://npm.io/package/@tsparticles/effect-bubble.md) — 4.6K weekly downloads
- [f3d](https://npm.io/package/f3d.md) — 730 weekly downloads
- [spark-html-motion](https://npm.io/package/spark-html-motion.md) — 298 weekly downloads
- [cra-template-particles-typescript](https://npm.io/package/cra-template-particles-typescript.md) — 227 weekly downloads

## Recent versions

- 0.1.1 (latest) — 2018-10-26
- 0.1.0 — 2018-10-22

## README

Ring.com Alarm API
=====================
This package is based on Dav Glass' [doorbot](https://github.com/davglass/doorbot) package.
However, instead of dealing with Ring's excellent line of video doorbells and spotlights,
this package deals with Ring's alarm station.

Installation
------------

    npm install ring-alarm


Usage
-----

    const ring = RingAPI({
      email: 'user@example.com'
      password: 'secret'
    });

    // get list of stations associated with the account
    ring.stations((err, stations) => {
      if (err) ...;
      
      stations.forEach((station) => {
        // get devices associated with each station
        ring.getAlarmDevices(station, (err, station, message) => {
          if (err) ...;

          message.body.forEach((device) => {
          // get properties associated with each device

            ...
          });
        });

        // register for DataUpdate messages
        ring.setAlarmCallback(station, 'DataUpdate', (err, station, message) => {
          if (err) ...;

          ...
        });

        // set alarm mode
        //   panelId: `zid` property of security-panel device
        //   mode: 'all', 'some', 'none'
        //   bypassSensorIs: an array of `zid` properties of sensor.* devices
        ring.setAlarmMode(station, panelId, mode, bypassSensorIds, (err, station, message) => {
          if (err) ...;

          ...
        });

        // done getting information about station
        ring.closeAlarmCollection(station);
      });
    });

# Many Thanks
Many thanks to [davglass](https://github.com/davglass) author of
[doorbot](https://github.com/davglass/doorbot).

Many thanks (also) to [joeyberkovitz ](https://github.com/joeyberkovitz) who submitted a
[PR](https://github.com/davglass/doorbot/pull/27) to the doorbot repository.

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