Changes

no edit summary
Line 89: Line 89:  
[[File:{{{file_output_on_off}}}]]
 
[[File:{{{file_output_on_off}}}]]
 
<!--
 
<!--
===Post/Get Configuration===
+
===Post/Get configuration===
 
----
 
----
'''Post/Get Configuration''' allows you to perform action requests by writing them in the URL field after your device’s IP address.
+
Enabling <b>Post/Get</b> will allow you to send HTTP POST/GET requests to the router that control the state of the output. The figure below is an example of the Post/Get configuration section an the table below provides information on the fields contained in that section:
   −
[[File:Services inputoutput output post get v2.png]]
+
[[File:{{{file_output_post_get}}}]]
    
<table class="nd-mantable">
 
<table class="nd-mantable">
 
     <tr>
 
     <tr>
         <th>field name</th>
+
         <th>Field</th>
       <th>value</th>
+
       <th>Value</th>
       <th>description</th>
+
       <th>Description</th>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
 
       <td>Enable</td>
 
       <td>Enable</td>
       <td>yes | no; Default: '''no'''</td>
+
       <td>yes | no; default: <b>no</b></td>
       <td>Toggles POST/GET ON or OFF</td>
+
       <td>Turns Post/Get on or off.</td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
 
       <td>Username</td>
 
       <td>Username</td>
       <td>string; Default: " "</td>
+
       <td>string; default: <b>none</b></td>
       <td>Username used for authentication in POST/GET queries</td>
+
       <td>Username used for authentication in POST/GET queries.</td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
 
     <td>Password</td>
 
     <td>Password</td>
         <td>string; Default: " "</td>
+
         <td>string; default: <b>none</b></td>
         <td>Password used for authentication in POST/GET queries</td>
+
         <td>Password used for authentication in POST/GET queries.</td>
 
     </tr>
 
     </tr>
 
</table>
 
</table>
   −
====Post/Get usage====
+
====Post/Get examples====
 
----
 
----
{{Template: webui_services_input_output_post_get_configuration_usage}}
+
It is possible to turn the {{#ifeq:{{{name}}}|RUT955|outputs|output}} on and off by using a valid HTTP POST/GET syntax. Use a web browser or any other compatible software to submit HTTP POST/GET strings to the device.
   −
<table class="nd-othertables">
+
Below is a table containing syntax examples of this usage:
    <tr>
+
 
        <th style="width: 500px">ACTION</th>
+
<table class="nd-othertables_2">
      <th style="width: 900px">POST/GET URL EXAMPLE</th>
  −
    </tr>
   
     <tr>
 
     <tr>
      <td>Turn Relay Output ON</td>
+
        <th style="width: 500px">Action</th>
       <td>http://192.168.1.1/cgi-bin/output?username=user1&password=user1&action=on&pin=relay</td>
+
       <th style="width: 900px">POST/GET URL</th>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
       <td>Turn Relay Output ON after a 10 second delay</td>
+
       <td>Turn output on</td>
       <td>http://192.168.1.1/cgi-bin/output?username=user1&password=user1&action=on&pin=relay&delay=10</td>
+
       <td><nowiki>http://192.168.1.1/cgi-bin/output?username=user1&password=user1&</nowiki><span style="color: #0054a6;><b>action=on</b></span><nowiki>&pin=pin2</nowiki></td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
    <td>Turn Relay Output ON for 5 seconds</td>
+
      <td>Turn output off</td>
        <td>http://192.168.1.1/cgi-bin/output?username=user1&password=user1&action=on&pin=relay&time=5</td>
+
      <td><nowiki>http://192.168.1.1/cgi-bin/output?username=user1&password=user1&</nowiki><span style="color: #0054a6;><b>action=off</b></span><nowiki>&pin=pin2</nowiki></td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
    <td>Turn Relay Output ON for 5 seconds after a 15 second delay</td>
+
      <td>Turn output on after a 10 second delay</td>
        <td>http://192.168.1.1/cgi-bin/output?username=user1&password=user1&action=on&pin=relay&delay=15&time=5</td>
+
      <td><nowiki>http://192.168.1.1/cgi-bin/output?username=user1&password=user1&action=on&pin=pin2&</nowiki><span style="color: #0054a6;><b>delay=10</b></span></td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
      <td>Turn Relay Output OFF for 5 seconds after a 15 second delay</td>
+
    <td>Turn output on for 5 seconds</td>
      <td>http://192.168.1.1/cgi-bin/output?username=user1&password=user1&action=off&pin=relay&delay=15&time=5</td>
+
        <td><nowiki>http://192.168.1.1/cgi-bin/output?username=user1&password=user1&action=on&pin=pin2&</nowiki><span style="color: #0054a6;><b>time=5</b></span></td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
     <td>Turn Open Collector Output ON</td>
+
     <td>Turn output on for 5 seconds after a 10 second delay</td>
         <td>http://192.168.1.1/cgi-bin/output?username=user1&password=user1&action=on&pin=oc</td>
+
         <td><nowiki>http://192.168.1.1/cgi-bin/output?username=user1&password=user1&action=on&pin=pin2&</nowiki><span style="color: #0054a6;><b>delay=10&time=5</b></span></td>
    </tr>
  −
    <tr>
  −
    <td>Turn Open Collector Output OFF</td>
  −
        <td>http://192.168.1.1/cgi-bin/output?username=user1&password=user1&action=off&pin=oc</td>
   
     </tr>
 
     </tr>
 
</table>
 
</table>
   −
'''Overview''':
+
<b>Overview</b>:
* '''192.168.1.1''' - router's default LAN IP address; replace it in accordance with your own configuration
+
<ul>
* '''username''' - login name from Post/Get Configuration
+
    <li>192.168.1.1 - router's default LAN IP address; replace it in accordance with your own configuration.</li>
* '''password''' - password from Post/Get Configuration
+
    <li>username - login name from Post/Get configuration.</li>
* '''action''' - the action that is to be performed on the specified Output (can be '''on''' or '''off''')
+
    <li>password- password from Post/Get configuration.</li>
* '''pin''' - specifies on which Output the action will be applied (can be '''oc''' or '''relay''')
+
    <li>action- the action that will be performed on the output (can be <i>on</i> or <i>off</i>).</li>
* '''delay''' - defines a delay (in seconds) after which the specified action will be performed  
+
    <li>pin - specifies the output (use <i>pin2</i>).</li>
* '''time''' - defines a window of time during which the action will take place. For instance, if you post an ON action for an output while specifying '''time=5''', that Output will turn ON and stay ON for 5 seconds before turning OFF
+
    <li>delay - defines a delay (in seconds) after which the specified action will be performed.</li>
 
+
    <li>time - defines a window of time during which the action will take place. For instance, if you post an <i>on</i> action while specifying <i>time=5</i>, the output will turn on and stay on for 5 seconds before turning off.</li>
Delay and time parameters can be used together. For example, if delay is 10, time is 5, action is on, then 10 seconds after the execution of the command, the output will switch to ON (or stay in ON state if it was already ON), then after 5 more seconds it will switch to OFF state. In this case, the overall command execution time is 15 seconds.
+
</ul>
 
  −
Actions ON and OFF depend on setting „Output configuration in active state“ (ON is active state), which can be set via [[Input/Output#Output|Services → Input/Output → Output]]
      +
Delay and time parameters can be used together. For example, if delay is 10, time is 5, action is on, then 10 seconds after the execution of the command, the output will switch to <i>on</i> (or stay in <i>on</i> state if it was already that way), then after 5 more seconds it will switch to <i>off</i> state. In this case the overall command execution time is 15 seconds.
 +
<!--
 
===Periodic Control===
 
===Periodic Control===
 
----
 
----

Navigation menu