Giter Site home page Giter Site logo

vera-lifeshield's Introduction

vera-lifeshield

In Vera

  • Create a room for all plugin files you will use, I called mine Security
  • Install the Variable Container plugin and/or create one and assign it to the room
  • Install the Multiswitch plugin and/or create one and assign it to the room
  • In the Multiswitch, update for the button names for Disarm, Arm, Stay, Instant and set them to pulse
  • Install the Virtual Motion sensor from here http://forum.micasaverde.com/index.php/topic,23423.0.html Thanks @RexBeckett Note: I removed lines 48 and 49 from I_VMotion.xml prior to uploading to vera Note: I have found how to pull the battery status from Lifeshield, will have to look how we can integrate that into the Virtual Motion sensor
  • Add a Virtual Motion sensor for each door/window sensor in Lifeshield, naming them the same and keeping note of the device number
  • Download the attached php files and place them in a folder on a server that has php and some sort of web server installed. You can even use a .htaccess file in apache to lock down who has permissions to hit these files via URL. My vera has a static private IP, so I just allow that in the .htaccess file

On webserver

  • Copy config.ini.php do_lifeshield.php lifeshield.php to a directory you will serve from the webserver
  • Update the config.ini.php file, you must update any line with all CAPS after the = sign like, user, pass, base, vera_ip, etc...
  • Create file in same directory as lifeshield.php called sensor_names (Or change it and update config.ini.php to match) Format of the file is csv, with first line being "name,dev", example below.
name,dev
Front Door, 19
Back Door, 20
Kitchen Window, 21
  • Update permissions on config.ini.php to 0444, the webserver will serve it, but as long as you keep the first line, it will only return a ; in a browser
  • Once that is done, just run lifeshield.php from the command line of the server, If you are running something upstart based, like Ubuntu you can use lifeshield.conf file and place it in /etc/init/, updating the path the the php script, then run
cd /etc/init.d; ln -s /lib/init/upstart-job lifeshield
start lifeshield

In Vera

Now add 4 triggers under Automation for disarm, arm stay, arm away and arm instant based off of the MultiSwitch toggles add the below luup event for each one, I have a scene called just triggers and put stuff in there.

*Disarm

luup.inet.wget('http://IP_OF_WEBSERVER/PATH/do_lifeshield.php?f=disarm')

*Stay

luup.inet.wget('http://IP_OF_WEBSERVER/PATH/do_lifeshield.php?f=arm_stay')

*Away

luup.inet.wget('http://IP_OF_WEBSERVER/PATH/do_lifeshield.php?f=arm_away')

*Instant

luup.inet.wget('http://IP_OF_WEBSERVER/PATH/do_lifeshield.php?f=arm_instant')

To do

  • Add function back for checking if login failed and after 2 attempts create lock file
  • Add function to send alert if unable to login
  • Add function to dynamically update sensor_names from Vera
  • Add check, so that after pulling status from Vera, we will only send to vera if changed from last time

vera-lifeshield's People

Contributors

gibby avatar

Watchers

 avatar 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.