Jump to content

Template:Networking rutos manual input output: Difference between revisions

From Teltonika Networks Wiki
No edit summary
No edit summary
 
(188 intermediate revisions by 20 users not shown)
Line 1: Line 1:
{{Template:Networking_rutos_manual_fw_disclosure
{{Template: Networking_device_manual_fw_disclosure
| fw_version = {{{series}}}_R_00.02.03.1
| series = {{{series}}}
| series     = {{{series}}}
| name  = {{{name}}}
| fw_version ={{Template: Networking_device_manual_latest_fw
| series = {{{series}}}
| name  = {{{name}}}
}}
}}
}}


__TOC__
{{#ifeq: {{{name}}}|RUT951|<b>Note:</b> Input/Output page is deprecated for <b>Active PoE</b> devices.|}}
 
==Summary==
==Summary==


<b>Inputs</b> and <b>outputs</b> are used for monitoring and controlling a connected device or receiving signals from that device in order to trigger certain events. This chapter is an overview of the Input/Output section for {{{name}}} devices.
<b>Inputs</b> and <b>outputs</b> are used for monitoring and controlling a connected device or receiving signals from that device in order to trigger certain events.
 
{{Template:Networking_rutos_manual_basic_advanced_webui_disclaimer
| series = {{{series}}}
}}


{{#switch:{{{series}}}
This chapter of the user manual provides an overview of the Input/Output section for {{{name}}} devices.
| RUTX =
==Characteristics==


The router's input/output pins can be found inside the power socket:
==Physical characteristics and I/O pin mapping==


[[File:Networking_rutx_manual_input_output_status_pinout_v1.png]]
Electrical characteristics and I/O pin mapping information are presented below.
----
The electric characteristics for the input and output pins are as follows:


<ul>
{{Template:Networking_rutos_manual_input_output_pinout
    <li>Digital non-isolated input:
| series         = {{{series}}}
         <ul>
| name          = {{{name}}}
            <li>logic low: 0 - 5 V</li>
| configurableio = {{{configurableio}}}
            <li>logic high: 8 - 40 V</li>
| input_volts    = {{{input_volts}}}
        </ul>
    </li>
    <li>Digital open collector output: 30 V, 300 mA</li>
</ul>
| TRB14X =
{{#ifeq:{{{name}}}|TRB141
|
==Characteristics==
 
TRB141 has eighteen input/output pins, two of them can be found inside the power socket and the rest sixteen are on the side of the device. A list of Input/Output electric characteristics inherent in TRB141 devices can be found bellow.
 
===Power Socket Pins===
----[[File:Networking_trb141_manual_I-O_power_v1.png|border|class=tlt-border|353x353px]]<br />
 
*'''Power''' pin: +9 ... +30 VDC positive power input.
*'''Ground''' pin: negative/ground connection from power supply.
*'''I/0''' pins: programmable Input/Output pins (Open Collector output, max  30V or Digital input where 0-7.3 V is detected as logical "0", 7.3-30 V is  detected as logical "1").
 
===Connector Pins===
----
[[File:Networking_trb141_manual_I-O_socket_v1.png|345x345px|border|class=tlt-border]]
 
*'''DI1''' and '''DI2''' are DRY/WET configurable inputs. WET: 0-1.9 V is detected as logical "0", 1.9-3.8 V is detected as logical "1".  DRY: Logical "0" is detected when input is shorted to GND, otherwise  input is detected as logical "1".
*'''NC<sub>1</sub>  C<sub>1</sub>''' and '''NO<sub>1</sub>''' are respectively Normally Closed, Common and Normally Open contacts of internal Non-Latching Relay. Maximum relay ratings: 0.5A at 60 VDC/70 VAC, 1A at 30 VDC/VAC.
*'''NC<sub>2</sub> C<sub>2</sub>''' and '''NO<sub>2</sub>''' are respectively Normally Closed, Common and Normally Open contacts of internal Latching Relay. Maximum relay ratings: 0.8A at 70 VDC, 0.9A at 70 VAC, 2A at 30 VDC/VAC.
*'''A''' is ADC input. Analog voltage range 0 - 30 V. Input can be configured for 4-20mA sensor protocol as current measurement of 0 - 30 mA.
*'''l''' and '''⏚''' are isolated input contacts. 0-7.3 V is detected as logical "0",  7.3-71 V is detected as logical "1".
*'''+''' is power output connected directly to gateway's power supply input pin.  This Output can be used for powering external 4-20 mA current sensor.
*'''3.8''' is 3.8V power output which can be used to power 1-Wire sensors when needed.
*'''1W''' 1-Wire protocol input/output.
*'''⏚''' is GND contact.
}}
| TRB2XX =
 
|
}}
}}


==Status==
==Status==


{{#switch:{{{series}}}
The <b>Status</b> page displays the current states of the device's input and output pins:
| TRB2XX =
The <b>Status</b> page displays the current states of the device configurable inputs and outputs:


[[File:Networking_trb2_manual_input_output_status_v1.png|border|class=tlt-border]]
{{#switch: {{{name}}}
| TRB141 = [[File:Networking_trb141_manual_input_output_status_v6.png|border|class=tlt-border]]
| RUTM55 = [[File:Networking rutm55 manual input output status_v1.png|border|class=tlt-border]]
| RUT955|RUT956|RUT906|RUT976 = [[File:Networking_RUT956_manual_input_output_status_v1.png|border|class=tlt-border]]
| TRB245|TRB246|TRB255|TRB256|TRB247 = [[File:Networking_trb2_manual_input_output_status_v5.png|border|class=tlt-border]]
| RUTM30|RUTM31 = [[File:Networking_rut301_manual_input_output_status_v3.png|border|class=tlt-border]]
| #default = [[File:Networking_{{lc:{{{series}}}}}_manual_input_output_status_v3.png|border|class=tlt-border]]
}}


You can invert Input pins by clicking on clider in <b>Inversion</b> column and switch Outputs pin state by clicking on slider in <b>State</b> column.
{{#ifeq: {{{powersocket}}}|1|
  {{#ifeq: {{{configurableio}}}|1|
You can invert an Input pin or switch the state of an Output pin and change I/O direction by clicking on edit button in the "Actions" column. Also user can <b>Rename</b> Input/Output interface:
[[File:Networking_manual_configurable_input_output_configuration.png|border|class=tlt-border]]
<table class="nd-mantable">
    <tr>
        <th>Field</th>
      <th>Value</th>
      <th>Description</th>
    </tr>
    <tr>
      <td>Custom name</td>
      <td>string; default: <b>none</b></td>
      <td>Sets custom name for this I/O.</td>
    </tr>
    <tr>
      <td>Custom names for</td>
      <td><b>Low state</b> (Sets custom low state name); <b>High state</b> (Sets custom high state name)</td>
      <td>Sets custom state names.</td>
    </tr>
    <tr>
      <td>I/O direction</td>
      <td>Input {{!}} <span style="color:blue">Output</span>; default: <b>none</b></td>
      <td>Sets custom state names.</td>
    </tr>
    <tr>
      <td>Invert input</td>
      <td>on {{!}} off; default: <b>off</b></td>
      <td>Inverts the input signal.</td>
    </tr>
    <tr>
      <td><span style="color:blue">Output state</span></td>
      <td>Low level {{!}} High level; default: <b>Low level</b></td>
      <td>Sets the state of the output.</td>
    </tr>
</table>
|You can invert an Input pin or switch the state of an Output pin by clicking on edit button in the "Actions" column. Also user can <b>Rename</b> Input/Output interface:
[[File:Networking_manual_input_output_configuration.png|border|class=tlt-border]]
<table class="nd-mantable">
    <tr>
        <th>Field</th>
      <th>Value</th>
      <th>Description</th>
    </tr>
    <tr>
      <td>Custom name</td>
      <td>string; default: <b>none</b></td>
      <td>Sets custom name for this I/O.</td>
    </tr>
    <tr>
      <td>Custom names for</td>
      <td><b>Low state</b> (Sets custom low state name); <b>High state (Sets custom high state name)</b></td>
      <td>Sets custom state names.</td>
    </tr>
    <tr>
      <td><b>Iput pin:</b> Invert input</td>
      <td>on {{!}} off; default: <b>off</b></td>
      <td>Inverts the input signal.</td>
    </tr>
    <tr>
      <td><b>Output pin:</b>Output state</td>
      <td>Low level {{!}} High level; default: <b>Low level</b></td>
      <td>Sets the state of the output.</td>
    </tr>
</table>}}||}}


===Status from command line===
{{#switch: {{{name}}}
----
| TRB141 = '''Note:''' When dry/wet input is not connected to anything - the state of level is undetermined.
You can also obtain the status of the input or output from the command line. List of ubus possible <b>values</b> in {{{name}}} devices:
| #default =}}
{{#switch: {{{name}}}|RUT955|RUT956|RUT906|TRB245|TRB246|TRB255|TRB141|TRB256|RUT976|TRB247|RUTM55 = 
'''Note:''' You can edit the ADC/ACL formula to customize values and other Input/Output inversions, relays closures, if supported by the device, by clicking the edit button in the "Actions" column.


ioman.adc.adc0
<b>Example</b> - Custom I/O status labels for "Analog input":
ioman.gpio.dio0
[[File:Networking_manual_input_output_status_formula_adc0_v1.png|border|class=tlt-border]]
ioman.gpio.dio1
ioman.gpio.dio2


Call command <b>ubus call <u>value</u> status </b>:
<b>Example</b> - Custom I/O status labels for "Analog current loop":
root@Teltonika-{{{name}}}:~# ubus call ioman.gpio.dio0 status
[[File:Networking_manual_input_output_status_formula_acl0_v1.png|border|class=tlt-border]]
{
| #default =}}
        "value": "0",
        "direction": "out",
        "bi_dir": true,
        "invert_input": false
}
 
<ul>
    <li><b>dio0</b> is configurable input / output:
        <ul>
            <li>"value": "<b>0</b>" means low level state.</li>
            <li>"value": "<b>1</b>" means high level state.</li>
        </ul>
    </li>
    <li><b>adc0</b> is analog input:
        <ul>
            <li>"value": "<b>0.54</b>" means 0.54V.</li>
        </ul>
    </li>
</ul>
| TRB14X =
{{#ifeq:{{{name}}}|TRB141
|
The <b>Status</b> page displays the current states of the device configurable inputs and outputs:
 
[[File:Networking_trb1_manual_input_output_status_v1.png|border|class=tlt-border]]
 
You can invert Input pins by clicking on clider in <b>Inversion</b> column and switch Outputs pin state by clicking on slider in <b>State</b> column.


===Status from command line===
===Status from command line===
----
----
You can also obtain the status of the input or output from the command line. List of ubus possible <b>values</b> in {{{name}}} devices:
You can also obtain the status of input and output pins via the command line (CLI or SSH). List of possible ubus values in {{{name}}} devices:


ioman.acl.acl0
{{#switch: {{{series}}}
ioman.adc.adc0
| TRB1 ={{#ifeq:{{{name}}}
ioman.dwi.dwi0
  | TRB141 | {{Template:Networking_trb141_manual_input_output_status}}
ioman.dwi.dwi1
  | {{Template:Networking_{{lc:{{{series}}}}}_manual_input_output_status|name={{{name}}}}}
ioman.gpio.dio0
  }}
ioman.gpio.dio1
| RUTM = {{#switch: {{{name}}} | RUTM30|RUTM31 = {{Template:Networking_rut301_manual_input_output_status|name={{{name}}}}}
ioman.gpio.iio
| RUTM55 = {{Template:Networking rutm55 manual input output status}}
ioman.gpio.onewire
| #default = {{Template:Networking_{{lc:{{{series}}}}}_manual_input_output_status|name={{{name}}}}}}}
ioman.relay.relay0
| #default = {{Template:Networking_{{lc:{{{series}}}}}_manual_input_output_status|name={{{name}}}}}
ioman.relay.relay1
}}
 
In order to read value use '''''status''''' command.
 
ubus call ioman.gpio.dio0 status
ubus call ioman.relay.relay0 status


To change input settings use '''''update''''' command and write the value.
{{#switch: {{{name}}}
 
| RUT300|RUT301|RUT360|TRB245|TRB246|TRB255|TRB140|TRB141|TRB142|TRB143|TRB145|TRB256|TRB160|RUTM30|RUTM31 = '''Note:''' Changes of configurable pin type from output to input (and reverse) could causes the issues where the specific type was set in configurations. Make sure that configurations do not contradict one another.
ubus call ioman.gpio.dio0 update '{"value":"0"}'
| #default =
ubus call ioman.gpio.dio0 update '{"value":"1"}'
 
To change relay settings use '''''update''''' command and write state.
 
ubus call ioman.relay.relay0 update '{"state":"open"}'
ubus call ioman.relay.relay0 update '{"state":"closed"}'
 
===Reading I/O values from directory===
----
 
You can also collect I/O values straight from directories in your device.
 
====Digital inputs, Relay outputs====
----
 
Following is a list of I/O directories in '''''/sys/class/gpio/''''':
 
  dwi1(dry wet) input 14; toggle 12 (to read value refer to gpio14, to change state dry/wet refer to gpio12)
dwi2(dry wet) input 15; toggle 38 (to read value refer to gpio15, to change state dry/wet refer to gpio38)
relay open 20; closed 22; (turn off gpio20 set to 0, turn on gpio22 set value to 1; and visa versa)
latching relay open 23; close 21 (turn off gpio23 set to 0, turn on gpio21 set value to 1; and visa versa)
dio0 (power socket) input 13; output 16 (direction can be changed, to read input use gpio13, to control output use gpio16)
dio1 (power socket) input 17; output 78 (direction can be changed, to read input use gpio17, to control output use gpio78)
iio (isolated input) input 1021 (to read value refer to gpio1021)
 
In order to read digital input value use '''''cat''''' command.
 
cat /sys/class/gpio/gpio14/value
cat /sys/class/gpio/gpio15/value
cat /sys/class/gpio/gpio1021/value
 
To change input state use '''''echo''''' command where "1" is "dry" state and "0" is "wet" state.
 
echo 0 > /sys/class/gpio/gpio12/value
echo 1 > /sys/class/gpio/gpio38/value
 
When one Relay output is open, other one is closed, so turning on/off the output you will have to change value on both pins. For that '''''echo''''' command is used. Same principle applies to Latching Relay output.
 
echo 1 > /sys/class/gpio/gpio20/value & echo 0 > /sys/class/gpio/gpio22/value
echo 1 > /sys/class/gpio/gpio23/value & echo 0 > /sys/class/gpio/gpio21/value
 
====ADC (Analog Input)====
----
 
ADC (Analog input) can be read from different directory, '''''/sys/devices/qpnp-vadc-8/mpp4_vadc''''' also using '''''cat''''' command, but received Result value has to be divided by 126582 to get number in volts.
 
cat /sys/devices/qpnp-vadc-8/mpp4_vadc
| <!--    for other TRB1    -->
The <b>Status</b> page displays the current states of the device input and output:
 
[[File:Networking_rutx_manual_input_output_status_v2.png|border|class=tlt-border]]
 
You can invert Input pin by clicking on clider in <b>Inversion</b> column and switch Output pin state by clicking on slider in <b>State</b> column.
 
===Status from command line===
----
You can also obtain the status of the input or output from the command line. List of ubus possible <b>values</b> in {{{name}}} devices:
 
ioman.gpio.din1
ioman.gpio.dout1
 
Call command <b>ubus call <u>value</u> status </b>:
root@Teltonika-{{{name}}}:~# ubus call ioman.gpio.dout1 status
{
        "value": "0",
        "direction": "in",
        "bi_dir": false,
        "invert_input": false
}
 
<ul>
    <li><b>din1</b> is the input:
        <ul>
            <li>"value": "<b>0</b>" means low level state.</li>
            <li>"value": "<b>1</b>" means high level state.</li>
        </ul>
    </li>
    <li><b>dout1</b> is the output:
        <ul>
            <li>"value": "<b>0</b>" means low level state.</li>
            <li>"value": "<b>1</b>" means high level state.</li>
        </ul>
    </li>
</ul>
}}
}}
| <!--    for rutx      -->
The <b>Status</b> page displays the current states of the device input and output:


[[File:Networking_rutx_manual_input_output_status_v2.png|border|class=tlt-border]]
==Scheduler==
 
You can invert Input pin by clicking on clider in <b>Inversion</b> column and switch Output pin state by clicking on slider in <b>State</b> column.
 
===Status from command line===
----
You can also obtain the status of the input or output from the command line. List of ubus possible <b>values</b> in {{{name}}} devices:


ioman.gpio.din1
The output <b>Scheduler</b> can be used to configure a timetable of when an output should be turned on or off, based on days of the week or month and hours of the day. The General Configuration section is used to turn the Output Scheduler on or off.
ioman.gpio.dout1


Call command <b>ubus call <u>value</u> status </b>:
<b>Note:</b> I/O Scheduler is additional software on some devices that can be installed from the <b>System → [[{{{name}}} Package Manager|Package Manager]]</b> page.
root@Teltonika-{{{name}}}:~# ubus call ioman.gpio.dout1 status
{
        "value": "0",
        "direction": "in",
        "bi_dir": false,
        "invert_input": false
}


<ul>
[[File:Networking_rutos_manual_input_output_scheduler_general_configuration_v1.png|border|class=tlt-border]]
    <li><b>din1</b> is the input:
        <ul>
            <li>"value": "<b>0</b>" means low level state.</li>
            <li>"value": "<b>1</b>" means high level state.</li>
        </ul>
    </li>
    <li><b>dout1</b> is the output:
        <ul>
            <li>"value": "<b>0</b>" means low level state.</li>
            <li>"value": "<b>1</b>" means high level state.</li>
        </ul>
    </li>
</ul>
}}


The Scheduler is configured in the form of <b>Instances</b>. A Scheduler Instance defines a time interval during which the state of an output associated with the instance will be set to "High". The Output Scheduler Instances list is empty by default. Click the 'Add' button in order to create a new Scheduler Instance:


==Post/Get==
[[File:Networking_rutos_manual_input_output_scheduler_add_button_v1.png|border|class=tlt-border]]


Enabling <b>Post/Get</b> will allow you to send HTTP POST/GET requests to device which controls the state of the output. The figure below is an example of the Post/Get configuration section and the table below provides information on the fields contained in that section:
After this you should be redirected to the configuration page for the newly added Instance which should look similar to this:


[[File:Networking_rutx_manual_input_output_post_get_v1.png|border|class=tlt-border]]
[[File:Networking_rutos_manual_input_output_scheduler_instance_configuration.png|border|class=tlt-border]]


<table class="nd-mantable">
<table class="nd-mantable">
Line 279: Line 163:
       <td>Enable</td>
       <td>Enable</td>
       <td>off | on; default: <b>off</b></td>
       <td>off | on; default: <b>off</b></td>
       <td>Turns Post/Get on or off.</td>
       <td>Turns the Scheduler Instance on or off.</td>
     </tr>
     </tr>
     <tr>
     <tr>
       <td>Username</td>
       <td>Pin</td>
       <td>string; default: <b>none</b></td>
       <td>output pin; default: <b>P. S. Different devices have different output settings.</b></td>
       <td>Username used for authentication in POST/GET queries.</td>
       <td>Output pin. The state of the selected output will be set to "High" during the time interval defined in the fields below.</td>
     </tr>
     </tr>
     <tr>
     <tr>
    <td>Password</td>
      <td>Interval Type</td>
        <td>string; default: <b>none</b></td>
      <td>Weekdays | <span style="color: red;">Month Days</span>; default: <b>Weekdays</b></td>
        <td>Password used for authentication in POST/GET queries.</td>
      <td>Selects the interval type for scheduler to use.</td>
     </tr>
     </tr>
</table>
===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:
<table class="nd-othertables_2">
     <tr>
     <tr>
        <th style="width: 500px">Action</th>
      <td>Start Day</td>
       <th style="width: 900px">POST/GET URL</th>
       <td>[Monday..Sunday] | [1..31]; default: <b>Monday | 1</b></td>
      <td>The day that marks the start of the time interval.</td>
     </tr>
     </tr>
{{#ifeq:{{{configurableio}}}|1|
     <tr>
     <tr>
       <td>Turn Output state to high</td> <!--  another ifeq to change ip subnet according to trb14x...  -->
       <td>Start Time</td>
       <td><nowiki>http://192.168.</nowiki>{{#ifeq:{{{series}}}|TRB14X|2|1}}.1/cgi-bin/<span style="color: #0054a6;"><b>io_state</b></span><nowiki>?username=user1&password=user1&pin=dout1</nowiki><span style="color: #0054a6;"><b><nowiki>&state=on</nowiki></b></span></td>
       <td>hh:mm ([00..23]:[00..59]); default: <b>12:00</b></td>
      <td>The hour and minute that mark the start of the time interval.</td>
     </tr>
     </tr>
     <tr>
     <tr>
       <td>Turn Output state to low after 5 seconds for 3 seconds</td>
       <td>End Day</td>
       <td><nowiki>http://192.168.</nowiki>{{#ifeq:{{{series}}}|TRB14X|2|1}}.1/cgi-bin/<span style="color: #0054a6;"><b>io_state</b></span><nowiki>?username=user1&password=user1&pin=dout1&state=on</nowiki><span style="color: #0054a6;"><b><nowiki>&delay=5</nowiki></b></span><span style="color: #3232ff;"><b><nowiki>&time=3</nowiki></b></span></td>
       <td>[Monday..Sunday] | [1..31]; default: <b>Tuesday | 1</b></td>
      <td>The day that marks the end of the time interval.</td>
     </tr>
     </tr>
     <tr>
     <tr>
        <td>Change Configurable Input/Output with pin3 to Output</td>
      <td>End Time</td>
        <td><nowiki>http://192.168.</nowiki>{{#ifeq:{{{series}}}|TRB14X|2|1}}.1/cgi-bin/<span style="color: #0054a6;"><b>io_type</b></span><nowiki>?username=user1&password=user1&</nowiki><span style="color: #0054a6;"><b>pin=dio1</b></span><span style="color: #3232ff;"><b><nowiki>&type=out</nowiki></b></span></td>
      <td>hh:mm ([00..23]:[00..59]); default: <b>12:00</b></td>
      <td>The hour and minute that mark the end of the time interval.</td>
     </tr>
     </tr>
|
     <tr>
     <tr>
       <td>Turn Output state to high</td>
       <td><span style="color: red;">Force Last Day</span></td>
       <td><nowiki>http://192.168.1.1/cgi-bin/io_state?username=user1&password=user1&pin=dout1</nowiki><span style="color: #0054a6;"><b><nowiki>&state=on</nowiki></b></span></td>
       <td>off | on; default: <b>off</b></td>
      <td>Forces intervals to accept last day of month as a valid option if selected day does not exist during ongoing month. This field becomes visible only when 'Interval Type' is set to <i>Month Days</i>.</td>
     </tr>
     </tr>
    <tr>
      <td>Turn Output state to low after 5 seconds for 3 seconds</td>
      <td><nowiki>http://192.168.1.1/cgi-bin/io_state?username=user1&password=user1&pin=dout1&state=on</nowiki><span style="color: #0054a6;"><b><nowiki>&delay=5</nowiki></b></span><span style="color: #3232ff;"><b><nowiki>&time=3</nowiki></b></span></td>
    </tr>
}}
   
</table>
</table>


<b>Overview</b>:
<b>Note:</b> A Scheduler Instance will not work unless you turn both the the Scheduler service and the individual instance on.
<ul>
 
    <li>192.168.{{#ifeq:{{{series}}}|TRB14X|2|1}}.1 - device default LAN IP address; replace it in accordance with your own configuration.</li>
==I/O Juggler==
{{#ifeq:{{{configurableio}}}|1|<li>io_state or io_type - allows you to change IO state or type.</li>}}
 
    <li>username - login name from Post/Get configuration.</li>
The <b>I/O Juggler</b> 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:
    <li>password- password from Post/Get configuration.</li>
 
    <li>state - turn Output on or off.</li>
<b>Note:</b> I/O Juggler is additional software on some devices that can be installed from the <b>System → [[{{{name}}} Package Manager|Package Manager]]</b> page.
{{#ifeq:{{{configurableio}}}|1|<li>type - turn Configurable Input/Output to Input or Output.</li>}}
    <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>
</ul>


Delay and time parameters can be used together.
[[File:Networking_rutos_manual_input_output_io_juggler_scheme_condition_mobile_{{{mobile}}}.png|border|class=tlt-border]]
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.


==Scheduler==
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:


With the help of the output <b>Scheduler</b> you can configure a timetable of when the output should be enabled or disabled based on date and time.  
<ul>
By default everything is unset.
    <li><b>Trigger</b> - input state rising.</li>
    <li><b>Condition</b> - 8:00 AM - 5:00 PM.</li>
    <li><b>Action </b> - send email.</li>
</ul>


{{#ifeq:{{{configurableio}}}|1|[[File:Networking_trb2_manual_input_output_output_scheduler_v1.png|border|class=tlt-border]]|[[File:Networking_rutx_manual_input_output_output_scheduler_v2.png|border|class=tlt-border]]}}
The operating sequence would look like this:


==Io juggler==
<ol>
    <li>A connected device raises the input state.</li>
    <li>This {{{name}}} device checks whether the current time is between 8:00 AM and 5:00 PM.
        <ul>
            <li><b>Yes</b> - {{{name}}} sends an email.</li>
            <li><b>No</b> - {{{name}}} doesn't send an email.</li>
        </ul>
    </li>
</ol>
----
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:


The <b>Io juggler</b> page is used create automated actions based on Input state and conditions.
[[File:Networking_rutos_manual_input_output_io_juggler_scheme_mobile_{{{mobile}}}.png]]


===General===
===General===
----
----
The <b>General</b> 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 (<u>conditions are optional</u>).


The <b>General</b> section allows you to create automated Actions based on selected Inputs and their trigger state.
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"{{#ifeq:{{{configurableio}}}|1|<span class="asterisk">*</span>|}}:
The figure below is an example of Conditions section.


{{#switch:{{{series}}}
[[File:Networking_rutos_manual_input_output_io_juggler_general_enabled_v1.png|border|class=tlt-border]]
| TRB14X = [[File:Networking_trb1_manual_input_output_iojuggler_general_v1.png]]
{{#ifeq:{{{configurableio}}}|1|<span class="asterisk">*</span> Input rules for Configurable I/O will work only when the type of the pin is set to "input"|}}
| TRB2XX = [[File:Networking_trb2_manual_input_output_iojuggler_general_v1.png]]
====Input====
|[[File:Networking_rutx_manual_input_output_iojuggler_general_v1.png]]}}
----
The <b>Input</b> 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:


====Modify Input configuration====
[[File:Networking_rutos_manual_input_output_io_juggler_general_input_add_button_juggler_input.png|border|class=tlt-border]]
----


You can find explanation about fields in the table below this illustration.
After this you will be redirected to the configuration page for the newly added Rule, which should look similar to this:


[[File:Networking_rutx_manual_input_output_iojuggler_general_modify_v1.png]]
[[File:Networking_rutos_manual_input_output_io_juggler_general_input_configuration_juggler_input.png|border|class=tlt-border]]


<table class="nd-mantable">
<table class="nd-mantable">
Line 385: Line 266:
     <tr>
     <tr>
         <td>Enabled</td>
         <td>Enabled</td>
         <td>off {{!}} on; default: <b>off</b> </td>
         <td>off | on; default: <b>off</b> </td>
         <td>Changes current profile to specified one when action triggers.</td>
         <td>Changes current profile to specified one when action triggers.</td>
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Trigger interval</td>
         <td>Trigger interval</td>
         <td>positive integer; default: <b>none</b></td>
         <td>integer [0..99999999]; default: <b>1</b></td>
         <td>Specifies what is the shortest amount of seconds between triggers.</td>
         <td>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.</td>
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Trigger</td>
         <td>Trigger</td>
         <td>Rising {{!}} Falling {{!}} Both; default: <b>Rising</b> </td>
         <td>Rising | Falling | Both; default: <b>Rising</b> </td>
         <td>Specifies on which trigger state this rule will be activated.</td>
         <td>Input state change that will trigger this rule.</td>
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Add actions</td>
         <td>Add actions</td>
         <td>actions; default: <b>none</b> </td>
         <td>i/o juggler action(s); default: <b>none</b> </td>
         <td>Specifies actions which have to be met for rule to be executed. Actions are optional.</td>
         <td>Actions that will be executed by this rule when the specified trigger and conditions (optional) occur.</td>
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Add conditions</td>
         <td>Add conditions</td>
         <td>conditions; default: <b>none</b> </td>
         <td>i/o juggler conditions; default: <b>none</b> </td>
         <td>Specifies conditions which have to be met for action to occur. Conditions are optional.</td>
         <td>Conditions that have to be met for the rule to take action. Conditions are optional.</td>
     </tr>
     </tr>
</table>
</table>
Line 412: Line 293:
===Actions===
===Actions===
----
----
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_v1.png|border|class=tlt-border]]


The <b>Actions</b> section lets you manage your created Actions for IO Juggler inputs.
To create a new Action, click the 'Add' button.
The figure below is an example of Actions section.


[[File:Networking_rutx_manual_input_output_iojuggler_actions_v1.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'):


====Modify action====
[[File:Networking_rutos_manual_input_output_io_juggler_actions_configuration_reboot_v1.png|border|class=tlt-border]]
----


[[File:Networking_rutx_manual_input_output_iojuggler_actions_modify_v1.png]]
<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.


Above is an example of what action configuration window looks like. Below is a table with detailed explanations on
You will find descriptions of each different action Type described on the sections below.
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=====
====Type: Email====
----
----
<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 v3.png|border|class=tlt-border]]


=====Email=====
----
<table class="nd-mantable">
<table class="nd-mantable">
     <tr>
     <tr>
Line 468: Line 320:
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Type</td>
         <td>Name</td>
         <td>Email</td>
         <td>string; default: <b>none</b></td>
         <td>Sends email when action triggers.</td>
         <td>Name of action.</td>
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Subject</td>
         <td>Subject</td>
         <td>string; default: <b>none</b></td>
         <td>string; default: <b>none</b></td>
         <td>Subject of email.</td>
         <td>Subject of an email.</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 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>{{#ifeq: {{{dualmodem}}}| 1 |
    <tr>
        <td>Modem</td>
        <td>Primary modem {{!}} Secondary modem; default: <b>Primary modem</b></td>
        <td>Modem, which is used to get information from.</td>
     </tr>|}}
     <tr>
     <tr>
         <td>Email user</td>
         <td>Sender's 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>
     <tr>
     <tr>
         <td>Add conditions</td>
         <td>Add conditions</td>
         <td>conditions; default: <b>none</b> </td>
         <td>list; default: <b>none</b></td>
         <td>Specifies conditions which have to be met for action to occur. Conditions are optional.</td>
         <td>Specifies global conditions for this pin. Actions will trigger only if the conditions are met. Conditions are optional.</td>
     </tr>
     </tr>
</table>
</table>


{{#ifeq:{{{mobile}}}|0||
====Type: Output====
=====SMS=====
----
----
<table class="nd-mantable">
Changes the state of a selected output pin.
    <tr>
        <th>Field</th>
      <th>Value</th>
      <th>Description</th>
    </tr>
    <tr>
        <td>Type</td>
        <td>SMS</td>
        <td>Sends sms when action triggers.</td>
    </tr>
    <tr>
        <td>Text message</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
        their codes, which can be included in messages to send device information.</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>Recipients</td>
        <td><span style="color:red;">Single number</span> {{!}} <span style="color:blue;">Group</span>; default: <b>Single number</b></td>
        <td>How many recipients will get the message.</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>
        <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>


<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.png|border|class=tlt-border]]
}}


=====Output=====
----
<table class="nd-mantable">
<table class="nd-mantable">
     <tr>
     <tr>
Line 564: Line 374:
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Type</td>
         <td>Name</td>
         <td>Output</td>
         <td>string; default: <b>none</b></td>
         <td>Changes Output state when action triggers.</td>
         <td>Name of action.</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/relay; default: <b>Output(4)</b></td>
         <td>output pin; default: <b>P. S. Different devices have different output settings.</b></td>
         <td>Specifies the output/relay of which the state will be changed.</td>
         <td>Specifies the output/relay of which the state will be changed.</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>
     <tr>
     <tr>
         <td>Add conditions</td>
         <td>Add conditions</td>
         <td>conditions; default: <b>none</b> </td>
         <td>list; default: <b>none</b></td>
         <td>Specifies conditions which have to be met for action to occur. Conditions are optional.</td>
         <td>Specifies global conditions for this pin. Actions will trigger only if the conditions are met. Conditions are optional.</td>
     </tr>
     </tr>
</table>
</table>


====Type: HTTP====
----
Executes a HTTP POST/GET request.
[[File:Networking_rutos_manual_input_output_io_juggler_actions_http_v3.png|border|class=tlt-border]]


=====HTTP=====
----
<table class="nd-mantable">
<table class="nd-mantable">
     <tr>
     <tr>
Line 620: Line 433:
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Type</td>
         <td>Name</td>
         <td>HTTP</td>
         <td>string; default: <b>none</b></td>
        <td>Sends HTTP request when action triggers.</td>
         <td>Name of action.</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>
     <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/relay 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>
        <td>Alt. parameters mode</td>
        <td><span style="color:red">off</span> | <span style="color:blue">on</span>; default: <b>off</b></td>
        <td>Choose a different way to pass parameters. If method is POST parameters are passed in request body. If method is GET parameters are passed throught the URL.</td>
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Parameters</td>
         <td><span style="color:red">Parameters</span></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}}}
    </tr>
| 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>
    <tr>
| 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>
        <td><span style="color:blue">Text message</span></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>
        <td>default: <b>Device name - %rn; Time stamp - %ts</b></td>
}}
        <td>Message to send.</td>
    </tr>
    <tr>
        <td>Custom headers</td>
        <td>string; default: <b>none</b></td>
        <td>Allows to add custom headers to the HTTP requests.</td>
    </tr>
    <tr>
        <td>Execution delay</td>
        <td>positive integer; default: <b>none</b></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>Add conditions</td>
         <td>conditions; default: <b>none</b> </td>
         <td>list; default: <b>none</b></td>
         <td>Specifies conditions which have to be met for action to occur. Conditions are optional.</td>
         <td>Specifies global conditions for this pin. Actions will trigger only if the conditions are met. 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_v1.png|border|class=tlt-border]]


=====Script=====
----
<table class="nd-mantable">
<table class="nd-mantable">
     <tr>
     <tr>
Line 671: Line 497:
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Type</td>
         <td>Name</td>
         <td>Script</td>
         <td>string; default: <b>none</b></td>
         <td>Runs script when action triggers.</td>
         <td>Name of action.</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 cript</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>
    </tr>
    <tr>
        <td>Arguments</td>
        <td>string; default: <b>none</b> </td>
         <td>Optional arguments which can be provided for the script. You can include device information with values given below this input field.</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>
     <tr>
     <tr>
         <td>Add conditions</td>
         <td>Add conditions</td>
         <td>conditions; default: <b>none</b> </td>
         <td>list; default: <b>none</b></td>
         <td>Specifies conditions which have to be met for action to occur. Conditions are optional.</td>
         <td>Specifies global conditions for this pin. Actions will trigger only if the conditions are met. 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.
====Type: Reboot====
----
Reboots the device.
 
[[File:Networking_rutos_manual_input_output_io_juggler_actions_reboot_v1.png|border|class=tlt-border]]


=====Reboot=====
----
<table class="nd-mantable">
<table class="nd-mantable">
     <tr>
     <tr>
Line 718: Line 541:
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Type</td>
         <td>Name</td>
         <td>Reboot</td>
         <td>string; default: <b>none</b></td>
         <td>Reboots device when action triggers.</td>
         <td>Name of action.</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>Add conditions</td>
         <td>conditions; default: <b>none</b> </td>
         <td>list; default: <b>none</b></td>
         <td>Specifies conditions which have to be met for action to occur. Conditions are optional.</td>
         <td>Specifies global conditions for this pin. Actions will trigger only if the conditions are met. Conditions are optional.</td>
     </tr>
     </tr>
</table>
</table>


{{#ifeq:{{{mobile}}}|0||
====Type: Profile====
    {{#ifeq:{{{series}}}|TRB14X||
=====Change sim=====
----
----
Switches to using a specified Configuration Profile.
[[File:Networking_rutos_manual_input_output_io_juggler_actions_profile_v1.png|border|class=tlt-border]]
<table class="nd-mantable">
<table class="nd-mantable">
     <tr>
     <tr>
Line 745: Line 570:
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Type</td>
         <td>Name</td>
         <td>Change sim</td>
         <td>string; default: <b>none</b></td>
         <td>Changes active sim card when action triggers.</td>
         <td>Name of action.</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>Profile</td>
         <td><span style="color:red;">off</span> {{!}} on; default: <b>off</b></td>
         <td>profile; default: <b>default</b> </td>
         <td>Switches to a different sim card.</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>
        <td><span style="color:red;">Off:</span> Target</td>
        <td>Sim1 {{!}} Sim2; default: <b>Sim1</b></td>
        <td>Switches to a selected sim card.</td>
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Add conditions</td>
         <td>Add conditions</td>
         <td>conditions; default: <b>none</b> </td>
         <td>list; default: <b>none</b></td>
         <td>Specifies conditions which have to be met for action to occur. Conditions are optional.</td>
         <td>Specifies global conditions for this pin. Actions will trigger only if the conditions are met. 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.
====Type: RMS====
    }}
}}
===Conditions===
----
 
The <b>Conditions</b> section lets you manage your created Conditions for IO Juggler Actions.
The figure below is an example of Conditions section.
 
[[File:Networking_rutx_manual_input_output_iojuggler_conditions_v1.png]]
 
====Modify condition====
----
----
Enables or disables RMS service.


[[File:Networking_rutx_manual_input_output_iojuggler_conditions_modify_v1.png]]
[[File:Networking_rutos_manual_input_output_io_juggler_actions_rms_v2.png|border|class=tlt-border]]
 
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=====
----
<table class="nd-mantable">
<table class="nd-mantable">
     <tr>
     <tr>
Line 801: Line 604:
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Condition type</td>
         <td>Name</td>
         <td>Boolean group</td>
         <td>string; default: <b>none</b></td>
         <td>A type of condition.</td>
         <td>Name of action.</td>
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Boolean type</td>
         <td>Execution delay</td>
         <td>AND {{!}} NAND {{!}} OR {{!}} NOR; default: <b>AND</b></td>
         <td>positive integer; default: <b>none</b></td>
         <td>Type of boolean condition.</td>
        <td>A period of time (in seconds) which has to pass after a trigger event before this Action is executed.</td>
    </tr>
    <tr>
        <td>Enable RMS</td>
        <td>off {{!}} on; default: <b>off</b> </td>
         <td>Specifies whether RMS service will be enabled or disabled with this action.</td>
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Add conditions</td>
         <td>Add conditions</td>
         <td>conditions; default: <b>none</b> </td>
         <td>list; default: <b>none</b></td>
         <td>Specifies conditions which have to be met for action to occur. Conditions are optional.</td>
         <td>Specifies global conditions for this pin. Actions will trigger only if the conditions are met. Conditions are optional.</td>
     </tr>
     </tr>
</table>
</table>


====Type: MQTT====
----
Executes a MQTT action.
[[File:Networking rutos manual input output io juggler actions mqtt_v2.png|border|class=tlt-border]]


=====I/O=====
----
<table class="nd-mantable">
<table class="nd-mantable">
     <tr>
     <tr>
Line 827: Line 638:
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Condition type</td>
         <td>Name</td>
         <td>I/O</td>
         <td>string; default: <b>none</b></td>
         <td>A type of condition.</td>
        <td>Name of action.</td>
    </tr>
    <tr>
        <td>Text message</td>
        <td>string; default: <b>none</b> </td>
        <td>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>
    </tr>
    <tr>
        <td>Topic</td>
        <td>string; default: <b>none</b></td>
        <td>The name of the topic that the broker will subscribe to.</td>
    </tr>
    <tr>
        <td>Client ID</td>
        <td>string; default: <b>none</b></td>
        <td>Client ID to send with the data. If empty, a random client ID will be generated.</td>
    </tr>
    <tr>
        <td>Hostname</td>
        <td>host | ip; default: <b>none</b> </td>
        <td>Broker’s IP address or hostname.</td>
    </tr>
    <tr>
        <td>Port</td>
        <td>integer [0..65535]; default: <b>1883</b></td>
        <td>Broker's port number.</td>
    </tr>
    <tr>
        <td>Keepalive</td>
        <td>positive integer; default: <b>none</b></td>
        <td>The number of seconds after which the broker should send a PING message to the client if no other messages have been exchanged in that time</td>
    </tr>
    <tr>
        <td>Qos</td>
        <td>At most once (0) | At least once (1) | Exactly once (2); default: <b>At most once (0)</b></td>
         <td>A period of time (in seconds) which has to pass after a trigger event before this Action is executed.</td>
    </tr>
    <tr>
        <td>Username</td>
        <td>string; default: <b>none</b></td>
        <td>Username used for authentication to the Broker.</td>
    </tr>
    <tr>
        <td>Password</td>
        <td>string; default: <b>none</b></td>
        <td>Password used for authentication to the Broker.</td>
    </tr>
    <tr>
        <td>TLS</td>
        <td>off {{!}} <span style="color:blue">on</span>; default: <b>off</b></td>
        <td>Select to enable TLS encryption.</td>
    </tr>
    <tr>
        <td><span style="color:blue">TLS Type</span></td>
        <td>Certificate based {{!}} Pre-Shared-Key based; default: <b>Certificate based</b></td>
        <td>Type of TLS encryption.</td>
    </tr>
    <tr>
        <td><span style="color:blue">Certificate based:</span>Allow insecure connection</td>
        <td>off {{!}} on; default: <b>off</b></td>
        <td>Allow not verifying server authenticity.</td>
    </tr>
    <tr>
        <td><span style="color:blue">Certificate based:</span>Certificate files from device</td>
        <td>off {{!}} on; default: <b>off</b></td>
        <td>Choose this option if you want to select certificate files from device.</td>
    </tr>
    <tr>
        <td><span style="color:blue">Certificate based:</span>CA file</td>
        <td>.crt file; default: <b>none</b></td>
        <td>Upload CA file.</td>
    </tr>
    <tr>
        <td><span style="color:blue">Certificate based:</span>Certificate file</td>
        <td>.crt file; default: <b>none</b></td>
        <td>TLS client or server certificate file.</td>
    </tr>
    <tr>
        <td><span style="color:blue">Certificate based:</span>Key file</td>
        <td>.key file; default: <b>none</b></td>
        <td>TLS client or server key file.</td>
     </tr>
     </tr>
     <tr>
     <tr>
         <td>I/O</td>
         <td><span style="color:blue">Pre-Shared-Key based:</span>Pre-Shared-Key</td>
         <td>inputs/outputs; default: <b>Output(4)</b></td>
         <td>string; default: <b>none</b></td>
         <td>Specifies the I/O to which the condition is listening to.</td>
         <td>The pre-shared-key in hex format with no leading “0x”.</td>
     </tr>
     </tr>
     <tr>
     <tr>
         <td>State</td>
         <td><span style="color:blue">Pre-Shared-Key based:</span>Identity</td>
         <td>High {{!}} Low; default: <b>High</b> </td>
         <td>string; default: <b>none</b></td>
         <td>Specifies in what state the pin has to be.</td>
         <td>Specify the Identity.</td>
     </tr>
     </tr>
</table>
</table>


{{#ifeq: {{{dualsim}}} | 1 |
====Type: SIM switch====
----
Switches to using the specified SIM card.
[[File:Networking_rutos_manual_input_output_io_juggler_actions_change_sim_v3.png|border|class=tlt-border]]


{{#ifeq:{{{series}}}|RUTX||
=====Analog voltage=====
----
<table class="nd-mantable">
<table class="nd-mantable">
     <tr>
     <tr>
Line 854: Line 749:
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Condition type</td>
         <td>Name</td>
         <td>Analog voltage</td>
         <td>string; default: <b>none</b></td>
         <td>A type of condition.</td>
        <td>Name of action.</td>
    </tr>
    <tr>
        <td>Execution delay</td>
        <td>positive integer; default: <b>none</b></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>Condition</td>
         <td>Flip</td>
         <td>Inside voltage {{!}} Outside voltage; default: <b>Inside voltage</b> </td>
         <td>off {{!}} on; default: <b>off</b></td>
         <td>Whether to evaluate the condition as true inside or outside the specified range.</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>Input</td>
         <td>Enable primary option transfer</td>
         <td>inputs; default: <b>none</b></td>
         <td>off {{!}} on; default: <b>off</b></td>
         <td>Specifies the analog input to which the condition is listening to.</td>
         <td>Enables simd service to change primary card while switching sims </td>
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Min voltage</td>
         <td>Target</td>
         <td>positive float; default: <b>none</b></td>
         <td>SIM1 {{!}} SIM2; default: <b>SIM1</b></td>
         <td>Specifies minimum voltage of range.</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>
     <tr>
     <tr>
         <td>Max voltage</td>
         <td>Add conditions</td>
         <td>positive float; default: <b>none</b></td>
         <td>list; default: <b>none</b></td>
         <td>Specifies magimum voltage of range.</td>
         <td>Specifies global conditions for this pin. Actions will trigger only if the conditions are met. 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_v1.png|border|class=tlt-border]]


=====Minute=====
----
<table class="nd-mantable">
<table class="nd-mantable">
     <tr>
     <tr>
Line 891: Line 794:
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Condition type</td>
         <td>Name</td>
         <td>Minute</td>
         <td>string; default: <b>none</b></td>
         <td>A type of condition.</td>
         <td>Name of action.</td>
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Inverted function</td>
         <td>Text message</td>
         <td>off {{!}} on; default: <b>off</b> </td>
         <td>string; default: <b>none</b> </td>
         <td>Inverts the selected condition type. Makes the condition true if the time/date is outside the specified interval.</td>
         <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>
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Interval</td>
         <td>Execution delay</td>
         <td><span style="color:red;">off</span> | <span style="color:blue;">on</span>; default: <b>off</b></td>
         <td>positive integer; default: <b>none</b></td>
         <td>Switches between a specific value and a time interval.</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><span style="color:red;">Off:</span> Minute</td>
         <td>Recipients</td>
         <td>integer [0..59]; default: <b>none</b></td>
         <td>Single number {{!}} Group; default: <b>Single number</b></td>
         <td>Specifies minute at which the action can occur.</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>
     <tr>
     <tr>
         <td><span style="color:blue ;">On:</span> Start minute</td>
         <td>Recipient's phone number {{!}} Phone group</td>
         <td>integer [0..59]; default: <b>none</b></td>
         <td>phone number {{!}} phone group; default: <b>none</b></td>
         <td>Specifies starting minute of the interval at which the action can occur.</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>
     <tr>
     <tr>
         <td><span style="color:blue ;">On:</span> End minute</td>
         <td>Add conditions</td>
         <td>integer [0..59]; default: <b>none</b></td>
         <td>list; default: <b>none</b></td>
         <td>Specifies ending minute of the interval at which the action can occur.</td>
         <td>Specifies global conditions for this pin. Actions will trigger only if the conditions are met. Conditions are optional.</td>
     </tr>
     </tr>
</table>
</table>
|}}
{{#ifeq: {{{wifi}}} | 1 |
====Type: WiFi====
----
Sends an SMS message to specified recipients.


<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_wifi_v2.png|border|class=tlt-border]]


=====Hour=====
----
<table class="nd-mantable">
<table class="nd-mantable">
     <tr>
     <tr>
Line 933: Line 839:
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Condition type</td>
         <td>Name</td>
         <td>Hour</td>
         <td>string; default: <b>none</b></td>
         <td>A type of condition.</td>
         <td>Name of action.</td>
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Inverted function</td>
         <td>Execution delay</td>
         <td>off {{!}} on; default: <b>off</b> </td>
        <td>positive integer; default: <b>none</b></td>
         <td>Inverts the selected condition type. Makes the condition true if the time/date is outside the specified interval.</td>
        <td>A period of time (in seconds) which has to pass after a trigger event before the action is executed.</td>
    </tr>
    <tr>
        <td>Enable WiFi</td>
         <td>off {{!}} on; default: <b>off</b></td>
         <td>Specifies whether all WiFi interfaces will be enabled/disabled with this action.</td>
    </tr>
    <tr>
        <td>Add conditions</td>
        <td>list; default: <b>none</b></td>
        <td>Specifies global conditions for this pin. Actions will trigger only if the conditions are met. Conditions are optional.</td>
     </tr>
     </tr>
</table>
|}}
===Conditions===
----
The <b>Conditions</b> section is used to manage and created Conditions for I/O Juggler Actions. The figure below is an example of the Conditions section, which is empty by default.
[[File:Networking_rutos_manual_input_output_io_juggler_conditions_v1.png|border|class=tlt-border]]
To create a new Condition, look to the Add a Condition section; enter a custom name, select the Type of the Condition and click the 'Add' button.
After this you should be redirected to the configuration page of the newly added Condition. You will find descriptions of each different Condition type described on the sections below.
====Condition type: I/O====
----
I/O Condition type tracks the state of a selected input or output pin and considers the Condition as MET if that pin is in a user-specified state.
[[File:Networking_rutos_manual_input_output_io_juggler_conditions_io.png|border|class=tlt-border]]
<table class="nd-mantable">
     <tr>
     <tr>
         <td>Interval</td>
         <th>Field</th>
        <td><span style="color:red;">off</span> | <span style="color:blue;">on</span>; default: <b>off</b></td>
      <th>Value</th>
        <td>Switches between a specific value and a time interval.</td>
      <th>Description</th>
     </tr>
     </tr>
     <tr>
     <tr>
         <td><span style="color:red;">Off:</span> Hour</td>
         <td>Name</td>
         <td>integer [0..59]; default: <b>none</b></td>
         <td>string; default: <b>none</b></td>
         <td>Specifies hour at which the action can occur.</td>
         <td>Name of condition.</td>
     </tr>
     </tr>
     <tr>
     <tr>
         <td><span style="color:blue ;">On:</span> Start hour</td>
         <td>I/O</td>
         <td>integer [0..59]; default: <b>none</b></td>
         <td>inputs/outputs; default: <b>P. S. Different devices have different output settings.</b></td>
         <td>Specifies starting hour of the interval at which the action can occur.</td>
         <td>Specifies the I/O to which the condition is listening to..</td>
     </tr>
     </tr>
     <tr>
     <tr>
         <td><span style="color:blue ;">On:</span> End hour</td>
         <td>State</td>
         <td>integer [0..59]; default: <b>none</b></td>
         <td>High {{!}} Low; default: <b>High</b></td>
         <td>Specifies ending hour of the interval at which the action can occur.</td>
         <td>Specifies in what state the pin has to be in in order for the Condition to be met.</td>
     </tr>
     </tr>
</table>
</table>


<b>Note</b>: this table has coloring scheme to indicate which fields can be seen with different configuration.
{{#ifeq: {{{analog}}} | 1 |
====Condition type: ADC/ACL====
----
Analog voltage/current Condition type measures the value of the Analog input and checks whether it inside or outside the user-specified range.
 
[[File:Networking_rutos_manual_input_output_io_juggler_conditions_analog_voltage_v1.png|border|class=tlt-border]]


=====Weekday=====
----
<table class="nd-mantable">
<table class="nd-mantable">
     <tr>
     <tr>
Line 975: Line 914:
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Condition type</td>
         <td>Name</td>
         <td>Weekday</td>
         <td>string; default: <b>none</b></td>
         <td>A type of condition.</td>
         <td>Name of condition.</td>
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Inverted function</td>
         <td>Input</td>
         <td>off {{!}} on; default: <b>off</b> </td>
         <td><span style="color:blue">Analog Current Loop</span> {{!}} Analog Input; default: <b>Analog Current Loop</b></td>
         <td>Inverts the selected condition type. Makes the condition true if the time/date is outside the specified interval.</td>
         <td>Specifies the analog input to which the condition is listening to.</td>
    </tr>
    <tr>
        <td>Condition</td>
        <td>Inside range {{!}} Outside range; default: <b>Inside range</b> </td>
        <td>Whether to evaluate the condition as true inside or outside the specified range.</td>
     </tr>
     </tr>
     <tr>
     <tr>
        <td>Interval</td>
         <td><span style="color:blue">ACL Property</span></td>
         <td><span style="color:red;">off</span> | <span style="color:blue;">on</span>; default: <b>off</b></td>
        <td>Current {{!}} Percent; default: <b>Current</b> </td>
         <td>Switches between a specific value and a time interval.</td>
         <td>Select which property - ampere or percentage the condition listens to.</td>
     </tr>
     </tr>
     <tr>
     <tr>
         <td><span style="color:red;">Off:</span> Weekday</td>
         <td><span style="color:blue">Min current/percent</span></td>
         <td>weekday; default: <b>Monday</b></td>
         <td>positive float; default: <b>none</b></td>
         <td>Specifies weekday at which the action can occur.</td>
         <td>Specifies minimum current of the range. Values between 4-20mA / Specifies minimum percent of the range.</td>
     </tr>
     </tr>
     <tr>
     <tr>
         <td><span style="color:blue ;">On:</span> Start weekday</td>
         <td><span style="color:blue">Max current/percent</span></td>
         <td>weekday; default: <b>Monday</b></td>
         <td>positive float; default: <b>none</b></td>
         <td>Specifies starting weekday of the interval at which the action can occur.</td>
         <td>Specifies maximum current of the range. Values between 4-20mA. / Specifies maximum percent of the range.</td>
     </tr>
     </tr>
     <tr>
     <tr>
         <td><span style="color:blue ;">On:</span> End weekday</td>
         <td>Min voltage</td>
         <td>weekday; default: <b>Monday</b></td>
         <td>positive float; default: <b>none</b></td>
         <td>Specifies ending weekday of the interval at which the action can occur.</td>
         <td>Specifies minimum voltage of range.</td>
     </tr>
     </tr>
</table>
    <tr>
        <td>Max voltage</td>
        <td>positive float; default: <b>none</b></td>
        <td>Specifies magimum voltage of range.</td>
    </tr>
</table>|}}
 
====Condition type: Boolean group====
----
Boolean Group will evaluate two or more existing conditions based on selected Boolean type. A Boolean Group condition will considered as MET based on the outcome of the evaluation performed along with one of the available Boolean types:
 
<ul>
    <li><b>AND</b> - all selected conditions evaluate as TRUE.</li>
    <li><b>NAND</b> - at least one selected condition evaluates as FALSE.</li>
    <li><b>OR</b> - at least one selected condition evaluates as TRUE.</li>
    <li><b>NOR</b> - none of the selected conditions evaluate as TRUE.</li>
</ul>
 
For example, if we have two time Conditions (hour and minute) and a third Condition of Boolean group: AND, both Conditions 1 & 2 have to be met for Condition 3 to be evaluated as TRUE.
 
[[File:Networking_rutos_manual_input_output_io_juggler_boolean_group_scheme_true.png|border|class=tlt-border]]


<b>Note</b>: this table has coloring scheme to indicate which fields can be seen with different configuration.
In this case, if at least one condition is no longer met, the Boolean group: AND Condition is evaluated as FALSE.


=====Month day=====
[[File:Networking_rutos_manual_input_output_io_juggler_boolean_group_scheme_false.png|border|class=tlt-border]]
----
----
Below is an example of Condition type: Boolean group configuration.
[[File:Networking_rutos_manual_input_output_io_juggler_conditions_boolean_group_v1.png|border|class=tlt-border]]
<table class="nd-mantable">
<table class="nd-mantable">
     <tr>
     <tr>
Line 1,017: Line 985:
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Condition type</td>
         <td>Boolean type</td>
         <td>Month day</td>
         <td>AND | NAND | OR | NOR; default: <b>AND</b></td>
         <td>A type of condition.</td>
         <td>Type of boolean condition.</td>
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Month override</td>
         <td>Add conditions</td>
         <td>off {{!}} on; default: <b>off</b> </td>
         <td>conditions; default: <b>none</b> </td>
         <td>If the option is selected and the specified day is not in the month then the condition uses the last day of the month.</td>
         <td>Specifies global conditions for this pin. Actions will trigger only if the conditions are met. Conditions are optional.</td>
    </tr>
</table>
 
====Condition types: Date/Time====
----
Lastly, you can configure Conditions based on date and time. Date/time Conditions can be configured based on:
 
<ul>
    <li><b>Minute</b> of the hour</li>
    <li><b>Hour</b> of the day</li>
    <li><b>Day</b> of the <b>Week</b></li>
    <li><b>Day</b> of the <b>Month</b></li>
    <li><b>Day</b> of the <b>Year</b></li>
</ul>
 
[[File:Networking_rutos_manual_input_output_io_juggler_conditions_date_time_v1.png|border|class=tlt-border]]
 
Each type can be configured in two distinct ways:
 
<ol>
    <li><b>Specific time</b> - configured as a single value which defines the exact time when the Condition is considered as TRUE. e.g.:
        <ul>
            <li>Hour: <b>8</b></li>
            <li>Day of Month: <b>1</b></li>
        </ul>
    </li>
    <li><b>Time interval</b> - configured with a start and an end value which define a window of time during which the Condition is considered as TRUE. e.g.:
        <ul>
            <li>Hours: <b>8-12</b></li>
            <li>Days of Month: <b>1-12</b></li>
        </ul>
    </li>
</ol>
 
==Impulse Counter==
 
<b>Impulse Counter</b> service can register chages in the {{#ifeq: {{{configurableio}}} | 1 | `Configurable Input/Output` | `Input`}} state  of a Power socket when a value is transitioned from low to high, from high to low, or both.
 
===Configuration===
----
The <b>configuration</b> page is used to enable impulse counter and select GPIO pins for input configuration.
 
====Impulse counter configuration====
----
[[File:Networking_rutos_manual_input_output_impulse_counter_configuration.png|border|class=tlt-border]]
 
<table class="nd-mantable">
    <tr>
        <th>Field</th>
      <th>Value</th>
      <th>Description</th>
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Interval</td>
         <td>Status</td>
         <td><span style="color:red;">off</span> | <span style="color:blue;">on</span>; default: <b>off</b></td>
         <td></td>
         <td>Switches between a specific value and a time interval.</td>
         <td>Status of service, whether it is currently running.</td>
     </tr>
     </tr>
     <tr>
     <tr>
         <td><span style="color:red;">Off:</span> Day of the month</td>
         <td>Enabled</td>
         <td>integer [1..31]; default: <b>none</b></td>
         <td>off {{!}} on; default: <b>off</b></td>
         <td>Specifies day of the month at which the action can occur.</td>
         <td>Enable impulse counter.</td>
     </tr>
     </tr>
     <tr>
     <tr>
         <td><span style="color:blue ;">On:</span> Start day of the month</td>
         <td>Count store duration</td>
         <td>integer [1..31]; default: <b>none</b></td>
         <td>Hour {{!}} Day {{!}} Week {{!}} Month; default: <b>Day</b></td>
         <td>Specifies starting day of the interval of the month at which the action can occur.</td>
         <td>Define for how long the impulse counts are retained, in seconds, before being reset.</td>
     </tr>
     </tr>
     <tr>
     <tr>
         <td><span style="color:blue ;">On:</span> End day of the month</td>
         <td>Reset counts</td>
         <td>integer [1..31]; default: <b>none</b></td>
         <td>-(interactive buttom)</td>
         <td>Specifies ending day of the interval of the month at which the action can occur.</td>
         <td>Reset collected impulse counts.</td>
     </tr>
     </tr>
</table>
</table>


<b>Note</b>: this table has coloring scheme to indicate which fields can be seen with different configuration.
====Input configuration====
----
A Input configuration defines which {{#ifeq: {{{configurableio}}} | 1 | `Configurable Inputs/Outputs` | `Inputs`}} will be used for impulse counting. Input configuration list is empty by default. Click the 'Add' button in order to create a new Input instance:
 
[[File:Networking_rutos_manual_input_output_impulse_counter_input_configuration_add_v2.png|border|class=tlt-border]]
 
You will then be taken to the configuration page for the newly added input:
 
[[File:Networking_rutos_manual_input_output_impulse_counter_input_configuration.png|border|class=tlt-border]]


=====Year=====
----
<table class="nd-mantable">
<table class="nd-mantable">
     <tr>
     <tr>
Line 1,059: Line 1,084:
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Condition type</td>
         <td>Enable</td>
         <td>Year</td>
         <td>off {{!}} on; default: <b>on</b></td>
         <td>A type of condition.</td>
         <td>Enable input configuration.</td>
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Inverted function</td>
         <td>Name</td>
         <td>off {{!}} on; default: <b>off</b> </td>
         <td>string; default: <b>none</b></td>
         <td>Inverts the selected condition type. Makes the condition true if the time/date is outside the specified interval.</td>
         <td>Name of input configuration.</td>
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Interval</td>
         <td>GPIO pin</td>
         <td><span style="color:red;">off</span> | <span style="color:blue;">on</span>; default: <b>off</b></td>
         <td>{{#ifeq: {{{configurableio}}} | 1 | Configurable Input/Output (3) {{!}} Configurable Input/Output (4) | Input (3)}}{{#ifeq: {{{isolated}}} | 1 | {{!}} Isolated Input (2,7)|}} {{#ifeq: {{{digitalpassive}}} | 1 | {{!}} Digital Input (1)|}}; default: <b>{{#ifeq: {{{configurableio}}} | 1 | Configurable Input/Output (3) | Input (3)}}</b></td>
         <td>Switches between a specific value and a time interval.</td>
         <td>Select GPIO pin for input configuration.</td>
     </tr>
     </tr>
     <tr>
     <tr>
         <td><span style="color:red;">Off:</span> Day of the year</td>
         <td>Edge</td>
         <td>integer [1..366]; default: <b>none</b></td>
         <td>Rising {{!}} Falling {{!}} Both; default: <b>Rising</b></td>
         <td>Specifies day of the year at which the action can occur.</td>
         <td>Select the edge option to have the impulse counter increment on the signal`s transition from low to high, high to low, or both.</td>
     </tr>
     </tr>
     <tr>
     <tr>
         <td><span style="color:blue ;">On:</span> Start day of the year</td>
         <td>Debounce</td>
         <td>integer [1..366]; default: <b>none</b></td>
         <td>integer; default: <b>0</b></td>
         <td>Specifies starting day of the interval of the year at which the action can occur.</td>
         <td>Debounce filters out rapid, unintended signals. Set between 0-1000 ms to ensure only stable inputs are registered.</td>
    </tr>
    <tr>
        <td><span style="color:blue ;">On:</span> End day of the year</td>
        <td>integer [1..366]; default: <b>none</b></td>
        <td>Specifies ending day of the interval of the year at which the action can occur.</td>
     </tr>
     </tr>
</table>
</table>


<b>Note</b>: this table has coloring scheme to indicate which fields can be seen with different configuration.
===Statistics===
----
<b>Statistics</b> page displays PIN statistics in routers local time.
 
[[File:Networking_rutos_manual_input_output_impulse_counter_statistics.png|border|class=tlt-border]]


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

Latest revision as of 15:18, 21 November 2025

The information in this page is updated in accordance with firmware version .


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.

Physical characteristics and I/O pin mapping

Electrical characteristics and I/O pin mapping information are presented below.

Power Socket Pinout


[[File:Networking_rutos_manual_input_output_power_socket_pinout_configurableio_{{{configurableio}}}.png]]

  • Power: {{{input_volts}}} VDC positive (+).
  • Ground: negative/ground (-).
  • Input: digital non-isolated input.
    • logical low level: 0 - 6 VDC;
    • logical high level: 8 - <Power supply> VDC.
  • Output: digital open collector (OC) output; 30 VDC, 300 mA.


Status

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

[[File:Networking_{{{series}}}_manual_input_output_status_v3.png|border|class=tlt-border]]




Status from command line


You can also obtain the status of input and output pins via the command line (CLI or SSH). List of possible ubus values in {{{name}}} devices:

{{Template:Networking_{{{series}}}_manual_input_output_status|name={{{name}}}}}


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 or month and hours of the day. The General Configuration section is used to turn the Output Scheduler on or off.

Note: I/O Scheduler is additional software on some devices that can be installed from the System → [[{{{name}}} Package Manager|Package Manager]] page.

The Scheduler is configured in the form of Instances. A Scheduler Instance defines a time interval during which the state of an output associated with the instance will be set to "High". The Output Scheduler Instances list is empty by default. Click the 'Add' button in order to create a new Scheduler Instance:

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

Field Value Description
Enable off | on; default: off Turns the Scheduler Instance on or off.
Pin output pin; default: P. S. Different devices have different output settings. Output pin. The state of the selected output will be set to "High" during the time interval defined in the fields below.
Interval Type Weekdays | Month Days; default: Weekdays Selects the interval type for scheduler to use.
Start Day [Monday..Sunday] | [1..31]; default: Monday | 1 The day that marks the start of the time interval.
Start Time hh:mm ([00..23]:[00..59]); default: 12:00 The hour and minute that mark the start of the time interval.
End Day [Monday..Sunday] | [1..31]; default: Tuesday | 1 The day that marks the end of the time interval.
End Time hh:mm ([00..23]:[00..59]); default: 12:00 The hour and minute that mark the end of the time interval.
Force Last Day off | on; default: off Forces intervals to accept last day of month as a valid option if selected day does not exist during ongoing month. This field becomes visible only when 'Interval Type' is set to Month Days.

Note: A Scheduler Instance will not work unless you turn both the the Scheduler service and the individual instance 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:

Note: I/O Juggler is additional software on some devices that can be installed from the System → [[{{{name}}} Package Manager|Package Manager]] page.

[[File:Networking_rutos_manual_input_output_io_juggler_scheme_condition_mobile_{{{mobile}}}.png|border|class=tlt-border]]

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":

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:

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

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.

To create a new Action, click the 'Add' button.

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'):

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.

Field Value Description
Name string; default: none Name of action.
Subject string; default: none Subject of an 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.
Sender's 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).
Add conditions list; default: none Specifies global conditions for this pin. Actions will trigger only if the conditions are met. Conditions are optional.

Type: Output


Changes the state of a selected output pin.

Field Value Description
Name string; default: none Name of action.
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 pin; default: P. S. Different devices have different output settings. Specifies the output/relay of which the state will be changed.
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.
Add conditions list; default: none Specifies global conditions for this pin. Actions will trigger only if the conditions are met. Conditions are optional.

Type: HTTP


Executes a HTTP POST/GET request.

Field Value Description
Name string; default: none Name of action.
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.
Alt. parameters mode off | on; default: off Choose a different way to pass parameters. If method is POST parameters are passed in request body. If method is GET parameters are passed throught the URL.
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).
Text message default: Device name - %rn; Time stamp - %ts Message to send.
Custom headers string; default: none Allows to add custom headers to the HTTP requests.
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.
Add conditions list; default: none Specifies global conditions for this pin. Actions will trigger only if the conditions are met. Conditions are optional.

Type: Script


Executes a custom, user-written shell script.

Field Value Description
Name string; default: none Name of action.
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.
Add conditions list; default: none Specifies global conditions for this pin. Actions will trigger only if the conditions are met. Conditions are optional.

Type: Reboot


Reboots the device.

Field Value Description
Name string; default: none Name of action.
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.
Add conditions list; default: none Specifies global conditions for this pin. Actions will trigger only if the conditions are met. Conditions are optional.

Type: Profile


Switches to using a specified Configuration Profile.

Field Value Description
Name string; default: none Name of action.
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.
Add conditions list; default: none Specifies global conditions for this pin. Actions will trigger only if the conditions are met. Conditions are optional.

Type: RMS


Enables or disables RMS service.

Field Value Description
Name string; default: none Name of action.
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.
Enable RMS off | on; default: off Specifies whether RMS service will be enabled or disabled with this action.
Add conditions list; default: none Specifies global conditions for this pin. Actions will trigger only if the conditions are met. Conditions are optional.

Type: MQTT


Executes a MQTT action.

Field Value Description
Name string; default: none Name of action.
Text message string; default: none 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.
Topic string; default: none The name of the topic that the broker will subscribe to.
Client ID string; default: none Client ID to send with the data. If empty, a random client ID will be generated.
Hostname host | ip; default: none Broker’s IP address or hostname.
Port integer [0..65535]; default: 1883 Broker's port number.
Keepalive positive integer; default: none The number of seconds after which the broker should send a PING message to the client if no other messages have been exchanged in that time
Qos At most once (0) | At least once (1) | Exactly once (2); default: At most once (0) A period of time (in seconds) which has to pass after a trigger event before this Action is executed.
Username string; default: none Username used for authentication to the Broker.
Password string; default: none Password used for authentication to the Broker.
TLS off | on; default: off Select to enable TLS encryption.
TLS Type Certificate based | Pre-Shared-Key based; default: Certificate based Type of TLS encryption.
Certificate based:Allow insecure connection off | on; default: off Allow not verifying server authenticity.
Certificate based:Certificate files from device off | on; default: off Choose this option if you want to select certificate files from device.
Certificate based:CA file .crt file; default: none Upload CA file.
Certificate based:Certificate file .crt file; default: none TLS client or server certificate file.
Certificate based:Key file .key file; default: none TLS client or server key file.
Pre-Shared-Key based:Pre-Shared-Key string; default: none The pre-shared-key in hex format with no leading “0x”.
Pre-Shared-Key based:Identity string; default: none Specify the Identity.



Conditions


The Conditions section is used to manage and created Conditions for I/O Juggler Actions. The figure below is an example of the Conditions section, which is empty by default.

To create a new Condition, look to the Add a Condition section; enter a custom name, select the Type of the Condition and click the 'Add' button.

After this you should be redirected to the configuration page of the newly added Condition. You will find descriptions of each different Condition type described on the sections below.

Condition type: I/O


I/O Condition type tracks the state of a selected input or output pin and considers the Condition as MET if that pin is in a user-specified state.

Field Value Description
Name string; default: none Name of condition.
I/O inputs/outputs; default: P. S. Different devices have different output settings. 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 in in order for the Condition to be met.


Condition type: Boolean group


Boolean Group will evaluate two or more existing conditions based on selected Boolean type. A Boolean Group condition will considered as MET based on the outcome of the evaluation performed along with one of the available Boolean types:

  • AND - all selected conditions evaluate as TRUE.
  • NAND - at least one selected condition evaluates as FALSE.
  • OR - at least one selected condition evaluates as TRUE.
  • NOR - none of the selected conditions evaluate as TRUE.

For example, if we have two time Conditions (hour and minute) and a third Condition of Boolean group: AND, both Conditions 1 & 2 have to be met for Condition 3 to be evaluated as TRUE.

In this case, if at least one condition is no longer met, the Boolean group: AND Condition is evaluated as FALSE.


Below is an example of Condition type: Boolean group configuration.

Field Value Description
Boolean type AND | NAND | OR | NOR; default: AND Type of boolean condition.
Add conditions conditions; default: none Specifies global conditions for this pin. Actions will trigger only if the conditions are met. Conditions are optional.

Condition types: Date/Time


Lastly, you can configure Conditions based on date and time. Date/time Conditions can be configured based on:

  • Minute of the hour
  • Hour of the day
  • Day of the Week
  • Day of the Month
  • Day of the Year

Each type can be configured in two distinct ways:

  1. Specific time - configured as a single value which defines the exact time when the Condition is considered as TRUE. e.g.:
    • Hour: 8
    • Day of Month: 1
  2. Time interval - configured with a start and an end value which define a window of time during which the Condition is considered as TRUE. e.g.:
    • Hours: 8-12
    • Days of Month: 1-12

Impulse Counter

Impulse Counter service can register chages in the `Input` state of a Power socket when a value is transitioned from low to high, from high to low, or both.

Configuration


The configuration page is used to enable impulse counter and select GPIO pins for input configuration.

Impulse counter configuration


Field Value Description
Status Status of service, whether it is currently running.
Enabled off | on; default: off Enable impulse counter.
Count store duration Hour | Day | Week | Month; default: Day Define for how long the impulse counts are retained, in seconds, before being reset.
Reset counts -(interactive buttom) Reset collected impulse counts.

Input configuration


A Input configuration defines which `Inputs` will be used for impulse counting. Input configuration list is empty by default. Click the 'Add' button in order to create a new Input instance:

You will then be taken to the configuration page for the newly added input:

Field Value Description
Enable off | on; default: on Enable input configuration.
Name string; default: none Name of input configuration.
GPIO pin Input (3) ; default: Input (3) Select GPIO pin for input configuration.
Edge Rising | Falling | Both; default: Rising Select the edge option to have the impulse counter increment on the signal`s transition from low to high, high to low, or both.
Debounce integer; default: 0 Debounce filters out rapid, unintended signals. Set between 0-1000 ms to ensure only stable inputs are registered.

Statistics


Statistics page displays PIN statistics in routers local time.

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