GithubHelp home page GithubHelp logo

parnic / mmm-ringalarm Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 407 KB

Ring alarm module for MagicMirror². Enables display and control of Ring alarm devices.

License: MIT License

JavaScript 90.56% CSS 9.44%
alarm automation javascript magicmirror magicmirror2 mmm mmm-module ring smarthome

mmm-ringalarm's Introduction

MMM-RingAlarm

MagicMirror² module used to connect to Ring alarms. The current status of the alarm is displayed, and pressing the button allows changing the alarm mode (arming/disarming) optionally protected with a code.

Installation

  1. Navigate into your MagicMirror's modules folder and execute git clone https://github.com/parnic/MMM-RingAlarm.git
  2. cd MMM-RingAlarm
  3. Execute npm install --production to install the node dependencies. Note: Node 18+ is required.
  4. Execute npm run auth and follow the instructions. Copy the resulting refresh token you receive for the config in the next step.
  5. Add the module inside config.js placing it where you prefer. Make sure to set the refreshToken property to the one given by the previous step.

Config

Option Type Description Default
refreshToken String Required. Contains the refresh token given by the npm run auth command which gives access to your account. ''
pins Array of arrays of numbers If one of the requirePin options is enabled, this is a list of valid codes to arm/disarm the alarm. Example: [[1,2,3,4], [0,0,0,0]] undefined
requirePinToArm Boolean Whether to require a code when arming the alarm. If false, there is no security on arming the alarm. Requires at least one pin to be set in the pins property. false
requirePinToDisarm Boolean Whether to require a code when disarming the alarm. If false, there is no security on disarming the alarm. Requires at least one pin to be set in the pins property. true

Here is an example of an entry in config.js

{
    module: 'MMM-RingAlarm',
    header: 'Ring alarm',
    position: 'top_left',
    config: {
        refreshToken: 'abcd1234=',
        pins: [[1,2,3,4], [0,0,0,0]],
        requirePinToArm: true
    }
},

Screenshot

Screenshot

Disclaimer

Once you've entered a refresh token, access to your account is stored on the device running MagicMirror. If someone else has access to these files, they can get a hold of your token and do anything with your account.

The client UI portion also has access to call functions on the server that will arm or disarm the system, including the ability to bypass the code (since that's enforced by the client, not the server). This means if someone has access to the client page to run arbitrary javascript functions, they can modify your alarm status from there.

I am not responsible for any unauthorized access to your alarm from the use of this module. You are responsible for securing the installation.

Notes

Pull requests are very welcome! If you'd like to see any additional functionality, don't hesitate to let me know.

mmm-ringalarm's People

Contributors

dependabot[bot] avatar parnic avatar

Stargazers

 avatar

Watchers

 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.