I'm encountering an issue with Google Assistant when I request to "turn on all devices." Even when I send a "FAILED" status for some devices, Google Assistant responds with "Ok, turning on x things" without any indication of the failure. Here's the JSON response I'm sending for the action.devices.EXECUTE action:
{
"requestId": "617XXX27787XXX16813",
"payload": {
"devices": {
"1081614XXX": {
"on": false,
"online": true,
"status": "SUCCESS"
},
// ... (other device entries)
"4153991XXX": {
"on": false,
"online": true,
"status": "FAILED"
}
}
}
}
Here's an overview of how my system works:
I have several questions:
Does Google Assistant provide a negative response for devices with a "FAILED" status, such as "Unable to turn on/off device"? I'm not receiving such responses.
I tried actuating a single device with a default status of "PENDING" and "FAILED," but I still received the same response ("Ok, turning on the <name of the device>"). Why is this happening?
Is there anything I might be missing in the response I'm sending to Google Assistant?
I'm facing a challenge when I have more than 20 devices to process within the 5-second time limit. Currently, I'm sending "PENDING" for devices with successful actuation but which take time. Is there a better approach to handle this issue without sending "FAILED"?
I appreciate any insights or suggestions to improve this situation. Thank you!
The issue was with the status
key itself, it should have been ERROR
and not FAILED
.
Here's an example:
{
"requestId": "617XXX27787XXX16813",
"payload": {
"devices": {
"1081614XXX": {
"on": false,
"online": true,
"status": "SUCCESS"
},
// ... (other device entries)
"4153991XXX": {
"on": false,
"online": true,
"status": "ERROR",
"errorCode": "Timeout"
}
}
}
}