Announcement

Collapse
No announcement yet.

HS3 Trigger through HTTP Post

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

    HS3 Trigger through HTTP Post

    Hi Guys,

    Can anyone point me in the right direction to trigger an event (from my phone) using tasker and HTTP Post. I want to trigger an event when I call my fire brigade responding number and I saw a thread on HS2 and how to set a device value, and was wondering if anyone has triggered an event using HTTP post on HS3.

    I am keen to keep it HS3 centric and avoid using other interfaces, but also so I can pass basic auth through HTTP post.

    Thanks
    HS3 PRO, Win10, WeatherXML, HSTouch, Pushover, UltraGCIR, Heaps of Jon00 Plugins, Just sold and about to move so very slim system.

    Facebook | Twitter | Flickr | Google+ | Website | YouTube

    #2
    Look for a file named remote_test.htm in the HTML directory of HS3 for an example post.
    💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

    Comment


      #3
      Forgive me for not quite understanding the example post, but is there a way the post information can be structured like the below:

      PHP Code:
      Back to Tasker... To communicate with HSwe're going to use HTTP Post requests. So click on Net, then HTTP Post. On the Server:Port line, you'll use the following format to reach your HS serverUsername:Password@yourDDNS:homeseerportSo if your HS web server username is mickeypassword is mouse, and your server is configured on port 80enter mickey:mouse@yourdomain.com:80 In the Path fieldenter "/stif"with the but without the quotesIn the Data/File fieldenter the following two lines

      control_device=xxxx
      selectvalue
      =X

      where xxxx is the device reference ID
      , and X is the device value that indicates Home

      That almost does itNow we only need to create a task that changes the status to Away when not near home wifiSo click the back arrow to return to the Task Edit  screenTo make the last step easierI suggest long pressing on the  HTTP Post line we've just created. This will bring up some edit options.  Click the copy icon. Then we want to click the back button again to  return to the profiles list. You should see your Activate Home task with a green arrow next to it. Long press on this task, and from the popup, select Add Exit Task. Now once again select New Task +, and enter a name such as Activate Away. On the Task Edit  screen, long-press on the white background and select Paste from the  popup. Now select the HTTP Post command you just pasted. The only thing  that needs to change here is the value of the "selectvalue=". Change it  to whatever indicates you are now away from home.

      The last thing I would recommend doing is to rename the profile we  created in Tasker. To do this, return to the profile screen using the  back arrow. Then just long press on the Wifi Near ... profile and click the A that appears in the top menu bar. Input a name and select the check mark to save. Your work in Tasker should be done. 

      Now just dream up all of the cool things that location awareness can add to Homeseer and add a bit more automation to your day. 

      If you would like to directly trigger a Homeseer event, there are a few  changes you need to make to the HTTP Post command. On the Path line, change /stif to /evls. On the Data/File line, enter run_event=xxxxxx, where xxxxxx is the exact name of your event. Thanks to CocoonTech for that tidbit. 
      So with HS2 you could post run_event=xxxxxxx in tasker, what is the equilivant in HS3?

      Thanks,
      HS3 PRO, Win10, WeatherXML, HSTouch, Pushover, UltraGCIR, Heaps of Jon00 Plugins, Just sold and about to move so very slim system.

      Facebook | Twitter | Flickr | Google+ | Website | YouTube

      Comment


        #4
        remote_test.htm doesnt work in HS3.

        Take a look at this thread - it has what you need to call HS events from tasker...
        HS4Pro on a Raspberry Pi4
        54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
        Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI

        HSTouch Clients: 1 Android

        Comment


          #5
          Travis,

          If you are still running the PHLocation plug-in then it already has built-in support for http post handling and basic auth so I may be able to add something to the plug-in for you to say run a script with the data as parameter(s).

          Paul..

          Comment


            #6
            Hi Paul,

            Thanks for the offer, I am really just looking to be able to call an event when triggered through tasker.

            Some background, when I respond to a fire call we have a system in place where we call a number which registers who called it and when. At our station it then displays the fire call information as well as a scrolling message with the people who have called the number (and are therefore attending) and how long ago they called so we can get an idea on who is coming.

            What I want to do is to be able to use tasker to trigger an event if I call that number, I can get this to work in that tasker can detect if a call is made to that number fine, however what I want to do is then trigger an event which sends me more information.

            The issue with the restful interface is that I will not always be on VPN, or at home so I really want the HTTP_Post facility where I can pass a username and password through the https based connection and maintain security rather than have to worry about forwarding this and that and opening up my system.

            If the web server of PHLocation was able to handle HTTP post, and could be used to change a device value/status, and trigger events that would be ideal by the sounds of it
            HS3 PRO, Win10, WeatherXML, HSTouch, Pushover, UltraGCIR, Heaps of Jon00 Plugins, Just sold and about to move so very slim system.

            Facebook | Twitter | Flickr | Google+ | Website | YouTube

            Comment


              #7
              PHLocation handles http post and basic auth already, that's how it does Backitude and Btraced.

              I'll have a look at adding the option for a custom url tonight.

              Paul..

              Comment


                #8
                Originally posted by sooty View Post
                PHLocation handles http post and basic auth already, that's how it does Backitude and Btraced.

                I'll have a look at adding the option for a custom url tonight.

                Paul..
                sooty
                I know this is super old thread but I'm also looking for a better way to trigger Events and set Devices. I've been sending JSON via HTTP, which opens a browser page that must be closed manually.
                example:
                <a href="https://connected2.homeseer.com/JSON?user=USER&pass=PASS&request=controldevicebyvalue&ref=11 80&value=0">Disable Alerts for 1 hour</a>

                Does PHlocation have a better way built-in?

                thx!

                Comment

                Working...
                X