Template:Networking rutx manual input output

From Teltonika Networks Wiki

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 {{{name}}} routers.

The information in this page is updated in accordance with the [[Media:{{{fw_version}}}_single.bin|{{{fw_version}}}]] firmware version.

Characteristics

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

[[File:{{{file_status_pinout}}}]]


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 input and the output:

[[File:{{{file_status}}}]]


If you click the the button that looks like a pencil 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:

[[File:{{{file_status_input}}}]]


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

[[File:{{{file_status_output}}}]]

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-{{{name}}}:~# 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-{{{name}}}:~# 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. However, by default the list is empty:

[[File:{{{file_input_rules}}}]]


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

[[File:{{{file_input_configuration}}}]]


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 triggers 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 → [[{{{name}}} Profiles|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 specified amount of time passes.

Output