我正在尝试使用Google Home Graph API更新设备的状态,但收到此回复,但我不明白为什么:
{
"error": {
"code": 404,
"message": "Requested entity was not found.",
"status": "NOT_FOUND"
}
}
这是我的SYNC
响应的第一部分:
{
"requestId": "reqId",
"payload": {
"agentUserId": "myAgentUserId",
"devices": [
{
"id": "myDeviceId",
...
}
这就是我要发送给
https://homegraph.googleapis.com/v1/devices:reportStateAndNotification
{
"agentUserId": "myAgentUserId",
"payload": {
"devices": {
"states": {
"myDeviceId": {
"on": true
...
}
如您所见,Home Graph请求中的myAgentUserId
和myDeviceId
与返回到SYNC
请求的请求相同。
我在做什么错了?