8298 questions

9759 answers

15542 comments

13863 members

0 votes
195 views 0 comments
by
Would like to use feature "CLI" resp. "User Scripts" but have no clue how to do. Is there something like an API describing possible commands? I want e.g. switch an output to "ON" state after finishing boot process.

Thanks in advance for any help.

BR

Günther

1 Answer

0 votes
by

Hello,

I'm having a hard time understanding on what you mean by:

Would like to use feature "CLI" resp. "User Scripts" but have no clue how to do

You could use JSON-RPC to get information or change configuration of the router, more info:

https://wiki.teltonika-networks.com/view/RUT955_Monitoring_via_JSON-RPC_windows#Using_JSON-RPC_.28Windows.29

You could also switch default value of the output so it boots in that state every time:

Services > Input / Output > Output Configuration > Change specific outputs default value to desired one

Also, you could use JSON-RPC calls for output manipulation:

Output ON:

{
    "jsonrpc": "2.0", "id": 1, "method": "call", "params":
    [
        "4c895f25ae6c572e20f121d4a5a66da7", "file", "exec",
        {
            "command": "gpio.sh",
            "params":
                [
                    "set",
                    "DOUT2"
                ]
        }
    ]
}

Output OFF:

{
    "jsonrpc": "2.0", "id": 1, "method": "call", "params":
    [
        "4c895f25ae6c572e20f121d4a5a66da7", "file", "exec",
        {
            "command": "gpio.sh",
            "params":
                [
                    "clear",
                    "DOUT2"
                ]
        }
    ]
}