Facility Control

 View Only
  • 1.  HTTP command

    Posted 03-06-2017 18:19
    Hi EveryOne;

    I trie to send an HTTP command to recall a Panasonic PTZ preset. When i use http://xxx.xxx.xxx.xxx/cgi-bin/aw_ptz?cmd=%23R11&res=1, in a web broawser, it recall the preset number 12. I would like to create a custom pannel in Dashboard to recall preset. But when i use that link with ogscript, the & is convert is &amp and it doesn't work.

    Has anybody a solution ? Is it a way to keep the & ?


  • 2.  RE: HTTP command

    Posted 03-06-2017 18:53

    This should do the trick (if the URL you provided works in a web browser). The "&" when looking at the raw XML is correct.

    <abs contexttype="opengear">
       <meta>
          <params>
             <param access="1" maxlength="0" name="IP" oid="params.ip" type="STRING" value="xxx.xxx.xxx.xxx" widget="default"/>
          </params>
       </meta>
       <param expand="true" height="47" left="19" oid="params.ip" top="18" widget="3" width="324"/>
       <button buttontype="push" height="56" left="349" name="Recall Preset 12" top="15" width="215">
          <task tasktype="ogscript">var url = 'http://' + params.getValue('params.ip', 0) + '/cgi-bin/aw_ptz?cmd=%23R11&amp;res=1';
    ogscript.debug("SENDING " + url + " TO CAMERA");
    ogscript.asyncPost(url, null, null);</task>
       </button>
    </abs>

    #DashBoard


  • 3.  RE: HTTP command

    Posted 08-19-2022 15:46
    James if you are still out there, you are a machine and a savior.  Thank you. - Dug through like 10 of your post to find this exact answer, and the step above worked like a charm.

    ------------------------------
    Garrett Hall
    Overtime Elite
    ------------------------------



  • 4.  RE: HTTP command

    Posted 03-08-2017 16:08
    Thanks you James. It works
    #DashBoard