RUTX11 Input/Output

From Wiki Knowledge Base | Teltonika Networks
Main Page > RUTX Routers > RUTX11 > RUTX11 Manual > RUTX11 WebUI > RUTX11 Services section > RUTX11 Input/Output

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 is an overview of the Input/Output section for RUTX11 routers.

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

Characteristics

The router's input/output pins can be found inside the power socket:

Networking rutx manual input output status pinout v1.png


The electric characteristics for the input and output pins are as follows:

  • Digital non-isolated input:
    • logic low: 0 - 5 V
    • logic high: 8 - 40 V
  • Digital open collector output: 30 V, 300 mA

Status

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

Networking rutx manual input output status v1.png


If you click the the button that looks like a pencil Networking rutx trb14x manual edit button v1.png next to an input/output entry, you will be able to create a custom label for the pin.

You can change how the names of the pin and its states are displayed for the device's input:

Networking rutx manual input output status input v1.png


You can change how the names of the pin and its states are displayed for the device's output. You can also change which state is considered to be active (high level/low level):

Networking rutx manual input output status output v1.png

Status from command line


You can also obtain the status of the input or output from the command line using the ubus call ioman get command:

root@Teltonika-RUTX11:~# ubus call ioman get '{"pin":"pin2"}'
{
        "ioctl_inverted": 0,
        "response": 0
}
  • pin1 is the input:
    • "response": 0 means open state.
    • "response": 1 means shorted state.
  • pin2 is the output:
    • "response": 0 means closed state.
    • "response": 1 means open state.

You can change the state of the output by using the ubus call ioman change command:

root@Teltonika-RUTX11:~# ubus call ioman change '{"pin":"pin2","value":1}'
{
        "ioctl_inverted": 0,
        "response": 1
}

Set the number following after "value": to indicate the new state of the output (possible values are 0 and 1).

Input

The Input section displays existing input rules. By default, the input rules list is empty:

Networking rutx manual input output input input rules v1.png


To add a new input rule, click the "Add" button. After this you will be redirected to the rule's configuration page:

Networking rutx09 rutx11 manual input output input input configuration v1.png


Field Value Description
Enable off | on; default: off Turns the rule on or off.
Input pin Digital input (pin1); default: Digital input (pin1) Selects to which input pin the rule will apply.
Trigger Input open | Input shorted | Both; default: Input open Selects which input state will trigger the rule.
Action Send SMS | Change profile | Reboot | Activate output; default: Send SMS The action that will be taken when the rule is triggered.
  • Send SMS - sends an SMS message with user specified text to the specified recipient(s).
  • Change profile - switches to another configuration profile. At least one configuration profile has to be created before this can be used. You can create configuration profiles from the System → Profiles page.
  • Reboot - reboots the device when a specified amount of time passes after the trigger.
  • Activate output - activates the output. This can be done in three ways:
    • Seconds - activates the output for a specified amount of time.
    • While exists - activates the output while the specified trigger still exists.
    • Delayed action - activates the output when a specified amount of time passes after the trigger; deactivates the output when the trigger stops and a specified amount of time passes.

Output

On/Off


The On/Off section is used to turn the output on or off, but it doesn't save the state permanently, meaning that after a reboot the state will revert back to its default value.

Networking rutx manual input output output on off v1.png

Post/Get configuration


Enabling Post/Get will allow you to send HTTP POST/GET requests to the router that control the state of the output. The figure below is an example of the Post/Get configuration section an the table below provides information on the fields contained in that section:

Networking rutx manual input output output post get v1.png

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

Post/Get examples


It is possible to turn the output on and off by using a valid HTTP POST/GET syntax. Use a web browser or any other compatible software to submit HTTP POST/GET strings to the device.

Below is a table containing syntax examples of this usage:

Action POST/GET URL
Turn output on http://192.168.1.1/cgi-bin/output?username=user1&password=user1&action=on&pin=pin2
Turn output off http://192.168.1.1/cgi-bin/output?username=user1&password=user1&action=off&pin=pin2
Turn output on after a 10 second delay http://192.168.1.1/cgi-bin/output?username=user1&password=user1&action=on&pin=pin2&delay=10
Turn output on for 5 seconds http://192.168.1.1/cgi-bin/output?username=user1&password=user1&action=on&pin=pin2&time=5
Turn output on for 5 seconds after a 10 second delay http://192.168.1.1/cgi-bin/output?username=user1&password=user1&action=on&pin=pin2&delay=10&time=5

Overview:

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

Delay and time parameters can be used together. For example, if delay is 10, time is 5, action is on, then 10 seconds after the execution of the command, the output will switch to on (or stay in on state if it was already that way), then after 5 more seconds it will switch to off state. In this case the overall command execution time is 15 seconds.

Periodic control


The Periodic control section allows you to set up automatic output control rules that trigger output state changes at the specified period or interval. By default, the control rules list is empty:

Networking rutx manual input output output periodic control v1.png


To add a new control rule, click the "Add" button. After this you will be redirected to the rule's configuration page:

Networking rutx manual input output output periodic control configuration v1.png

Field Value Description
Enable off | on; default: off Turns the rule on or off.
Output Digital output (pin2); default: Digital output (pin2) The output pin that will be be effected by the rule.
Action on | off; default: on The action that will be performed on the output.
Action timeout off | on; default: off Action timeout specifies whether an action should end after some time. For example, if action is set to on and timeout is set to 10, when the trigger occurs the output will turn on for 10 seconds before turning off.
Mode Fixed | Interval; default: Fixed When the rule will be triggered.
  • Fixed - triggers the specified action on the specified day(s), hour and minute. For example, every Sunday at 8:30 AM.
  • Interval - performs the action at an interval. For example, every 1 hour during Mondays.

Scheduler


With the help of the output Scheduler you can configure a timetable of when the output should be enabled or disabled based on date and time.

Networking rutx manual input output output scheduler v1.png