Git Product home page Git Product logo

homebridge-alarmdecoder's Introduction

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

homebridge-alarmdecoder's People

Contributors

aficustree avatar nitaybz avatar codetwice avatar jeffdoll-wf avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.