Announcement

Collapse
No announcement yet.

Send an arbitrary URL (ie. to make an external API call)

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

    Send an arbitrary URL (ie. to make an external API call)

    I want to mess with an http API on some external devices I have, but I need a way to send the HTTP requests. Any way to do so? ie. I'd like to create a Homeseer event that, when triggered, calls http://mydeviceip/the/device/api/call?foo-bar , which might make the device turn in circles. .

    Any suggestions on how to do this?

    Paul

    #2
    You can do it via scripting.

    Check out the documentation here: http://www.homeseer.com/support/home...lp/default.htm specifically under scripting -> internet -> GetURL.

    If you aren't familiar with scripting, just respond back. If you aren't looking to do anything with the response, you can do an immediate script command (select Run script or script command from the action menu on the event then check "immediate script command").

    You would put something like this in the box: &hs.GetURL("HomeSeer.com","/",TRUE,80)

    Comment


      #3
      Thank you, indeed I don't need to do anything with the response, so the immediate script command is likely the way to go. I'll give it a shot. Thanks!


      Sent from my iPhone using Tapatalk

      Comment


        #4
        Originally posted by paul View Post
        Thank you, indeed I don't need to do anything with the response, so the immediate script command is likely the way to go.
        Depending on the context of your command, you may find that your device wants to display the website you are accessing. You can avoid that by providing a return variable to contain the returned information.
        Mike____________________________________________________________ __________________
        HS3 Pro Edition 3.0.0.548, NUC i3

        HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

        Comment


          #5
          Originally posted by Uncle Michael View Post
          Depending on the context of your command, you may find that your device wants to display the website you are accessing. You can avoid that by providing a return variable to contain the returned information.
          if I don't do anything in particular to throw away the resulting output, will it have any actual impact on the server or event?

          Comment


            #6
            I'd just try it and see what happens.
            Mike____________________________________________________________ __________________
            HS3 Pro Edition 3.0.0.548, NUC i3

            HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

            Comment

            Working...
            X