Announcement

Collapse
No announcement yet.

Abode Security System?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    So I have python installed and the abodepy package installed.

    I can run abodepy commands from command line and it is working, but I cannot figure out how to run the commands from Homeseer events.

    Example code I would like to run:
    abodepy -u account@gmail.com -p Password --arm home

    ​I tried making it into a .cmd file and using event to run program. Nothing
    I tried putting cmd.exe path as the program and adding the code as a parameter.

    I could not find a way to run this cmd command in events. It seems very simple.

    Comment


      #17
      For Hubspace integration I used the Python library that was developed to interface with Hubspace devices and then added a script that accepted HS commands using MQTT protocol and returned status over the same. This was done in the mcsMQTT plugin that launches the Python script periodically polls status and delivers commands via HS devices that were setup. If you are interested in this approach then I can provide the Hubspace script I developed. If you are willing to privately provide access to your Abode account then I can do the full integration within the mcsMQTT plugin.

      While I did not use the HS script command hs.Launch with mcsMQTT, I believe it is the way you can all a Python script from HS event/script.

      Comment


        #18
        Originally posted by Michael McSharry View Post
        For Hubspace integration I used the Python library that was developed to interface with Hubspace devices and then added a script that accepted HS commands using MQTT protocol and returned status over the same. This was done in the mcsMQTT plugin that launches the Python script periodically polls status and delivers commands via HS devices that were setup. If you are interested in this approach then I can provide the Hubspace script I developed. If you are willing to privately provide access to your Abode account then I can do the full integration within the mcsMQTT plugin.

        While I did not use the HS script command hs.Launch with mcsMQTT, I believe it is the way you can all a Python script from HS event/script.
        Thanks, that method seems a lot more complex than I need right now. Only thing I want to do is change Abode status from Homeseer.
        Ifttt is working pretty well to do the opposite, telling Homeseer when Abode status is changed.

        I would think there is an easy way to run the one line abodepy cmd in the event by either the script or run program function. But I haven't been able to figure that out.

        Comment


          #19
          Originally posted by Ninjab View Post

          Thanks, that method seems a lot more complex than I need right now. Only thing I want to do is change Abode status from Homeseer.
          Ifttt is working pretty well to do the opposite, telling Homeseer when Abode status is changed.

          I would think there is an easy way to run the one line abodepy cmd in the event by either the script or run program function. But I haven't been able to figure that out.
          look at hs.launch and run it as an immediate script command from an event.
          "if I have seen further [than others], it is by standing on the shoulders of giants." --Sir Isaac Newton (1675)

          Comment


            #20
            Here's the vb script I'm using to trigger Abode events (zip file attached). You'll need to edit the script to change the AppPath to wherever your abode is stored, and you'll need to update the Abode username and password. Then, once done, in your Homeseer event, you simply call the script and add the parameter such as "--arm home" to the event. (see screenshot). Let me know if you have questions. I have more infrastructure also put in around it - I have a python script that maintains a constant connection to Abode and listens for things like doors and windows open/closing, and ties them back to virtual devices in HS, and if you use the Abode app to arm/disarm, HS catches it and automatically updates the status in HS too. Let me know if you want all that stuff. It's pretty rough, but it's all there if you want to play with it.

            Click image for larger version

Name:	image.png
Views:	52
Size:	38.7 KB
ID:	1596407

            Comment


              #21
              I finally got this to work. Using Run Program, you would think just putting the path to the .bat file would work. However, this did not work for me. There must be a permission problem where it is not able to run as administrator.
              I am running HS4 Pro on Win10, HS4 is running as a service.

              Instead, I had to created a scheduled task that runs with highest privileges and when user is logged in or logged out. I then created a shortcut to this scheduled task. I put the shortcut path in homeseer and it works! I followed this article for the scheduled task part: Run Cmd Prompt as Administrator With This Desktop Shortcut - TechWiser

              Now I can set the Abode Status with Homeseer!
              I am using IFTTT to tell homeseer when Above changes status, this has some lag but is usable for my purposes. The opposite was unusable, IFTTT is much too slow at changing Abode status from Homeseer. Someday maybe I will switch everything over to using the Abode python API as well, but I am happy for now.

              Brief Summary for others trying to implement this:
              Install Python (from python website, make sure to click box for Path on Install, and do not install from Windows Store)
              In CMD prompt (run as administrator) install abodepy with this command: pip install abodepy
              Create a scheduled task and a shortcut to that task (tutorial linked above, but also check box to run if user signed off) for each command you want to use
              Create Event in Homeseer and use Run A Program, put path for the links you created make sure to remove quotes from path.



              -I will have to try that script sometime, looks pretty powerful.

              Comment


                #22
                Paul, curious how you are running Homeseer: Linux or Windows, and if Windows are you running it as a service? I am wondering if your script will have windows permissions issues if running as a service.

                Comment


                  #23
                  Originally posted by Ninjab View Post
                  Paul, curious how you are running Homeseer: Linux or Windows, and if Windows are you running it as a service? I am wondering if your script will have windows permissions issues if running as a service.
                  I have Homeseer running on a Windows box. While mine doesn't run as a service technically (there used to be issues around that historically), I wouldn't forsee there being any permissions issues running this as a service. Basically I have a python script that calls abodepy, logs in and then just sits there listening to the incoming log from Abode. As each line comes in the script is testing it for triggers, and if it finds a trigger that I care about, it fires up an HS api command to change the state of whatever virtual device I have in HS representing the item in Abode. From there, HS does the rest of the heavy lifting to do whatever things I want based on what changed.

                  Comment


                    #24
                    And to clarify a bit more - I have the HS startup script configured to fire up my abode connection script.

                    Comment

                    Working...
                    X