add examples for LwM2M execute with arguments#444
Open
nickAS21 wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds documentation examples for the ThingsBoard LwM2M Execute RPC that demonstrate how to pass OMA LwM2M execute argument lists (single/multiple args, values, and link values) to improve clarity for users integrating with execute-with-arguments support.
Changes:
- Added an “Execute with Arguments” subsection with multiple request/response examples.
- Included examples for single-argument, delayed/timer-like value, link value, and multi-argument-without-values formats.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| ### Execute with Arguments | ||
|
|
||
| Execute a resource with parameters: execute Reboot on the device if the digit value is 5. |
| 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. |
| 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'"} |
| - 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/'"} |
| - 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"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Added comprehensive and properly formatted examples for executing LwM2M resources with single and multiple arguments (including timers and link values). This improves readability and helps users better understand the OMA LwM2M execute arguments format.
thingsboard/thingsboard#14881
Type of change
src/content/docs/**)src/content/_includes/**)src/components/**,src/styles/**)src/pages/**,src/data/**)src/data/redirects.ts)releaseskill)Affected products
Related issues
Checklist
pnpm checkpasses (Astro / TypeScript)pnpm lint:eslintpassespnpm lint:slugcheckpasses (required if pages were added/renamed/moved across languages)pnpm lint:linkcheckpasses locally — required to merge; run it before requesting review (usepnpm lint:linkcheck:nobuildif you already ran a build)src/data/redirects.ts, andpnpm generate:redirectswas runsrc/data/versions.ts