roma__SendCommand
Send commands to devices via ROMA, choosing synchronous or asynchronous delivery and passing request parameters for device control.
Instructions
[ROMA] 发送命令
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": {
"command_id": "<command_id>",
"device_id": "<device_id>",
"instance_id": "<instance_id>",
"is_sync": "<is_sync>",
"project_id": "<project_id>",
"service_id": "<service_id>"
},
"name": "roma__SendCommand"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| is_sync | Yes | 命令是否同步 true-同步 false-异步 同步命令会将命令以MQTT消息发送给设备后等待设备的MQTT命令响应,收到响应后再回复响应(默认超时5秒),异步命令则以立即返回响应 | |
| requests | No | 请求参数列表 | |
| device_id | Yes | 设备ID | |
| command_id | Yes | 命令ID,自动向下取整 | |
| project_id | Yes | 项目ID,获取方式请参见《ROMA Connect API参考》的“附录 > 获取项目ID”章节。 | |
| service_id | Yes | 服务ID,自动向下取整 | |
| instance_id | Yes | 实例ID |