profile_set_codec
Replace a device profile's payload codec by selecting runtime and providing a JavaScript script. Use NONE to disable codec processing, or JS with decodeUplink and encodeDownlink functions.
Instructions
Replace only the payload codec of a profile. For runtime JS, script is required and must define decodeUplink(input) and may define encodeDownlink(input); use runtime NONE to turn the codec off. Iterate here while watching uplinks with capture_read.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"profile_id": "<profile_id>",
"runtime": "<runtime>"
},
"name": "profile_set_codec"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | No | ||
| runtime | Yes | ||
| profile_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||