Inputs and Outputs are used for the monitoring and controlling of a connected device or receiving signals from that device in order to trigger certain events. This chapter is overview on the Input/Output section for RUT240 routers.
The information in this page is updated in accordance with the RUT2XX_R_00.01.12 firmware version.
This section provides a list Input/Output electric characteristics inherent in RUT240 routers:
The Status tab displays the current states the router’s input and output:
If the default Input/Output labels do not suit your needs, you can always configure custom ones in the Custom Labels section. Click the ‘Edit’ button next to the desired Input or Output and you will be redirected to a window such as this:
The figure above is an example of custom label configuration for Digital Input. You can change an input’s/output’s name and the names of their states. The changes are purely cosmetic and used for easier management purposes.
You can control and monitor input and output values via a command line interface (CLI) with the gpio.sh command. You can execute this command without any additional options to get usage syntax examples:
GPIO control aplication
Usage: /sbin/gpio.sh <ACTION> <NAME>
ACTION - set, clear, get, export, invert, dirout, dirin
NAME - SIM MON MRST SDCS CASE DIN1 DOUT1
For example, to get the status of the digital output use the following command:
root@Teltonika:~# gpio.sh get DOUT1
The return value 0 means that the output is in Inactive (Low level), i.e., OFF. You can turn it ON (Active (High level)) by setting its value to 1:
root@Teltonika:~# gpio.sh invert DOUT1
root@Teltonika:~# gpio.sh get DOUT1
As seen in the example above, you can change the value of an output by using the invert command, which simply turns the current value of the specified output and turns it into its opposite state.
The Input tab is used to configure the router’s input pin.
The Input Rules section provides you with the possibility to set up rules that execute user specified actions after a certain trigger occurs. To add a new rule, look to the Input Configuration section that is just below. Select the input, the trigger and the action for the rule and click the ‘Add’ button. A new rule will appear in the Input Rules list:
To begin editing an input rule, click the ‘Edit’ button located next to it. Refer to the figure and table below for information on input rule configuration.
The Output tab is used to configure the router’s output pin.
The Output Configuration section is used to change the default state of the router’s output pin.
* Changing the default state of an output means that the changes will be written into the input/output config and saved. This means that unless some other related change occurs the state of the output will remain as set in this section.
The ON/OFF section is used to turn the router’s output on or off. This action does not save the state permanently, meaning that after a reboot the state will revert back to their default values.
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:
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:
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.
The Periodic control section allows you to set up automatic output control rules that trigger output state changes at the specified period or interval. Refer to the figure and table below for information on configuration fields contained in that section.
With the help of the output Scheduler you can configure a timetable of when the output should be enabled or disabled based on time.
Your email address will not be published. Required fields are marked *
Save my name, email, and website in this browser for the next time I comment.