2
votes

I implement google smart home actions for plug device, I can control on/off plug with no problems, but about implement response offline status for Execute and Query, it seems google assistant never get status, it always said "OK, turn on/off plug", My response JSON log from cloud function log as below:

Execute:

   {
    "requestId": "847886417406301663",
    "payload": {
      "commands": {
        "ids": [
          "T90197200015"
        ],
        "status": "ERROR",
        "errorCode": "deviceOffline",
        "online": false
      }
    }
  }

Query:

   {
    "requestId": "11887439270473779795",
    "payload": {
      "devices": {
        "T90197200015": {
          "errorCode": "deviceOffline",
          "status": "ERROR",
          "online": false
        }
      }
    }
  }

Is the format correct, why google assistant didn't get offline status?

BR, Jack

1

1 Answers

0
votes

Yes that format is correct. The device generally may be offline, sending the status: "ERROR" and errorCode are more contextually applied to the specific request and response.