npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

frontpoint

v1.2.0

Published

FrontPoint Security API client.

Downloads

7

Readme

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

| Param | Type | Description | | --- | --- | --- | | username | string | FrontPoint username. | | password | string | FrontPoint 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

| Param | Type | Description | | --- | --- | --- | | systemID | string | ID 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. | | authOpts | Object | Authentication object returned from the login method. |

frontpoint~getPartition(partitionID, authOpts) ⇒ Promise

Get information for a single security system partition.

Kind: inner method of frontpoint

| Param | Type | Description | | --- | --- | --- | | partitionID | string | Partition ID to retrieve | | authOpts | Object | Authentication object returned from the login method. |

frontpoint~getSensors(sensorIDs, authOpts) ⇒ Promise

Get information for one or more sensors.

Kind: inner method of frontpoint

| Param | Type | Description | | --- | --- | --- | | sensorIDs | string | Array.<string> | Array of sensor ID strings. | | authOpts | Object | Authentication 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

| Param | Type | Description | | --- | --- | --- | | partitionID | string | Partition ID to arm. | | authOpts | Object | Authentication object returned from the login method. | | opts | Object | Optional arguments for arming the system. | | opts.noEntryDelay | boolean | Disable the 30-second entry delay. | | opts.silentArming | boolean | Disable 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

| Param | Type | Description | | --- | --- | --- | | partitionID | string | Partition ID to arm. | | authOpts | Object | Authentication object returned from the login method. | | opts | Object | Optional arguments for arming the system. | | opts.noEntryDelay | boolean | Disable the 30-second entry delay. | | opts.silentArming | boolean | Disable 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

| Param | Type | Description | | --- | --- | --- | | partitionID | string | Partition ID to disarm. | | authOpts | Object | Authentication object returned from the login method. |