Difference between revisions of "Template:Networking rutos manual input output"

From Teltonika Networks Wiki
Line 497: Line 497:
 
===Actions===
 
===Actions===
 
----
 
----
The <b>Actions</b> section is used to manage existing and create new Actions that be executed by the I/O Juggler Rules. The figure below is an example of the Actions section, which is empty by default.
+
The <b>Actions</b> section is used to manage and create new Actions that can be executed by the I/O Juggler Rules. The figure below is an example of the Actions section, which is empty by default.
  
 
[[File:Networking_rutos_manual_input_output_io_juggler_actions_actions.png|border|class=tlt-border]]
 
[[File:Networking_rutos_manual_input_output_io_juggler_actions_actions.png|border|class=tlt-border]]
Line 505: Line 505:
 
[[File:Networking_rutos_manual_input_output_io_juggler_actions_add_button.png|border|class=tlt-border]]
 
[[File:Networking_rutos_manual_input_output_io_juggler_actions_add_button.png|border|class=tlt-border]]
  
After this you will be redirected to the configuration page for the newly added Action, which should look similar to this (example for the 'Reboot' action only):
+
After this you will be redirected to the configuration page for the newly added Action, which should look similar to this (example for action 'Type: Reboot'):
  
 
[[File:Networking_rutos_manual_input_output_io_juggler_actions_configuration_reboot.png|border|class=tlt-border]]
 
[[File:Networking_rutos_manual_input_output_io_juggler_actions_configuration_reboot.png|border|class=tlt-border]]
  
====Modify action====
+
<b>Action configuration</b> depends on the selected action 'Type'. Each Action can have one or multiple user-defined [[#Conditions|Conditions]] assigned to it. Actions that have Conditions assigned to them are executed only if the Conditions are met (a trigger occurrence is not enough to set off these actions). Assigning to Actions is optional.
----
 
  
[[File:Networking_rutx_manual_input_output_iojuggler_actions_modify_v1.png]]
+
You will find descriptions of each different action Type described on the sections below.
  
Above is an example of what action configuration window looks like. Below is a table with detailed explanations on
+
====Type: Email====
how to configure the action and what each of the fields mean. To avoid redundancy, screenshots for the other actions
 
will not be provided, since the structures, syntax and the overall look of the configuration windows for each action
 
are very similar. Instead, only tables containing information on how to edit each action will be provided.
 
 
 
=====Profile=====
 
 
----
 
----
<table class="nd-mantable">
+
Sends an email to specified recipients. Requires an existing email account configuration on the device. Email accounts can be configured in the System → Administration → Recipients → [[{{{name}}}_Administration#Email_Accounts|Email Accounts]] page.
    <tr>
 
        <th>Field</th>
 
      <th>Value</th>
 
      <th>Description</th>
 
    </tr>
 
    <tr>
 
        <td>Type</td>
 
        <td>Profile</td>
 
        <td>Changes current profile to specified one when action triggers.</td>
 
    </tr>
 
    <tr>
 
        <td>Execution delay</td>
 
        <td>positive integer; default: <b>none</b></td>
 
        <td>How many seconds will pass before the action is excecuted after it's triggered.</td>
 
    </tr>
 
    <tr>
 
        <td>Profile</td>
 
        <td>profile; default: <b>default</b> </td>
 
        <td>Choose a profile that will be applied when the action triggers.</td>
 
    </tr>
 
    <tr>
 
        <td>Add conditions</td>
 
        <td>conditions; default: <b>none</b> </td>
 
        <td>Specifies conditions which have to be met for action to occur. Conditions are optional.</td>
 
    </tr>
 
</table>
 
  
 +
[[File:Networking_rutos_manual_input_output_io_juggler_actions_email.png|border|class=tlt-border]]
  
=====Email=====
 
----
 
 
<table class="nd-mantable">
 
<table class="nd-mantable">
 
     <tr>
 
     <tr>
Line 557: Line 524:
 
       <th>Value</th>
 
       <th>Value</th>
 
       <th>Description</th>
 
       <th>Description</th>
    </tr>
 
    <tr>
 
        <td>Type</td>
 
        <td>Email</td>
 
        <td>Sends email when action triggers.</td>
 
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
Line 571: Line 533:
 
         <td>Text message</td>
 
         <td>Text message</td>
 
         <td>string; default: <b>none</b> </td>
 
         <td>string; default: <b>none</b> </td>
         <td>Text message to be sent in email. Below this field you can find device information and
+
         <td>Email body text. Below this field you can find special codes that begin with the '%' sign. Each code represents a piece information related to the status of the device. Include these codes in the Text message for dynamic information reports.</td>
        their codes, which can be included in messages to send device information.</td>
 
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
 
         <td>Execution delay</td>
 
         <td>Execution delay</td>
 
         <td>positive integer; default: <b>none</b></td>
 
         <td>positive integer; default: <b>none</b></td>
         <td>How many seconds will pass before the action is excecuted after it's triggered.</td>
+
         <td>A period of time (in seconds) which has to pass after a trigger event before the action is executed.</td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
         <td>Email user</td>
+
         <td>Email account</td>
         <td>email user; default: <b>none</b></td>
+
         <td>email account; default: <b>none</b></td>
         <td>Configured email user.</td>
+
         <td>Email account used to send the email. Email accounts can be configured in the System → Administration → Recipients → [[{{{name}}}_Administration#Email_Accounts|Email Accounts]] page.</td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
 
         <td>Recipient's email address</td>
 
         <td>Recipient's email address</td>
         <td>string; default: <b>none</b></td>
+
         <td>email; default: <b>none</b></td>
         <td>Email receiver(s).</td>
+
         <td>Email address(es) of the message's receiver(s).</td>
    </tr>
 
    <tr>
 
        <td>Add conditions</td>
 
        <td>conditions; default: <b>none</b> </td>
 
        <td>Specifies conditions which have to be met for action to occur. Conditions are optional.</td>
 
 
     </tr>
 
     </tr>
 
</table>
 
</table>
 +
{{#ifeq: {{{mobile}}} | 1 |
 +
====Type: SMS====
 +
----
 +
Sends an SMS message to specified recipients.
 +
 +
[[File:Networking_rutos_manual_input_output_io_juggler_actions_sms.png|border|class=tlt-border]]
  
{{#ifeq:{{{mobile}}}|0||
 
=====SMS=====
 
----
 
 
<table class="nd-mantable">
 
<table class="nd-mantable">
 
     <tr>
 
     <tr>
Line 604: Line 563:
 
       <th>Value</th>
 
       <th>Value</th>
 
       <th>Description</th>
 
       <th>Description</th>
    </tr>
 
    <tr>
 
        <td>Type</td>
 
        <td>SMS</td>
 
        <td>Sends sms when action triggers.</td>
 
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
 
         <td>Text message</td>
 
         <td>Text message</td>
 
         <td>string; default: <b>none</b> </td>
 
         <td>string; default: <b>none</b> </td>
         <td>Text message to be sent in sms. Below this field you can find device information and
+
         <td>SMS body text. Below this field you can find special codes that begin with the '%' sign. Each code represents a piece information related to the status of the device. Include these codes in the Text message for dynamic information reports.</td>
        their codes, which can be included in messages to send device information.</td>
 
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
 
         <td>Execution delay</td>
 
         <td>Execution delay</td>
 
         <td>positive integer; default: <b>none</b></td>
 
         <td>positive integer; default: <b>none</b></td>
         <td>How many seconds will pass before the action is excecuted after it's triggered.</td>
+
         <td>A period of time (in seconds) which has to pass after a trigger event before the action is executed.</td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
 
         <td>Recipients</td>
 
         <td>Recipients</td>
         <td><span style="color:red;">Single number</span> {{!}} <span style="color:blue;">Group</span>; default: <b>Single number</b></td>
+
         <td>Single number {{!}} Group; default: <b>Single number</b></td>
         <td>How many recipients will get the message.</td>
+
         <td>Defines whether the SMS message will be sent to a single number or multiple numbers included in a user-configured Phone group. Phone groups can be configured in the System → Administration → Recipients → [[{{{name}}}_Administration#Phone_Groups|Phone Groups]] page.</td>
    </tr>
 
    <tr>
 
        <td><span style="color:red;">Single number:</span> Recipient's phone number</td>
 
        <td>number; default: <b>none</b></td>
 
        <td>SMS receiver.</td>
 
    </tr>
 
    <tr>
 
        <td><span style="color:blue;">Group:</span> Phone group</td>
 
        <td>phone group; default: <b>none</b></td>
 
        <td>SMS receivers.</td>
 
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
         <td>Add conditions</td>
+
         <td>Recipient's phone number/Phone group</td>
         <td>conditions; default: <b>none</b> </td>
+
         <td>phone number | phone group; default: <b>none</b></td>
         <td>Specifies conditions which have to be met for action to occur. Conditions are optional.</td>
+
         <td>Phone number of a single recipient or a Phone group of multiple recipients. The name and selection type of this field depends on the value set in the 'Recipients' field.</td>
 
     </tr>
 
     </tr>
 
</table>
 
</table>
 +
|}}
 +
====Type: Output====
 +
----
 +
Changes the state of a selected output pin.
  
<b>Note</b>: this table has coloring scheme to indicate which fields can be seen with different configuration.
+
[[File:Networking_rutos_manual_input_output_io_juggler_actions_output_configurableio_{{{configurableio}}}.png|border|class=tlt-border]]
}}
 
  
=====Output=====
 
----
 
 
<table class="nd-mantable">
 
<table class="nd-mantable">
 
     <tr>
 
     <tr>
Line 653: Line 597:
 
       <th>Value</th>
 
       <th>Value</th>
 
       <th>Description</th>
 
       <th>Description</th>
    </tr>
 
    <tr>
 
        <td>Type</td>
 
        <td>Output</td>
 
        <td>Changes Output state when action triggers.</td>
 
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
 
         <td>Execution delay</td>
 
         <td>Execution delay</td>
 
         <td>positive integer; default: <b>none</b></td>
 
         <td>positive integer; default: <b>none</b></td>
         <td>How many seconds will pass before the action is excecuted after it's triggered.</td>
+
         <td>A period of time (in seconds) which has to pass after a trigger event before this Action is executed.</td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
 
         <td>Control</td>
 
         <td>Control</td>
         <td>output; default: <b>Output(4)</b></td>
+
         <td>output; default: <b>{{#ifeq:{{{configurableio}}}|1|Configurable Input/Output (2)|Output (4)}}</b></td>
         <td>Specifies the output of which the state will be changed.</td>
+
         <td>Selects the output controlled by this Action.</td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
 
         <td>Revert</td>
 
         <td>Revert</td>
         <td>integer; default: <b>0</b> </td>
+
         <td>integer; default: <b>0</b></td>
         <td>After how many seconds the state will revert. If left 0 or empty the state will not revert.</td>
+
         <td>After how many seconds the state will revert. If left as 0 or empty the state will not revert.</td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
 
         <td>Maintain</td>
 
         <td>Maintain</td>
 
         <td>off | on; default: <b>on</b></td>
 
         <td>off | on; default: <b>on</b></td>
         <td>Maintain this IO state after reboot.</td>
+
         <td>When set to 'on', the output maintains its new state after reboot (the state is changed in the config file as well).</td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
 
         <td>Invert</td>
 
         <td>Invert</td>
 
         <td>off | on; default: <b>off</b></td>
 
         <td>off | on; default: <b>off</b></td>
         <td>On action inverts pin state.</td>
+
         <td>Inverts the state of the selected output, i.e., switches the output pin to a state that is opposite to its current one (high-to-low or low-to-high). This can be used instead of specifying a static state.</td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
 
         <td>State copying</td>
 
         <td>State copying</td>
 
         <td>off | on; default: <b>off</b></td>
 
         <td>off | on; default: <b>off</b></td>
         <td>Copies the state from selected input to selected output.</td>
+
         <td>Copies the state from the selected input and applies it to the selected output. This can be used instead of specifying a static state.</td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
 
         <td>State</td>
 
         <td>State</td>
 
         <td>High | Low; default: <b>High</b></td>
 
         <td>High | Low; default: <b>High</b></td>
         <td>Specifies what state the output pin will be set to.</td>
+
         <td>Specifies the state of the output pin that will be set by this Action.</td>
    </tr>
 
    <tr>
 
        <td>Add conditions</td>
 
        <td>conditions; default: <b>none</b> </td>
 
        <td>Specifies conditions which have to be met for action to occur. Conditions are optional.</td>
 
 
     </tr>
 
     </tr>
 
</table>
 
</table>
  
 +
====HTTP====
 +
----
 +
Executes at HTTP Post/Get action.
 +
 +
[[File:Networking_rutos_manual_input_output_io_juggler_actions_http.png|border|class=tlt-border]]
  
=====HTTP=====
 
----
 
 
<table class="nd-mantable">
 
<table class="nd-mantable">
 
     <tr>
 
     <tr>
Line 709: Line 646:
 
       <th>Value</th>
 
       <th>Value</th>
 
       <th>Description</th>
 
       <th>Description</th>
    </tr>
 
    <tr>
 
        <td>Type</td>
 
        <td>HTTP</td>
 
        <td>Sends HTTP request when action triggers.</td>
 
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
 
         <td>Execution delay</td>
 
         <td>Execution delay</td>
 
         <td>positive integer; default: <b>none</b></td>
 
         <td>positive integer; default: <b>none</b></td>
         <td>How many seconds will pass before the action is excecuted after it's triggered.</td>
+
         <td>A period of time (in seconds) which has to pass after a trigger event before this Action is executed.</td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
 
         <td>Method</td>
 
         <td>Method</td>
         <td>Get {{!}} Post; default: <b>Get</b></td>
+
         <td>Get | Post; default: <b>Get</b></td>
         <td>Specifies the output of which the state will be changed.</td>
+
         <td>HTTP method to be used by this Action.</td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
 
         <td>URL</td>
 
         <td>URL</td>
 
         <td>string; default: <b>none</b> </td>
 
         <td>string; default: <b>none</b> </td>
         <td>URL to send request to.</td>
+
         <td>URL to send the HTTP Post/Get request to.</td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
 
         <td>Verify</td>
 
         <td>Verify</td>
 
         <td>off | on; default: <b>off</b></td>
 
         <td>off | on; default: <b>off</b></td>
         <td>Verifies the validity of certificates, only works for https.</td>
+
         <td>Verifies the validity of certificates; only used with HTTPS.</td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
 
         <td>Parameters</td>
 
         <td>Parameters</td>
 
         <td>string; default: <b>none</b></td>
 
         <td>string; default: <b>none</b></td>
         <td>Parameters and their value from device for usage in Post or Get requests.  
+
         <td>Parameters that are to be included the Post/Get request. Select a parameter (right drop-down box) and enter a custom name for it (left text box).</td>
{{#switch:{{{name}}}
 
| RUTX10 = Possible values: Time stamp, UNIX time, WAN MAC, Wired WAN IP, Network info, Product code, LAN MAC address, LAN IP address, Serial number, Current FW version, Monitoring status, Input Name, Input state change trigger </td>
 
| RUTX08 = Possible values: Time stamp, UNIX time, WAN MAC, Wired WAN IP, Network info, Product code, LAN MAC address, LAN IP address, Serial number, Current FW version, Monitoring status, Input Name, Input state change trigger </td>
 
| Possible values: Time stamp, UNIX time, WAN MAC, Wired WAN IP, Network info, Product code, LAN MAC address, LAN IP address, Serial number, Current FW version, Monitoring status, Input Name, Input state change trigger, RSCP, ECIO, SIM slot in use, CELLID, RSRQ, SINR, RSRP, SIM State, SIM pin state, Modem model, IMSI, Modem serial number , Network State, Data connection state, Connection type, Mobile IP, Operator name, Signal strenght, IMEI, ICCID, Neighbour cells, Network serving.</td>
 
}}
 
    </tr>
 
    <tr>
 
        <td>Add conditions</td>
 
        <td>conditions; default: <b>none</b> </td>
 
        <td>Specifies conditions which have to be met for action to occur. Conditions are optional.</td>
 
 
     </tr>
 
     </tr>
 
</table>
 
</table>
  
 +
====Type: Script====
 +
----
 +
Executes a custom, user-written shell script.
 +
 +
[[File:Networking_rutos_manual_input_output_io_juggler_actions_script.png|border|class=tlt-border]]
  
=====Script=====
 
----
 
 
<table class="nd-mantable">
 
<table class="nd-mantable">
 
     <tr>
 
     <tr>
Line 760: Line 685:
 
       <th>Value</th>
 
       <th>Value</th>
 
       <th>Description</th>
 
       <th>Description</th>
    </tr>
 
    <tr>
 
        <td>Type</td>
 
        <td>Script</td>
 
        <td>Runs script when action triggers.</td>
 
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
 
         <td>Execution delay</td>
 
         <td>Execution delay</td>
 
         <td>positive integer; default: <b>none</b></td>
 
         <td>positive integer; default: <b>none</b></td>
         <td>How many seconds will pass before the action is excecuted after it's triggered.</td>
+
         <td>A period of time (in seconds) which has to pass after a trigger event before this Action is executed.</td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
 
         <td>Specify path</td>
 
         <td>Specify path</td>
         <td><span style="color:red;">Upload a script</span> {{!}} <span style="color:blue;">Specify path</span>; default: <b>Upload a script</b></td>
+
         <td>Upload a script |Specify path; default: <b>Upload a script</b></td>
         <td>Selection to upload a script or specify its absolute path in device.</td>
+
         <td>Specifies whether the script should be uploaded from an external file or a path to an internal (on this device) script file should be specified.</td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
         <td><span style="color:red;">Upload a script:</span> Custom script</td>
+
         <td>Custom script/Script file</td>
         <td>-(interactive button)</td>
+
         <td>-(interactive button) | filepath</td>
         <td>Shows file upload window on click.</td>
+
         <td>Shows file upload window on click or provides the possibility to specify a path to an internal script file. The name and selection type of this field depends on the value set in the 'Specify path' field.</td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
         <td><span style="color:blue;">Specify path:</span> Script file</td>
+
         <td>Arguments</td>
 
         <td>string; default: <b>none</b></td>
 
         <td>string; default: <b>none</b></td>
         <td>Absolute path to script file in device.</td>
+
         <td>Optional arguments which can be provided for the script. You can include device information with values given below this input field.</td>
 
     </tr>
 
     </tr>
 +
</table>
 +
 +
====Type: Reboot====
 +
----
 +
Reboots the device.
 +
 +
[[File:Networking_rutos_manual_input_output_io_juggler_actions_reboot.png|border|class=tlt-border]]
 +
 +
<table class="nd-mantable">
 
     <tr>
 
     <tr>
         <td>Arguments</td>
+
         <th>Field</th>
        <td>string; default: <b>none</b> </td>
+
      <th>Value</th>
        <td>Optional arguments which can be provided for the script. You can include device information with values given below this input field.</td>
+
      <th>Description</th>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
         <td>Add conditions</td>
+
         <td>Execution delay</td>
         <td>conditions; default: <b>none</b> </td>
+
         <td>positive integer; default: <b>none</b></td>
         <td>Specifies conditions which have to be met for action to occur. Conditions are optional.</td>
+
         <td>A period of time (in seconds) which has to pass after a trigger event before this Action is executed.</td>
 
     </tr>
 
     </tr>
 
</table>
 
</table>
  
<b>Note</b>: this table has coloring scheme to indicate which fields can be seen with different configuration.
+
====Type: Profile====
 +
----
 +
Switches to using a specified Configuration Profile.
 +
 
 +
[[File:Networking_rutos_manual_input_output_io_juggler_actions_script.png|border|class=tlt-border]]
  
=====Reboot=====
 
----
 
 
<table class="nd-mantable">
 
<table class="nd-mantable">
 
     <tr>
 
     <tr>
Line 807: Line 738:
 
       <th>Value</th>
 
       <th>Value</th>
 
       <th>Description</th>
 
       <th>Description</th>
    </tr>
 
    <tr>
 
        <td>Type</td>
 
        <td>Reboot</td>
 
        <td>Reboots device when action triggers.</td>
 
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
 
         <td>Execution delay</td>
 
         <td>Execution delay</td>
 
         <td>positive integer; default: <b>none</b></td>
 
         <td>positive integer; default: <b>none</b></td>
         <td>How many seconds will pass before the action is excecuted after it's triggered.</td>
+
         <td>A period of time (in seconds) which has to pass after a trigger event before this Action is executed.</td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
         <td>Add conditions</td>
+
         <td>Profile</td>
         <td>conditions; default: <b>none</b> </td>
+
         <td>profile; default: <b>default</b> </td>
         <td>Specifies conditions which have to be met for action to occur. Conditions are optional.</td>
+
         <td>Configuration Profile that will be applied by this Action. Configuration Profiles can be defined in the System → [[{{{name}}}_Profiles|Profiles]] page.</td>
 
     </tr>
 
     </tr>
 
</table>
 
</table>
 +
{{#ifeq: {{{dualsim}}} | 1 |
 +
=====Type: Change SIM=====
 +
----
 +
Switches to using the specified SIM card.
 +
 +
[[File:Networking_rutos_manual_input_output_io_juggler_actions_change_sim.png|border|class=tlt-border]]
  
{{#ifeq:{{{mobile}}}|0||
 
    {{#ifeq:{{{series}}}|TRB1||
 
=====Change sim=====
 
----
 
 
<table class="nd-mantable">
 
<table class="nd-mantable">
 
     <tr>
 
     <tr>
Line 834: Line 762:
 
       <th>Value</th>
 
       <th>Value</th>
 
       <th>Description</th>
 
       <th>Description</th>
    </tr>
 
    <tr>
 
        <td>Type</td>
 
        <td>Change sim</td>
 
        <td>Changes active sim card when action triggers.</td>
 
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
 
         <td>Execution delay</td>
 
         <td>Execution delay</td>
 
         <td>positive integer; default: <b>none</b></td>
 
         <td>positive integer; default: <b>none</b></td>
         <td>How many seconds will pass before the action is excecuted after it's triggered.</td>
+
         <td>A period of time (in seconds) which has to pass after a trigger event before this Action is executed.</td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
 
         <td>Flip</td>
 
         <td>Flip</td>
         <td><span style="color:red;">off</span> {{!}} on; default: <b>off</b></td>
+
         <td>off {{!}} on; default: <b>off</b></td>
         <td>Switches to a different sim card.</td>
+
         <td>When set to 'on', switches to the opposite SIM card (the that is currently NOT in use). This can be used instead of selecting a specific SIM card to switch to.</td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
         <td><span style="color:red;">Off:</span> Target</td>
+
         <td>Target</td>
         <td>Sim1 {{!}} Sim2; default: <b>Sim1</b></td>
+
         <td>SIM1 {{!}} SIM2; default: <b>SIM1</b></td>
         <td>Switches to a selected sim card.</td>
+
         <td>Selects a SIM card to switch to. This field is visible only when the 'Flip' field is set to 'off'.</td>
    </tr>
 
    <tr>
 
        <td>Add conditions</td>
 
        <td>conditions; default: <b>none</b> </td>
 
        <td>Specifies conditions which have to be met for action to occur. Conditions are optional.</td>
 
 
     </tr>
 
     </tr>
 
</table>
 
</table>
 
+
|}}
<b>Note</b>: this table has coloring scheme to indicate which fields can be seen with different configuration.
 
    }}
 
}}
 
 
===Conditions===
 
===Conditions===
 
----
 
----
 
+
The <b>Conditions</b> section lets you manage your created Conditions for I/O Juggler Actions. The figure below is an example of Conditions section.
The <b>Conditions</b> section lets you manage your created Conditions for I/O Juggler Actions.  
 
The figure below is an example of Conditions section.
 
  
 
[[File:Networking_rutx_manual_input_output_iojuggler_conditions_v1.png]]
 
[[File:Networking_rutx_manual_input_output_iojuggler_conditions_v1.png]]

Revision as of 12:14, 28 October 2020

Template:Networking rutos manual fw disclosure

Summary

Inputs and outputs are used for monitoring and controlling a connected device or receiving signals from that device in order to trigger certain events.

This chapter of the user manual provides an overview of the Input/Output section for {{{name}}} devices.

If you're having trouble finding this page or some of the parameters described here on your device's WebUI, you should turn on "Advanced WebUI" mode. You can do that by clicking the "Advanced" button, located at the top of the WebUI.

Networking rutos manual webui basic advanced mode 75.gif


Status

The Status page displays the current states of the device input and output:

File:Networking rutx manual input output status v2.png

You can invert Input pin by clicking on slider in Inversion column and switch Output pin state by clicking on slider in State column.

Status from command line


You can also obtain the status of the input or output from the command line. List of ubus possible values in {{{name}}} devices:

ioman.gpio.dio0
ioman.gpio.dio1

Call command ubus call value status :

root@Teltonika-{{{name}}}:~# ubus call ioman.gpio.dio0 status
{
        "value": "0",
        "direction": "in",
        "bi_dir": false,
        "invert_input": false
}
  • din1 is the input:
    • "value": "0" means low level state.
    • "value": "1" means high level state.
  • dout1 is the output:
    • "value": "0" means low level state.
    • "value": "1" means high level state.

Post/Get

Enabling Post/Get provides the possibility to control the state of an output via HTTP POST/GET requests. The figure below is an example of the Auth Settings section of the Post/Get page. It is used to turn Post/Get on or off and to set authentication parameters.

Networking rutos manual input output post get auth settings.png

Field Value Description
Enable off | on; default: off Turns Post/Get on or off.
Username string; default: none Username used for authentication in POST/GET queries.
Password string; default: none Password used for authentication in POST/GET queries.
Confirm password string; default: none Repeat the password for confirmation.

Post/Get examples


It is possible to turn the 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.

Below is a table containing syntax examples of this usage:

Action POST/GET URL
Turn Output state to high http://192.168.1.1/cgi-bin/io_state?username=user1&password=user1&pin=dout1&state=on
Turn Output state to low after 5 seconds for 3 seconds http://192.168.1.1/cgi-bin/io_state?username=user1&password=user1&pin=dout1&state=on&delay=5&time=3

Overview:

  • 192.168.1.1 - device default LAN IP address; replace it in accordance with your own configuration.
  • username - login name from Post/Get configuration.
  • password- password from Post/Get configuration.
  • state - turn Output on or off.
  • delay - defines a delay (in seconds) after which the specified action will be performed.
  • time - defines a window of time during which the action will take place. For instance, if you post an on action while specifying time=5, the output will turn on and stay on for 5 seconds before turning off.

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 that way), then after 5 more seconds it will switch to off state. In this case the overall command execution time is 15 seconds.


To use Post/Get via SSH instead of a browser, you may want to use the curl -X command. Simply add the same URL command in between quotes and specify the HTTP method.

Examples:

  • Switch output to High:
    curl -X GET "http://192.168.1.1/cgi-bin/io_state?username=user1&password=user1&pin=dout1&state=on"
  • Switch output to Low after delay:
    curl -X GET "http://192.168.1.1/cgi-bin/io_state?username=user1&password=user1&pin=dout1&state=off&delay=5"

Scheduler

The output Scheduler can be used to configure a timetable of when an output should be turned on or off, based on days of the week and hours of the day. Below is an example of the Scheduler section.

[[File:Networking_rutos_manual_input_output_scheduler_configure_scheduler_configurableio_{{{configurableio}}}.png|border|class=tlt-border]]

Each field represents a day of the week and an hour of the day. The Scheduler table itself is interactive; click on different fields to set the state of an output for a specific window of time. For example:

[[File:Networking_rutos_manual_input_output_scheduler_configure_scheduler_example_configurableio_{{{configurableio}}}.png|border|class=tlt-border]]

The Scheduler is turned off by default. To turn it on set the 'Enable' slider to "on".

I/O Juggler

The I/O Juggler is a feature that provides the possibility to create automated rules that perform certain actions based on Input state changes and other conditions. The operating sequence of I/O Juggler can be visualized as such:

[[File:Networking_rutos_manual_input_output_io_juggler_scheme_condition_mobile_{{{mobile}}}.png]]

When an Input Trigger occurs, the Input check to see if user-specified conditions are also met. If so, it executes a user-specified action.


For example, if we configure the I/O Juggler like this:

  • Trigger - input state rising.
  • Condition - 8:00 AM - 5:00 PM.
  • Action - send email.

The operating sequence would look like this:

  1. A connected device raises the input state.
  2. This {{{name}}} device checks whether the current time is between 8:00 AM and 5:00 PM.
    • Yes - {{{name}}} sends an email.
    • No - {{{name}}} doesn't send an email.

You can specify multiple actions and multiple conditions for any I/O Juggler rule. Selecting conditions is optional. If there are no set or configured I/O Juggler conditions, the operating sequence is as such:

[[File:Networking_rutos_manual_input_output_io_juggler_scheme_mobile_{{{mobile}}}.png]]

General


The General section is used to Input Trigger rules, which can perform a specified user-configured action when the Input state changes and when certain other user-configured conditions are met (conditions are optional).

Before you can use the I/O Juggler, you must turn it on first (off by default). This can be done by setting the 'Enable' slider to "on":

Networking rutos manual input output io juggler general enabled.png

Input


The Input is used to create Input Rules. An Input Rule is triggered by a user-specified input state change. When this trigger occurs, the device executes a specified command if certain specified conditions are met (conditions are optional).

The Input list is empty by default. To create a new Input Rule, look to the Add Input section at the bottom of the page; select an input and click the 'Add' button:

[[File:Networking_rutos_manual_input_output_io_juggler_general_input_add_button_juggler_input_{{{juggler_input}}}.png|border|class=tlt-border]]

After this you will be redirected to the configuration page for the newly added Rule, which should look similar to this:

[[File:Networking_rutos_manual_input_output_io_juggler_general_input_configuration_juggler_input_{{{juggler_input}}}.png|border|class=tlt-border]]

Field Value Description
Enabled off | on; default: off Changes current profile to specified one when action triggers.
Trigger interval integer [0..99999999]; default: 1 The shortest amount of time (in seconds) between two triggers. If the input is triggered more than once in a time period shorter than the value specified in this field, the device will react to the first trigger.
Trigger Rising | Falling | Both; default: Rising Input state change that will trigger this rule.
Add actions i/o juggler action(s); default: none Actions that will be executed by this rule when the specified trigger and conditions (optional) occur.
Add conditions i/o juggler conditions; default: none Conditions that have to be met for the rule to take action. Conditions are optional.

Actions


The Actions section is used to manage and create new Actions that can be executed by the I/O Juggler Rules. The figure below is an example of the Actions section, which is empty by default.

Networking rutos manual input output io juggler actions actions.png

To create a new Action, look to the Add an Action section at the bottom of the page; enter a custom name, select an action type and click the 'Add' button:

Networking rutos manual input output io juggler actions add button.png

After this you will be redirected to the configuration page for the newly added Action, which should look similar to this (example for action 'Type: Reboot'):

Networking rutos manual input output io juggler actions configuration reboot.png

Action configuration depends on the selected action 'Type'. Each Action can have one or multiple user-defined Conditions assigned to it. Actions that have Conditions assigned to them are executed only if the Conditions are met (a trigger occurrence is not enough to set off these actions). Assigning to Actions is optional.

You will find descriptions of each different action Type described on the sections below.

Type: Email


Sends an email to specified recipients. Requires an existing email account configuration on the device. Email accounts can be configured in the System → Administration → Recipients → [[{{{name}}}_Administration#Email_Accounts|Email Accounts]] page.

Networking rutos manual input output io juggler actions email.png

Field Value Description
Subject string; default: none Subject of email.
Text message string; default: none Email body text. Below this field you can find special codes that begin with the '%' sign. Each code represents a piece information related to the status of the device. Include these codes in the Text message for dynamic information reports.
Execution delay positive integer; default: none A period of time (in seconds) which has to pass after a trigger event before the action is executed.
Email account email account; default: none Email account used to send the email. Email accounts can be configured in the System → Administration → Recipients → [[{{{name}}}_Administration#Email_Accounts|Email Accounts]] page.
Recipient's email address email; default: none Email address(es) of the message's receiver(s).

phone group; default: none Phone number of a single recipient or a Phone group of multiple recipients. The name and selection type of this field depends on the value set in the 'Recipients' field.

Type: Output


Changes the state of a selected output pin.

[[File:Networking_rutos_manual_input_output_io_juggler_actions_output_configurableio_{{{configurableio}}}.png|border|class=tlt-border]]

Field Value Description
Execution delay positive integer; default: none A period of time (in seconds) which has to pass after a trigger event before this Action is executed.
Control output; default: Output (4) Selects the output controlled by this Action.
Revert integer; default: 0 After how many seconds the state will revert. If left as 0 or empty the state will not revert.
Maintain off | on; default: on When set to 'on', the output maintains its new state after reboot (the state is changed in the config file as well).
Invert off | on; default: off Inverts the state of the selected output, i.e., switches the output pin to a state that is opposite to its current one (high-to-low or low-to-high). This can be used instead of specifying a static state.
State copying off | on; default: off Copies the state from the selected input and applies it to the selected output. This can be used instead of specifying a static state.
State High | Low; default: High Specifies the state of the output pin that will be set by this Action.

HTTP


Executes at HTTP Post/Get action.

Networking rutos manual input output io juggler actions http.png

Field Value Description
Execution delay positive integer; default: none A period of time (in seconds) which has to pass after a trigger event before this Action is executed.
Method Get | Post; default: Get HTTP method to be used by this Action.
URL string; default: none URL to send the HTTP Post/Get request to.
Verify off | on; default: off Verifies the validity of certificates; only used with HTTPS.
Parameters string; default: none Parameters that are to be included the Post/Get request. Select a parameter (right drop-down box) and enter a custom name for it (left text box).

Type: Script


Executes a custom, user-written shell script.

Networking rutos manual input output io juggler actions script.png

Field Value Description
Execution delay positive integer; default: none A period of time (in seconds) which has to pass after a trigger event before this Action is executed.
Specify path Upload a script |Specify path; default: Upload a script Specifies whether the script should be uploaded from an external file or a path to an internal (on this device) script file should be specified.
Custom script/Script file -(interactive button) | filepath Shows file upload window on click or provides the possibility to specify a path to an internal script file. The name and selection type of this field depends on the value set in the 'Specify path' field.
Arguments string; default: none Optional arguments which can be provided for the script. You can include device information with values given below this input field.

Type: Reboot


Reboots the device.

Networking rutos manual input output io juggler actions reboot.png

Field Value Description
Execution delay positive integer; default: none A period of time (in seconds) which has to pass after a trigger event before this Action is executed.

Type: Profile


Switches to using a specified Configuration Profile.

Networking rutos manual input output io juggler actions script.png

Field Value Description
Execution delay positive integer; default: none A period of time (in seconds) which has to pass after a trigger event before this Action is executed.
Profile profile; default: default Configuration Profile that will be applied by this Action. Configuration Profiles can be defined in the System → [[{{{name}}}_Profiles|Profiles]] page.

Conditions


The Conditions section lets you manage your created Conditions for I/O Juggler Actions. The figure below is an example of Conditions section.

Networking rutx manual input output iojuggler conditions v1.png

Modify condition


Networking rutx manual input output iojuggler conditions modify v1.png

Above is an example of what condition configuration window looks like. Below is a table with detailed explanations on how to configure the condition and what each of the fields mean. To avoid redundancy, screenshots for the other conditions will not be provided, since the structures, syntax and the overall look of the configuration windows for each condition are very similar. Instead, only tables containing information on how to edit each condition will be provided.

Boolean group

Field Value Description
Condition type Boolean group A type of condition.
Boolean type AND | NAND | OR | NOR; default: AND Type of boolean condition.
Add conditions conditions; default: none Specifies conditions which have to be met for action to occur. Conditions are optional.


I/O

Field Value Description
Condition type I/O A type of condition.
I/O inputs/outputs; default: Output(4) Specifies the I/O to which the condition is listening to.
State High | Low; default: High Specifies in what state the pin has to be.



Minute

Field Value Description
Condition type Minute A type of condition.
Inverted function off | on; default: off Inverts the selected condition type. Makes the condition true if the time/date is outside the specified interval.
Interval off | on; default: off Switches between a specific value and a time interval.
Off: Minute integer [0..59]; default: none Specifies minute at which the action can occur.
On: Start minute integer [0..59]; default: none Specifies starting minute of the interval at which the action can occur.
On: End minute integer [0..59]; default: none Specifies ending minute of the interval at which the action can occur.

Note: this table has coloring scheme to indicate which fields can be seen with different configuration.

Hour

Field Value Description
Condition type Hour A type of condition.
Inverted function off | on; default: off Inverts the selected condition type. Makes the condition true if the time/date is outside the specified interval.
Interval off | on; default: off Switches between a specific value and a time interval.
Off: Hour integer [0..59]; default: none Specifies hour at which the action can occur.
On: Start hour integer [0..59]; default: none Specifies starting hour of the interval at which the action can occur.
On: End hour integer [0..59]; default: none Specifies ending hour of the interval at which the action can occur.

Note: this table has coloring scheme to indicate which fields can be seen with different configuration.

Weekday

Field Value Description
Condition type Weekday A type of condition.
Inverted function off | on; default: off Inverts the selected condition type. Makes the condition true if the time/date is outside the specified interval.
Interval off | on; default: off Switches between a specific value and a time interval.
Off: Weekday weekday; default: Monday Specifies weekday at which the action can occur.
On: Start weekday weekday; default: Monday Specifies starting weekday of the interval at which the action can occur.
On: End weekday weekday; default: Monday Specifies ending weekday of the interval at which the action can occur.

Note: this table has coloring scheme to indicate which fields can be seen with different configuration.

Month day

Field Value Description
Condition type Month day A type of condition.
Month override off | on; default: off If the option is selected and the specified day is not in the month then the condition uses the last day of the month.
Interval off | on; default: off Switches between a specific value and a time interval.
Off: Day of the month integer [1..31]; default: none Specifies day of the month at which the action can occur.
On: Start day of the month integer [1..31]; default: none Specifies starting day of the interval of the month at which the action can occur.
On: End day of the month integer [1..31]; default: none Specifies ending day of the interval of the month at which the action can occur.

Note: this table has coloring scheme to indicate which fields can be seen with different configuration.

Year

Field Value Description
Condition type Year A type of condition.
Inverted function off | on; default: off Inverts the selected condition type. Makes the condition true if the time/date is outside the specified interval.
Interval off | on; default: off Switches between a specific value and a time interval.
Off: Day of the year integer [1..366]; default: none Specifies day of the year at which the action can occur.
On: Start day of the year integer [1..366]; default: none Specifies starting day of the interval of the year at which the action can occur.
On: End day of the year integer [1..366]; default: none Specifies ending day of the interval of the year at which the action can occur.

Note: this table has coloring scheme to indicate which fields can be seen with different configuration.

[[Category:{{{name}}} Services section]]