1.2.0 • Published 6 years ago

frontpoint v1.2.0

Weekly downloads
2
License
MIT
Repository
-
Last release
6 years ago

Node.js Frontpoint Client

Unofficial FrontPoint Security API client. Currently supports querying security system and sensor states, arming, and disarming.

Usage

Install: npm i frontpoint

Querying:

const frontpoint = require('frontpoint')

frontpoint
  .login('your_username', 'your_password')
  .then(authOpts => frontpoint.getCurrentState(authOpts.systems[0], authOpts))
  .then(res => {
    console.log('Security Systems:', res.partitions)
    console.log('Sensors:', res.sensors)
  })
  .catch(err => console.error(err))

Arming:

const frontpoint = require('frontpoint')

frontpoint
  .login('your_username', 'your_password')
  .then(authOpts => {
    return frontpoint
      .getCurrentState(authOpts.systems[0], authOpts)
      .then(res => {
        // This will take 20-30 seconds
        frontpoint.armStay(res.partitions[0].id, authOpts).then(res => {
          console.log(res)
        })
      })
  })
  .catch(err => console.error(err))

Documentation

frontpoint~login(username, password) ⇒ Promise

Authenticate with alarm.com using the my.frontpointsecurity.com single sign-on portal. Returns an authentication object that can be passed to other methods.

Kind: inner method of frontpoint

ParamTypeDescription
usernamestringFrontPoint username.
passwordstringFrontPoint password.

frontpoint~getCurrentState(systemID, authOpts) ⇒ Promise

Retrieve information about the current state of a security system including attributes, partitions, sensors, and relationships.

Kind: inner method of frontpoint

ParamTypeDescription
systemIDstringID of the FrontPoint system to query. The Authentication object returned from the login method contains a systems property which is an array of system IDs.
authOptsObjectAuthentication object returned from the login method.

frontpoint~getPartition(partitionID, authOpts) ⇒ Promise

Get information for a single security system partition.

Kind: inner method of frontpoint

ParamTypeDescription
partitionIDstringPartition ID to retrieve
authOptsObjectAuthentication object returned from the login method.

frontpoint~getSensors(sensorIDs, authOpts) ⇒ Promise

Get information for one or more sensors.

Kind: inner method of frontpoint

ParamTypeDescription
sensorIDsstring | Array.<string>Array of sensor ID strings.
authOptsObjectAuthentication object returned from the login method.

frontpoint~armStay(partitionID, authOpts, opts) ⇒ Promise

Arm a security system panel in "stay" mode. NOTE: This call generally takes 20-30 seconds to complete.

Kind: inner method of frontpoint

ParamTypeDescription
partitionIDstringPartition ID to arm.
authOptsObjectAuthentication object returned from the login method.
optsObjectOptional arguments for arming the system.
opts.noEntryDelaybooleanDisable the 30-second entry delay.
opts.silentArmingbooleanDisable audible beeps and double the exit delay.

frontpoint~armAway(partitionID, authOpts, opts) ⇒ Promise

Arm a security system panel in "away" mode. NOTE: This call generally takes 20-30 seconds to complete.

Kind: inner method of frontpoint

ParamTypeDescription
partitionIDstringPartition ID to arm.
authOptsObjectAuthentication object returned from the login method.
optsObjectOptional arguments for arming the system.
opts.noEntryDelaybooleanDisable the 30-second entry delay.
opts.silentArmingbooleanDisable audible beeps and double the exit delay.

frontpoint~disarm(partitionID, authOpts) ⇒ Promise

Disarm a security system panel. NOTE: This call generally takes 20-30 seconds to complete.

Kind: inner method of frontpoint

ParamTypeDescription
partitionIDstringPartition ID to disarm.
authOptsObjectAuthentication object returned from the login method.