Changes

fixes
Line 1: Line 1:  
{{Template:Networking_rutos_manual_fw_disclosure
 
{{Template:Networking_rutos_manual_fw_disclosure
| fw_version = {{{series}}}_R_00.02.03
+
| fw_version = TRB1_R_00.02.03
| series = {{{series}}}
+
| series = TRB1
 
}}
 
}}
   Line 8: Line 8:  
==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. This chapter is an overview of the Input/Output section for TRB141 devices.
 
{{Template:Networking_rutos_manual_basic_advanced_webui_disclaimer}}
 
{{Template:Networking_rutos_manual_basic_advanced_webui_disclaimer}}
   −
{{#switch:{{{series}}}
+
{{#switch:TRB1
 
| RUTX =
 
| RUTX =
 
==Characteristics==
 
==Characteristics==
Line 31: Line 31:  
</ul>
 
</ul>
 
| TRB1 =
 
| TRB1 =
{{#ifeq:{{{name}}}|TRB141
+
{{#ifeq:TRB141|TRB141
 
|
 
|
 
==Characteristics==
 
==Characteristics==
Line 38: Line 38:     
===Power Socket Pins===
 
===Power Socket Pins===
----
+
----[[File:Networking_trb141_manual_I-O_power_v1.png|border|class=tlt-border|353x353px]]<br />
[[File:Networking_trb141_manual_I-O_power_v1.png|border|class=tlt-border|353x353px]]<br />
      
*'''Power''' pin: +9 ... +30 VDC positive power input.
 
*'''Power''' pin: +9 ... +30 VDC positive power input.
 
*'''Ground''' pin: negative/ground connection from power supply.
 
*'''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").
 
*'''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").
|
  −
This section provides a list Input/Output electric characteristics inherent in {{{name}}} devices:
     −
[[File:Networking_rutx_manual_input_output_status_pinout_v1.png]]
+
===Connector Pins===
 
----
 
----
The electric characteristics for the input and output pins are as follows:
+
[[File:Networking_trb141_manual_I-O_socket_v1.png|345x345px|border|class=tlt-border]]
   −
<ul>
+
*'''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".
    <li>Digital non-isolated input:
+
*'''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.
        <ul>
+
*'''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.
            <li>logic low: 0 - 5 V</li>
+
*'''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.
            <li>logic high: 8 - 40 V</li>
+
*'''l''' and '''⏚''' are isolated input contacts. 0-7.3 V is detected as logical "0", 7.3-71 V is detected as logical "1".
        </ul>
+
*'''+''' 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.
    </li>
+
*'''3.8''' is 3.8V power output which can be used to power 1-Wire sensors when needed.
    <li>Digital open collector output: 30 V, 300 mA</li>
+
*'''1W''' 1-Wire protocol input/output.
</ul>
+
*'''⏚''' is GND contact.
 
}}
 
}}
 
| TRB2 =
 
| TRB2 =
Line 68: Line 65:  
==Status==
 
==Status==
   −
{{#switch:{{{series}}}
+
{{#switch:TRB1
| RUTX =
+
| TRB2 =
The <b>Status</b> page displays the current states of the device input and output:
+
The <b>Status</b> page displays the current states of the device configurable inputs and outputs:
   −
[[File:Networking_rutx_manual_input_output_status_v2.png|border|class=tlt-border]]
+
[[File:Networking_trb2_manual_input_output_status_v1.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.
+
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 the input or output from the command line. List of ubus possible <b>values</b> in TRB141 devices:
   −
  ioman.gpio.din1
+
ioman.adc.adc0
  ioman.gpio.dout1
+
ioman.gpio.dio0
 +
  ioman.gpio.dio1
 +
  ioman.gpio.dio2
    
Call command <b>ubus call <u>value</u> status </b>:
 
Call command <b>ubus call <u>value</u> status </b>:
  root@Teltonika-{{{name}}}:~# ubus call ioman.gpio.dout1 status
+
  root@Teltonika-TRB141:~# ubus call ioman.gpio.dio0 status
 
  {
 
  {
 
         "value": "0",
 
         "value": "0",
         "direction": "in",
+
         "direction": "out",
         "bi_dir": false,
+
         "bi_dir": true,
 
         "invert_input": false
 
         "invert_input": false
 
  }
 
  }
    
<ul>
 
<ul>
     <li><b>din1</b> is the input:
+
     <li><b>dio0</b> is configurable input / output:
 
         <ul>
 
         <ul>
 
             <li>"value": "<b>0</b>" means low level state.</li>
 
             <li>"value": "<b>0</b>" means low level state.</li>
Line 99: Line 98:  
         </ul>
 
         </ul>
 
     </li>
 
     </li>
     <li><b>dout1</b> is the output:
+
     <li><b>adc0</b> is analog input:
 
         <ul>
 
         <ul>
             <li>"value": "<b>0</b>" means low level state.</li>
+
             <li>"value": "<b>0.54</b>" means 0.54V.</li>
            <li>"value": "<b>1</b>" means high level state.</li>
   
         </ul>
 
         </ul>
 
     </li>
 
     </li>
 
</ul>
 
</ul>
| TRB2 =
+
| TRB1 =  
 +
{{#ifeq:TRB141|TRB141
 +
|
 
The <b>Status</b> page displays the current states of the device configurable inputs and outputs:
 
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]]
+
[[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.
 
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.
Line 115: Line 115:  
===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 the input or output from the command line. List of ubus possible <b>values</b> in TRB141 devices:
    +
ioman.acl.acl0
 
  ioman.adc.adc0
 
  ioman.adc.adc0
 +
ioman.dwi.dwi0
 +
ioman.dwi.dwi1
 
  ioman.gpio.dio0
 
  ioman.gpio.dio0
 
  ioman.gpio.dio1
 
  ioman.gpio.dio1
  ioman.gpio.dio2
+
  ioman.gpio.iio
 +
ioman.gpio.onewire
 +
ioman.relay.relay0
 +
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.
 +
 
 +
ubus call ioman.gpio.dio0 update '{"value":"0"}'
 +
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 TRB141 devices:
 +
 
 +
ioman.gpio.din1
 +
ioman.gpio.dout1
    
Call command <b>ubus call <u>value</u> status </b>:
 
Call command <b>ubus call <u>value</u> status </b>:
  root@Teltonika-{{{name}}}:~# ubus call ioman.gpio.dio0 status
+
  root@Teltonika-TRB141:~# ubus call ioman.gpio.dout1 status
 
  {
 
  {
 
         "value": "0",
 
         "value": "0",
         "direction": "out",
+
         "direction": "in",
         "bi_dir": true,
+
         "bi_dir": false,
 
         "invert_input": false
 
         "invert_input": false
 
  }
 
  }
    
<ul>
 
<ul>
     <li><b>dio0</b> is configurable input / output:
+
     <li><b>din1</b> is the input:
 
         <ul>
 
         <ul>
 
             <li>"value": "<b>0</b>" means low level state.</li>
 
             <li>"value": "<b>0</b>" means low level state.</li>
Line 138: Line 213:  
         </ul>
 
         </ul>
 
     </li>
 
     </li>
     <li><b>adc0</b> is analog input:
+
     <li><b>dout1</b> is the output:
 
         <ul>
 
         <ul>
             <li>"value": "<b>0.54</b>" means 0.54V.</li>
+
             <li>"value": "<b>0</b>" means low level state.</li>
 +
            <li>"value": "<b>1</b>" means high level state.</li>
 
         </ul>
 
         </ul>
 
     </li>
 
     </li>
 
</ul>
 
</ul>
| TRB1 =
+
}}
The <b>Status</b> page displays the current states of the device configurable inputs and outputs:
+
| <!--    for rutx      -->
 +
The <b>Status</b> page displays the current states of the device input and output:
   −
[[File:Networking_trb1_manual_input_output_status_v1.png|border|class=tlt-border]]
+
[[File:Networking_rutx_manual_input_output_status_v2.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.
+
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===
 
===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 the input or output from the command line. List of ubus possible <b>values</b> in TRB141 devices:
   −
ioman.acl.acl0
+
  ioman.gpio.din1
ioman.adc.adc0
+
  ioman.gpio.dout1
ioman.dwi.dwi0
  −
ioman.dwi.dwi1
  −
ioman.gpio.dio0
  −
  ioman.gpio.dio1
  −
  ioman.gpio.iio
  −
ioman.gpio.onewire
  −
ioman.relay.relay0
  −
ioman.relay.relay1
      
Call command <b>ubus call <u>value</u> status </b>:
 
Call command <b>ubus call <u>value</u> status </b>:
  root@Teltonika-{{{name}}}:~# ubus call ioman.gpio.dio0 status
+
  root@Teltonika-TRB141:~# ubus call ioman.gpio.dout1 status
 
  {
 
  {
 
         "value": "0",
 
         "value": "0",
         "direction": "out",
+
         "direction": "in",
         "bi_dir": true,
+
         "bi_dir": false,
 
         "invert_input": 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>
 +
}}
      Line 278: Line 361:  
The figure below is an example of Conditions section.
 
The figure below is an example of Conditions section.
   −
{{#switch:{{{series}}}
+
{{#switch:TRB1
 
| TRB1 = [[File:Networking_trb1_manual_input_output_iojuggler_general_v1.png]]
 
| TRB1 = [[File:Networking_trb1_manual_input_output_iojuggler_general_v1.png]]
 
| TRB2 = [[File:Networking_trb2_manual_input_output_iojuggler_general_v1.png]]
 
| TRB2 = [[File:Networking_trb2_manual_input_output_iojuggler_general_v1.png]]
Line 560: Line 643:  
         <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 and their value from device for usage in Post or Get requests.  
{{#switch:{{{name}}}
+
{{#switch:TRB141
 
| 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>
 
| 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>
 
| 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>
 
| 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>
Line 646: Line 729:     
{{#ifeq:{{{mobile}}}|0||
 
{{#ifeq:{{{mobile}}}|0||
     {{#ifeq:{{{series}}}|TRB1||
+
     {{#ifeq:TRB1|TRB1||
 
=====Change sim=====
 
=====Change sim=====
 
----
 
----
Line 753: Line 836:       −
{{#ifeq:{{{series}}}|RUTX||
+
{{#ifeq:TRB1|RUTX||
 
=====Analog voltage=====
 
=====Analog voltage=====
 
----
 
----
Line 995: Line 1,078:  
</table>
 
</table>
   −
[[Category:{{{name}}} Services section]]
+
[[Category:TRB141 Services section]]
0

edits

Navigation menu