Skip to content

joeyberkovitz/ring-alarm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ring.com Alarm API

This package is based on Dav Glass' 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: '[email protected]'
  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 author of doorbot.

Many thanks (also) to joeyberkovitz who submitted a PR to the doorbot repository.

About

Ring.com Alarm API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%