Template:Networking rutx manual input output: Difference between revisions

From Teltonika Networks Wiki
No edit summary
No edit summary
Line 34: Line 34:


[[File:{{{file_status_output}}}]]
[[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 <b>ubus call ioman get</b> command:
root@Teltonika-{{{name}}}:~# ubus call ioman get '{"pin":"pin<b>2</b>"}'
{
        "ioctl_inverted": 0,
        "response": <b>0</b>
}
<ul>
    <li><b>pin1</b> is the input:
        <ul>
            <li>"response": <b>0</b> means open state.</li>
            <li>"response": <b>1</b> means shorted state.</li>
        </ul>
    </li>
    <li><b>pin2</b> is the output:
        <ul>
            <li>"response": <b>0</b> means closed state.</li>
            <li>"response": <b>1</b> means open state.</li>
        </ul>
    </li>
</ul>
----
You can change the state of the output by using the <b>ubus call ioman change</b> command:
root@Teltonika-{{{name}}}:~# ubus call ioman change '{"pin":"pin2","value":<b>1</b>}'
{
        "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==
==Input==
[[File:{{{file_input_rules}}}]]


==Output==
==Output==

Revision as of 07:40, 14 June 2019

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

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

Output