We want to hear your thoughts on the Google Smart Home platform. Join a user study and receive a gift for your input. Click here to sign up.

Encapsulates all intent request and response objects.

Index

Type aliases

ExecuteErrors

ExecuteErrors: string

For a list of the supported EXECUTE error codes, see Errors and exceptions

ExecuteRequest

ExecuteRequest: CloudRequest<ExecuteRequestPayload>

Request passed to the application's EXECUTE intent handler, containing a list of commands and target device IDs to be updated.

See ExecuteHandler for more details.

ExecuteResponse

ExecuteResponse: CloudResponse<ExecutePayload>

Container for the status of the commands that the local app received in an EXECUTE intent.

Use Response.Builder to create an ExecuteResponse instance and set the corresponding status for each target device ID present in the ExecuteRequest.

const response = new Execute.Response.Builder()
    .setRequestId(request.requestId);

const result = localHomeApp.getDeviceManager()
  .send(deviceCommand)
  .then((result) => {
    // Handle command success
    response.setSuccessState(device.id, state);
  })
  .catch((err: IntentFlow.HandlerError) => {
    // Handle command error
    response.setErrorState(device.id, err.errorCode);
  });

return result.then(() => response.build());

See ExecuteHandler for more details.

ExecuteStatus

ExecuteStatus: "SUCCESS" | "PENDING" | "OFFLINE" | "ERROR" | "EXCEPTIONS"

Response status codes for EXECUTE intent requests.

IdentifyRequest

IdentifyRequest: RequestInterface<LocalIdentifiedDevice>

Request passed to the application's IDENTIFY intent handler, containing a LocalIdentifiedDevice detected by the local scan configuration.

See IdentifyHandler for more details.

IdentifyResponse

IdentifyResponse: ResponseInterface<IdentifyResponsePayload>

Response returned by the application's IDENTIFY intent handler to describe the locally discovered device.

See IdentifyHandler for more details.

ReachableDevicesRequest

ReachableDevicesRequest: RequestInterface<LocalIdentifiedDevice>

Request passed to the application's REACHABLE_DEVICES intent handler, containing a LocalIdentifiedDevice successfully identified as a proxy or hub.

See ReachableDevicesHandler for more details.

ReachableDevicesResponse

ReachableDevicesResponse: ResponseInterface<ReachableDevicesPayload>

Response returned by the application's REACHABLE_DEVICES intent handler to describe additional devices visible to the proxy device.

See ReachableDevicesHandler for more details.