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

homebridge-alarmdecoder

v0.99.0

Published

HTTP based SecuritySystem plugin for homebridge: https://github.com/nfarina/homebridge, with readable state, modified to work with alarmdecoder

Downloads

4

Readme

homebridge-alarmdecoder

Note: An updated version available at (https://github.com/aficustree/homebridge-alarmdecoder-platform) uses homebridge platforms and exposes sensors/zones as well. I will only update the platform version.

Homebridge plugin for the alarmdecoder (alarmdecoder.com) interface to Honeywell/DSC Systems. It requires a functioning alarmdecoder-webapp (https://www.alarmdecoder.com/wiki/index.php/AlarmDecoder_WebApp) for the homebridge plugin to contact (via the rest API). Please make sure your webapp is updated with the latest alarmdecoder python package.

This plugin can be used as a security system in HomeKit/Homebridge. It creates a Homebridge accessory which uses HTTP calls to arm, disarm and check the status of security systems and provides the Service.SecuritySystem service to HomeKit with both the SecuritySystemCurrentState and the SecuritySystemTargetState characteristics implemented. If alarmdecoder webui is setup to push notifications, system will listen on the noted port and execute a rest API query to get state.

Installation

  1. Install homebridge using: npm install -g homebridge
  2. Install homebridge-alarmdecoder using: npm install -g git+https://github.com/aficustree/homebridge-alarmdecoder.git#master
  3. Update your configuration file. See sample-config.json in this repository for a sample.

Configuration

This module requires that the URLs for getting and setting the security system's state are configured correctly. This has to be done in Homebridge's config.json. You can find a sample configuration file in this repository.

The configuration options are the following:

Configuration example with explanation

    "accessories": [
        {
            "accessory": "alarmdecoder",
            "name": "Alarm System",
            "key": "YOUR API KEY FROM ALARMDECODER GUI",
            "port": "port to listen on for push messages from alarmdecoder",
            "urls": {
                "stay": { "url": "http://YOURIP:YOURPORT/api/v1/alarmdecoder/send", "body": "11113" },
                "away": { "url": "http://YOURIP:YOURPORT/api/v1/alarmdecoder/send", "body": "11112" },
                "night": { "url": "http://YOURIP:YOURPORT/api/v1/alarmdecoder/send", "body": "111133" },
                "disarm": { "url": "http://YOURIP:YOURPORT/api/v1/alarmdecoder/send", "body": "11111" },
                "readCurrentState": { "url": "http://YOURIP:YOURPORT/api/v1/alarmdecoder", "body": "" },
                "readTargetState": { "url": "http://YOURIP:YOURPORT/api/v1/alarmdecoder", "body": "" }
        }
    ]
  • The name parameter determines the name of the security system you will see in HomeKit.
  • The urls section configures the URLs that are to be called on certain events.
    • The stay, away and night URLs are called when HomeKit is instructed to arm the alarm (it has 3 different alarm on states)
    • The disarm URL is used when HomeKit is instructed to disarm the alarm
    • The readCurrentState and readTargetState are used by HomeKit for querying the current state of the alarm device. It should return a JSON with the status from alarmdecoder, internally, it's remapped to the below state integers.
      • "0": stay armed
      • "1": away armed
      • "2": night armed
      • "3": disarmed
      • "4": alarm has been triggered
  • Replace "1111" in body with your four digit passcode, the remaining digits set the alarm mode (3 for stay, 2 for away, 33 for night, 1 for off)
  • stay/away/night/disarm are POST, read is a GET