首页 / 文档中心 / 宠物喂食器(ODM 案例) / 下发喂食计划(ToDeviceFeedPlan)
下发喂食计划(ToDeviceFeedPlan)
简要描述
- 逻辑接口名。服务端实际请求路径为 /xsw/api/sys/commandReceive,且 command 固定为 feed_plan。
- xstrive 接收 /tmp/xstrive_in_pip, 返回结果写入 /tmp/xstrive_out_pip
请求URL
http://192.168.0.15/xsw/api/sys/commandReceive
请求方式
- post
请求BODY参数示例
{
"command": "feed_plan",
"data": [
{
"id": 0,
"deviceId": "string",
"time": "string",
"amount": 0,
"days": "string",
"enabled": true,
"createdAt": "2026-05-09 11:12:11",
"updatedAt": "2026-05-09 11:12:11"
}
]
}
json字段说明
| 字段名 | 必选 | 类型 | 说明 |
|---|---|---|---|
| command | 是 | string | 命令字符串:feed_plan |
| data | 是 | array | |
| id | 否 | integer | 计划ID |
| deviceId | 是 | string | 设备序列号 |
| time | 是 | string | 喂食时间,HH:mm |
| amount | 是 | integer | 喂食数量 |
| days | 是 | string | 星期列表,示例 1,2,3,4,5,6,7 |
| enabled | 是 | boolean | 是否开启 |
| createdAt | 否 | string | |
| updatedAt | 否 | string |
成功返回示例
{
"code": 0,
"msg": "ok"
}
成功返回示例的参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| code | integer | 错误码 0成功,其它失败 |
| msg | string | 错误信息 |
这份文档没解决你的问题?联系我们,技术工程师直接对接。