Announcement

Collapse
No announcement yet.

&hs.GetURL() useage?

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

    &hs.GetURL() useage?

    I am adding a couple of buttons to the default HS3Touch default_camera screen (where the pan and tilt buttons are located). They are IR ON and IR OFF buttons.

    Having some problems setting up the buttons. The following is what I have done for the IR ON button. In the actions line I have selected Homerseer: Run HS Script......... In the script field I have added the following: &hs.GetURL("http://192.xxx.x.x:xxxx/CGIProxy.fcgi?cmd=openInfraLed&user=xxxxxxx&pwd=xxxxxxxx","" ,True,80). In the Script Procedure Line is "Main". This line can not be changed. The above command turns IR LEDS ON for Foscam Camera when used in browser, etc. but doesn't seem to work with button in HS3Touch Designer? Any help on this issue would be much appreciated !!!!! Rick Bonari

    #2
    I think you have one too many parameters. This is the command I use to turn OFF the LEDs. You should also make sure sure you have set the LEDs to manual mode. You also don't need the port number attached to the IP address, that is the last parameter. You also need quotes after the IP address.

    &hs.GetURL("10.0.1.109","/cgi-bin/CGIProxy.fcgi?cmd=closeInfraLed&usr=xxxxx&pwd=xxxxx",FALSE,5 6220)
    Last edited by andyf; December 23, 2017, 08:35 AM.

    Comment


      #3
      Thanks andyf, I will give that a try. However, it does work when I type it int browser, etc., but may just be the way &hs.GetURL works. I will keep you posted on wether it works or not. Thanks again !!!! Rick

      Comment


        #4
        Yes, the hs.GetURL parameters are here:
        https://help.homeseer.com/help/HS3/s...nternet_geturl

        The format is different than what you would enter into a web browser.

        Comment


          #5
          andyf,

          Your command line didn't work. I noticed that you had .fcgicmd and I believe it needs to be .fcgi?cmd..... I tried this also but still no go. I am using buttons in the hs3touch default camera screen to activate IR ON & IR OFF commands. In the action field for button pressed I am using Homeseer: Run homeseer script........ then in the script field I enter the script command string you provided and in the script procedure field it defaults to Main. Not having any success with this yet. How are you executing this command string in homeseer? Do you run this script command string inside of a homeseer event? Does this script command need to be saved in a file in the homeseer script file folder and if so what file extension do you give it? Thanks again for your help on this...Rick

          Comment


            #6
            You are right, I do have the "?" in the fcgi?cmd. Somehow it didn't take when I copied and pasted.

            I execute it as an immediate script. See below. Here's cut & retry which seems to look right.

            &hs.GetURL("10.0.1.109","/cgi-bin/CGIProxy.fcgi?cmd=closeInfraLed&usr=xxxxx&pwd=xxxxx",FALSE,5 6220) - there's no space in the Port #

            If I remember right the ON & OFF commands didn't work if the IR LED mode is set to AUTO. I had to switch the mode to MANUAL to get ON & OFF to work.

            One other thing. On my Mac when I create the string in an editor and cut & paste into HS3 the Mac converts the basic quote into curly quotes automatically. The camera doesn't like that. It's hard to see but check for that. I've spent many an hour tracking that down.
            Attached Files
            Last edited by andyf; December 23, 2017, 08:39 AM.

            Comment


              #7
              Hello Andyf,

              Between you and Rich my problem is solved !!! Thank you very much for your help !!!!! I created an event like you did for IR on and IR OFF and then created two buttons in hs3touch designer that when pressed trigger a homeseer event. Works great !!!!! Merry Christmas and Happy New Year !!!!!

              Comment


                #8
                Originally posted by andyf View Post

                One other thing. On my Mac when I create the string in an editor and cut & paste into HS3 the Mac converts the basic quote into curly quotes automatically. The camera doesn't like that. It's hard to see but check for that. I've spent many an hour tracking that down.
                Latest IOS does this curly quote thing on iPhones and iPads as well. It's hell for coding. Go to General settings then keyboard and turn off "smart punctuation".

                Comment


                  #9
                  Originally posted by prsmith777 View Post
                  Latest IOS does this curly quote thing on iPhones and iPads as well. It's hell for coding. Go to General settings then keyboard and turn off "smart punctuation".
                  Thanks for that. I've turned off on my Mac too.

                  Comment

                  Working...
                  X