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
391 views 0 comments
by anonymous
Hello, the following commands from CLI works without problems and disables/enables RMS monitoring as expected

root@Teltonika-RUT950:~# uci set rms_connect_mqtt.rms_connect_mqtt.enable='0'                                                                
root@Teltonika-RUT950:~# reload_config                                                                                                        

root@Teltonika-RUT950:~# uci set rms_connect_mqtt.rms_connect_mqtt.enable='1'                                                                
root@Teltonika-RUT950:~# reload_config                                                                                                        

However, I need to do the same via JSON-RPC from a computer connected to the LAN on the router

I have tried the below in the next posting but no success. Do know if I have missed some details in the syntax?

Best Regards, Walter

EDIT: When I tried the commands above from the CLI, I logged in as root, when I tried JSON-RPC as below , I logged in as admin to get the session key. Could it be that it is some access rights missing to make the JSON-RPC call?

1 Answer

0 votes
by anonymous

{

    "jsonrpc":"2.0", "id":1, "method":"call", "params": 

    [

        "rpc_session_id", "uci", "set",

        {

            "config":"rms_connect_mqtt", "type":"rms_connect_mqtt", "match":

            {

                "enable":"1"

            },

            "values":

            {

                "enable":"0"

            }

        }

    ]

}

And the to reload configuration

{

    "jsonrpc": "2.0", "id": 1, "method": "call", "params": 

    [

        "rpc_session_id", "file", "exec",

        {

            "command":"reload_config"

        }

    ]

}