FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
318 views 0 comments
by anonymous
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 anonymous

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"
                ]
        }
    ]
}