From 41bf2c86f2534a136507252d0c1c9d475e20c618 Mon Sep 17 00:00:00 2001 From: nickAS21 Date: Wed, 3 Jun 2026 17:13:53 +0300 Subject: [PATCH 1/3] lwm2m execute with arguments (example) --- .../docs/reference/lwm2m-api/rpc-commands.mdx | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/src/content/_includes/docs/reference/lwm2m-api/rpc-commands.mdx b/src/content/_includes/docs/reference/lwm2m-api/rpc-commands.mdx index 964ee78855..ea9b77093b 100644 --- a/src/content/_includes/docs/reference/lwm2m-api/rpc-commands.mdx +++ b/src/content/_includes/docs/reference/lwm2m-api/rpc-commands.mdx @@ -189,6 +189,55 @@ Common execute targets: | `/1/0/8` | Registration Update Trigger | | `/1/0/9` | Bootstrap-Request Trigger | +### Execute with Arguments + +Execute a resource with parameters: execute Reboot on the device if the digit value is 5. + +```json +{"method": "Execute", "params": {"id":"3/0/4","value":5}} +``` + +``` +Execute {"id":"3/0/4","value":5} +# Response: {"result":"CHANGED"} +``` + +Execute a resource with parameters: execute Factory Reset on the device if the digit value is 2 -> after 60 seconds. + +```json +{"method": "Execute", "params": {"id":"3/0/5","value":"2='60'"}} +``` + +``` +Execute {"id":"3/0/5","value":"2='60'"} +# Response: {"result":"CHANGED"} +``` + +Execute a resource with multiple parameters: execute Factory Reset on the device with two arguments: +- Digit 2 without a value. +- Digit 0 with a link value. + +```json +{"method": "Execute", "params": {"id":"3/0/5","value":"2,0='https://thingsboard.io/docs/reference/lwm2m-api/'"}} +``` + +``` +Execute {"id":"3/0/5","value":"2,0='https://thingsboard.io/docs/reference/lwm2m-api/'"} +# Response: {"result":"CHANGED"} +``` + +Execute a resource with multiple parameters: execute Factory Reset with multiple arguments without values. +- According to the OMA LwM2M execute arguments format, this represents ten arguments from 0 to 9, none of which have values. + +```json +{"method": "Execute", "params": {"id":"3/0/5","value":"0,1,2,3,4,5,6,7,8,9"}} +``` + +``` +Execute {"id":"3/0/5","value":"0,1,2,3,4,5,6,7,8,9"} +# Response: {"result":"CHANGED"} +``` + ## Delete Delete an Object Instance. The mandatory Device Object (ID 3) cannot be deleted. From 717068affd7c14c5993291fd6be94a8fe8b44c66 Mon Sep 17 00:00:00 2001 From: nickAS21 Date: Fri, 5 Jun 2026 22:05:55 +0300 Subject: [PATCH 2/3] lwm2m execute with arguments (example) - The CLI comments --- .../docs/reference/lwm2m-api/rpc-commands.mdx | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/content/_includes/docs/reference/lwm2m-api/rpc-commands.mdx b/src/content/_includes/docs/reference/lwm2m-api/rpc-commands.mdx index ea9b77093b..266ebf68ab 100644 --- a/src/content/_includes/docs/reference/lwm2m-api/rpc-commands.mdx +++ b/src/content/_includes/docs/reference/lwm2m-api/rpc-commands.mdx @@ -191,25 +191,25 @@ Common execute targets: ### Execute with Arguments -Execute a resource with parameters: execute Reboot on the device if the digit value is 5. +Execute a resource with arguments: execute Reboot on the device, passing a single-digit argument 5. ```json -{"method": "Execute", "params": {"id":"3/0/4","value":5}} +{"method": "Execute", "params": {"id": "/3/0/4", "value": 5}} ``` ``` -Execute {"id":"3/0/4","value":5} +Execute {"id": "/3/0/4", "value": 5} # Response: {"result":"CHANGED"} ``` -Execute a resource with parameters: execute Factory Reset on the device if the digit value is 2 -> after 60 seconds. +Execute a resource with arguments: execute Factory Reset on the device with argument `2` set to `60`. ```json -{"method": "Execute", "params": {"id":"3/0/5","value":"2='60'"}} +{"method": "Execute", "params": {"id": "/3/0/5", "value": "2='60'"}} ``` ``` -Execute {"id":"3/0/5","value":"2='60'"} +Execute {"id": "/3/0/5", "value": "2='60'"} # Response: {"result":"CHANGED"} ``` @@ -218,11 +218,11 @@ Execute a resource with multiple parameters: execute Factory Reset on the device - Digit 0 with a link value. ```json -{"method": "Execute", "params": {"id":"3/0/5","value":"2,0='https://thingsboard.io/docs/reference/lwm2m-api/'"}} +{"method": "Execute", "params": {"id": "/3/0/5", "value": "2,0='https://thingsboard.io/docs/reference/lwm2m-api/'"}} ``` ``` -Execute {"id":"3/0/5","value":"2,0='https://thingsboard.io/docs/reference/lwm2m-api/'"} +Execute {"id": "/3/0/5", "value": "2,0='https://thingsboard.io/docs/reference/lwm2m-api/'"} # Response: {"result":"CHANGED"} ``` @@ -230,11 +230,11 @@ Execute a resource with multiple parameters: execute Factory Reset with multiple - According to the OMA LwM2M execute arguments format, this represents ten arguments from 0 to 9, none of which have values. ```json -{"method": "Execute", "params": {"id":"3/0/5","value":"0,1,2,3,4,5,6,7,8,9"}} +{"method": "Execute", "params": {"id": "/3/0/5", "value": "0,1,2,3,4,5,6,7,8,9"}} ``` ``` -Execute {"id":"3/0/5","value":"0,1,2,3,4,5,6,7,8,9"} +Execute {"id": "/3/0/5", "value": "0,1,2,3,4,5,6,7,8,9"} # Response: {"result":"CHANGED"} ``` From 406d68aa5c88771755e450f2a40a7376467be7ba Mon Sep 17 00:00:00 2001 From: nickAS21 Date: Mon, 8 Jun 2026 14:55:42 +0300 Subject: [PATCH 3/3] lwm2m execute with arguments (example) - The CLI comments - 2 --- .../_includes/docs/reference/lwm2m-api/rpc-commands.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/content/_includes/docs/reference/lwm2m-api/rpc-commands.mdx b/src/content/_includes/docs/reference/lwm2m-api/rpc-commands.mdx index 266ebf68ab..0a4babe459 100644 --- a/src/content/_includes/docs/reference/lwm2m-api/rpc-commands.mdx +++ b/src/content/_includes/docs/reference/lwm2m-api/rpc-commands.mdx @@ -198,7 +198,7 @@ Execute a resource with arguments: execute Reboot on the device, passing a singl ``` ``` -Execute {"id": "/3/0/4", "value": 5} +Execute {"id":"/3/0/4","value":5} # Response: {"result":"CHANGED"} ``` @@ -209,7 +209,7 @@ Execute a resource with arguments: execute Factory Reset on the device with argu ``` ``` -Execute {"id": "/3/0/5", "value": "2='60'"} +Execute {"id":"/3/0/5","value":"2='60'"} # Response: {"result":"CHANGED"} ``` @@ -222,7 +222,7 @@ Execute a resource with multiple parameters: execute Factory Reset on the device ``` ``` -Execute {"id": "/3/0/5", "value": "2,0='https://thingsboard.io/docs/reference/lwm2m-api/'"} +Execute {"id":"/3/0/5","value":"2,0='https://thingsboard.io/docs/reference/lwm2m-api/'"} # Response: {"result":"CHANGED"} ``` @@ -234,7 +234,7 @@ Execute a resource with multiple parameters: execute Factory Reset with multiple ``` ``` -Execute {"id": "/3/0/5", "value": "0,1,2,3,4,5,6,7,8,9"} +Execute {"id":"/3/0/5","value":"0,1,2,3,4,5,6,7,8,9"} # Response: {"result":"CHANGED"} ```