TRIGGERcmd
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Arm/Disarm Security system via Google/Alexa

    Raspberry Pi
    homegenie x10 alexa google assistan raspberry pi
    1
    3
    601
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • tuicemenT
      tuicemen
      last edited by tuicemen

      There are several ways to do this but for this thread I'm going to show you how to send the commands to HomeGenie (HG).
      HG comes with a security console widget not associated with any alarm system. So you have to set that up to be able to Arm or Disarm a physical system. I set mine up with a X10 security console.
      I synced the HG widget to a X10security palm pad remote but you could do it for a X10 Security key flob. Which ever way the remote has to also be registered to the Security console. Now if you wish the HG widget not to actually control a physical Security system nothing needs to be synced.
      This is using the TRIGGERcmd smarthome so only Arm and Disarm are in the Security bash script (for now).

      #!/bin/bash
      
      if [ $1 = "on" ]
      then(
      s=$(curl -s http://HGAddress/api/HomeAutomation.HomeGenie.Automation/90/Control.ArmAway)
      echo " $s"
      )
      else(
      s=$(curl -s http://HGAddress/api/HomeAutomation.HomeGenie.Automation/90/Control.Disarm)
      #if [ $s='{"ResponceValue":Disarmed"}' ]
      #then (
      echo " $s"
      
      

      Replace GHAddress with the IP:Port of your HG server

      this is the line to add to the Commands.json provided your Security script is in the home/pi/scripts folder

      #{"trigger":"Security","command":"/home/pi/scripts/Security.sh","ground":"background","voice":"Security","allowParams":"true"},
      
      1 Reply Last reply Reply Quote 0
      • tuicemenT
        tuicemen
        last edited by tuicemen

        If your like me and don't like the idea of Alexa or Google having the ability to Disarm there are a few options. In the OP I have the script to arm the system in away mode. You could have the off command arm in home mode.
        Here is the difference the arm away has a bit longer delay arming though I don't notice much of a difference. It also allows all sensors to trigger the alarm.
        The Home mode doesn't allow motion sensors to trigger the alarm.

        The other thing you could do is not use the bash script and just use the curl arm command in the command part of the line in the commands.json file

        tuicemenT 1 Reply Last reply Reply Quote 0
        • tuicemenT tuicemen referenced this topic on
        • tuicemenT
          tuicemen @tuicemen
          last edited by

          Here's the command to arm the HG security system widget to armed home.

          curl http://HGAddress/api/HomeAutomation.HomeGenie.Automation/90/Control.ArmHome
          
          1 Reply Last reply Reply Quote 0
          • First post
            Last post