Changes

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==

Navigation menu