Announcement

Collapse
No announcement yet.

How to send HTTP "instruction" with HomeSeer

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

    How to send HTTP "instruction" with HomeSeer

    Hi guys,

    First time Forum user here and in the process of setting up a new HS house.

    The question I have is, how do I send a HTTP command via homeseer, that does not need to return anything back?

    I have a ThinkFlood Redeye Inferred flasher which is WIFI connected and accepts HTTP commands to trigger scenes. I.e. if I open a browser and put http://192.168.0.5:8080/redeye/rooms...activityId=197 in the address line and hit enter, my TV, AMP etc all turn off. IE doesn't return anything (just a blank white page) so I don't really need a GET command I don't think. I have other HTTP commands that change the AMP input or surround settings etc that I would like to be able to trigger with events in homeseer.

    Can anyone tell me what the VB command would be that I can enter into the "Execute Immediate script command" field in HomeSeer that would send this HTTP instruction? Or if that's not possible, what the VBS script might look like? I have searched the web for hours and only seem to be able to find instructions for GETUrl based scripts that I cant get to work with my limited (i.e. no existant, but hopefully soon to be learnt) knowledge of Scripting/programming etc.

    One command I have managed to work out that enables another event in HomeSeer is:
    &hs.enableEvent "Test Security events When Alarm is Armed"

    SO I had started with something along the lines of:
    &hs.GetUrl ("http://192.168.0.5:8080/redeye/rooms...activityId=197") but that doesn't work.

    I've also found this thread, but have tired all mannor of combinations suggested, none of which seem to work:
    http://board.homeseer.com/showthread.php?t=148059

    Any Help would be much appreciated.

    #2
    Can't answer direct (would like to know as well). But I kind of have working backwards through HSTouch. Since you can create a button that can launch a website, and then is HomeSeer, you can create and event that simulates the press of an HSTouch button...


    Sent from my iPhone using Tapatalk

    Comment


      #3
      Originally posted by TURSTY View Post
      SO I had started with something along the lines of:
      &hs.GetUrl ("http://192.168.0.5:8080/redeye/rooms...activityId=197") but that doesn't work.
      Are you receiving an error when using this command?
      💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

      Comment


        #4
        Originally posted by Rupp View Post
        Are you receiving an error when using this command?
        Yeah this is the error from the log.

        Running script(1) &hs.GetUrl ("http://192.168.0.5:8080/redeye/rooms...activityId=197"), init error: Invalid procedure call or argument: 'hs.GetUrl'

        Comment


          #5
          Check out the help files on the proper syntax for getURL you're missing a parameter
          page = hs.GetURL("HomeSeer.com","/",TRUE,80)
          See this page for parameters.
          http://homeseer.com/support/homeseer...net_geturl.htm

          Try :
          hs.GetURL("192.168.0.5","/redeye/rooms/0/activities/launch?activityId=197",FALSE,8080)
          💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

          Comment


            #6
            Originally posted by Rupp View Post
            Check out the help files on the proper syntax for getURL you're missing a parameter
            page = hs.GetURL("HomeSeer.com","/",TRUE,80)
            See this page for parameters.
            http://homeseer.com/support/homeseer...net_geturl.htm

            Try :
            hs.GetURL("192.168.0.5","/redeye/rooms/0/activities/launch?activityId=197",FALSE,8080)
            You Sir.....are amazing! Worked perfectly!!

            Comment


              #7
              How is this done in Linux?

              I used to have it working in windows, now in Linux I get an error in logs.

              Error Compiling script /tmp/K3.vb:

              Comment


                #8
                Originally posted by integlikewhoa View Post
                How is this done in Linux?

                I used to have it working in windows, now in Linux I get an error in logs.
                Can you post the contents of the k3.vb file?
                HS 4.2.8.0: 2134 Devices 1252 Events
                Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

                Comment


                  #9
                  Originally posted by sparkman View Post
                  Can you post the contents of the k3.vb file?
                  Where is it located?

                  I'm using a event to send an http command to change Blueiris Profile. I did this for a long time in Windows but now that I moved to Linux it seems that &hs.GetURL doesn't work like it used to in windows.


                  This is the full script I was sending from an event in windows.

                  &hs.GetURL("192.168.1.100","/admin?profile=1&lock=2&user=XXXXXX&pw=XXXXX",FALSE,9091)
                  This is how it looks and works in a browser.
                  192.168.1.100:9091/admin?profile=1&lock=2&user=XXXXX&pw=XXXXX

                  So my question is from an event how do I send an http get request in HS3 linux?

                  Comment


                    #10
                    Originally posted by integlikewhoa View Post
                    Where is it located?

                    I'm using a event to send an http command to change Blueiris Profile. I did this for a long time in Windows but now that I moved to Linux it seems that &hs.GetURL doesn't work like it used to in windows.


                    This is the full script I was sending from an event in windows.



                    This is how it looks and works in a browser.
                    192.168.1.100:9091/admin?profile=1&lock=2&user=XXXXX&pw=XXXXX

                    So my question is from an event how to I send an http get request in HS3 linux?
                    in the /tmp subfolder as per the error message.

                    Try &nhs. to start the command.
                    Last edited by sparkman; October 24, 2016, 10:40 PM.
                    HS 4.2.8.0: 2134 Devices 1252 Events
                    Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

                    Comment


                      #11
                      Originally posted by sparkman View Post
                      in the /tmp subfolder as per the error message.

                      Try &nhs. to start thd command.
                      Here is whats in the file.

                      Function Main(parm as object)
                      dim result as object
                      result=hs.GetURL("192.168.1.100","/admin?profile=1&lock=2&user=XXXXX&pw=XXXX",FALSE,9091)
                      return(result)
                      End Function

                      Where to add or how to use "&nhs."?


                      Edit: adding the "n" before the hs. has the same result.

                      Comment


                        #12
                        I would try changing the case of FALSE to false and if that does not work, try a number zero instead. Everything looks ok otherwise.

                        Cheers
                        Al
                        HS 4.2.8.0: 2134 Devices 1252 Events
                        Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

                        Comment


                          #13
                          Originally posted by sparkman View Post
                          I would try changing the case of FALSE to false and if that does not work, try a number zero instead. Everything looks ok otherwise.

                          Cheers
                          Al
                          Thanks for your help I still end up with the same error in the log and no change on the BI side. The log is showing that it creates a new # each change I make but still shows an error. Here is the whole thing.

                          Oct-24 9:02:30 PM Error Compiling script /tmp/K7.vb:
                          Oct-24 9:02:30 PM Info Running immediate script: /tmp/K7.vb
                          Oct-24 9:02:30 PM Event Running script statement immediately: &hs.GetURL("192.168.1.100","/admin?profile=1&lock=2&user=XXXXX&pw=XXXX",0,9091)
                          Oct-24 9:02:30 PM Event Event Trigger "BlueIris AwayDay"
                          Oct-24 9:02:30 PM Event Event BlueIris AwayDay triggered by the event page 'Run' button.

                          Comment


                            #14
                            Strange, must be a bug with HS, or perhaps an issue with mono. Do other script commands work?
                            HS 4.2.8.0: 2134 Devices 1252 Events
                            Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

                            Comment


                              #15
                              Originally posted by sparkman View Post
                              Strange, must be a bug with HS, or perhaps an issue with mono. Do other script commands work?

                              Well I created a shut down script that runs from this thread.

                              http://board.homeseer.com/showpost.p...36&postcount=5

                              But I also had some events that run my roomba after we have left and such that also used to send out Http commands to that device. Ofcourse that doesn't work now on Linux either.

                              Seems to me only the hs.GetURL doesn't work. Any other work around for the time being?

                              I'll probley post in the linux section here in a bit to see if some of the linux guys are sending out http commands to various devices in an event.

                              Comment

                              Working...
                              X