Announcement

Collapse
No announcement yet.

HTTP event trigger?

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

    HTTP event trigger?

    Is there a way to send direct commands to Homeseer (or web server) to run events or control devices via http / html? I am trying to get the functionality of running the actual event from a xml browser, just as if you were clicking 'run' under the events page on the full blown browser?

    Any other ideas?

    Thanks...

    #2
    I use this within an html program

    HTML Code:
    <INPUT type="submit" value="Camera ON LRoom A1" name=run_event>
    It runs the "Camera ON LRoom A1" event.

    Comment


      #3
      This is also covered in the documentation at this link
      Regards,

      Rick Tinker (a.k.a. "Tink")

      Comment


        #4
        Jeff, thanks for the input. If you could not already tell, I am not much of a html programmer. All the examples of post code (HS help file, etc) seem that this code needs to be run from the same server as the HS server? I would like to pass an http request to HS to run an event, i guess without having to build separate html code / programs on the server. Maybe this isn't possible and I need to build an XML website that passes these strings/requests directly to HS. Man I feel dumb, never dealt much with the application side of the house...

        Comment


          #5
          Originally posted by Rick Tinker View Post
          This is also covered in the documentation at this link
          Yeah, I read through that in the HS help file. Not trying to just dump my questions out there without ~some research

          As I mentioned before I don't consider myself any sort of HTML coder. I can build a XML front end to pass URL strings into the server, but I don't know enough about the backend to know what to do.

          Do I need a HTML for dummies?

          Comment


            #6
            I use ROVER, and just pass calls to that.

            I don't have access to my server right now, but I basically make a call to Rover to execute the command / event / etc. that I want, then have the webpage return from whence it came.

            --Dan
            Tasker, to a person who does Homeautomation...is like walking up to a Crack Treatment facility with a truck full of 3lb bags of crack. Then for each person that walks in and out smack them in the face with an open bag.

            Comment


              #7
              Originally posted by drozwood90 View Post
              I use ROVER, and just pass calls to that.

              I don't have access to my server right now, but I basically make a call to Rover to execute the command / event / etc. that I want, then have the webpage return from whence it came.

              --Dan
              Nice, just what I was looking for!

              Do you mean something like this, where TEST_EVENT_ON is what I want to trigger?

              http://x.x.x.x/rover.asp?action=eventTEST_EVENT_ON

              Comment


                #8
                Originally posted by drozwood90 View Post
                I use ROVER, and just pass calls to that.

                I don't have access to my server right now, but I basically make a call to Rover to execute the command / event / etc. that I want, then have the webpage return from whence it came.

                --Dan
                It works! very cool. Now, what coding do you use to get back to my original web page? I have this url embedded in the XML page, but once I select it it want to go to another rover page (default, parlor, etc). I want to go back to the original xml page on a seperate server.

                Thanks for the help and HTML 101 class. Heck it probably isn't even 101, more like 99

                Comment


                  #9
                  For those who are trying to do something similar, here is how I have been able to get this done:

                  1) In the XML browser code I am placing menu items that correlate to a URL so when the selection is made the XML browser is asked to open a URL

                  2) The URL is a simple (very simple) ASP page that I have cobbled together to basically runs a HS event and spits back a response like 'success, the lights are now on'.

                  3) The ASP page is simply an HS.TrigggerEvent call that triggers an event by name and uses response.write to send back some text.

                  4) I then use either a exit or back button to get the user back to where they need to go.

                  Here is the code for one of the asp pages: (please don't make fun of my coding skills )

                  Code:
                  <%@ Language=JavaScript %>
                  <% 
                  var serverIP = Request.ServerVariables("LOCAL_ADDR");
                  var SERVICE_DIR="IPServices";
                  
                  //Select Another Event
                      Response.Write("You have enabled the outside lighting\r\n");
                      Response.Write("\r\n");
                      Response.Write("Please select exit to go back...\r\n");
                  
                  hs.TriggerEvent ( "outside_lighting" )
                  
                  
                  
                  %>

                  Comment

                  Working...
                  X