Index
HomeGraphApiService
(interface)AgentDeviceId
(message)AgentOtherDeviceId
(message)DeleteAgentUserRequest
(message)Device
(message)DeviceInfo
(message)DeviceNames
(message)QueryRequest
(message)QueryRequestInput
(message)QueryRequestPayload
(message)QueryResponse
(message)QueryResponsePayload
(message)ReportStateAndNotificationDevice
(message)ReportStateAndNotificationRequest
(message)ReportStateAndNotificationResponse
(message)RequestSyncDevicesRequest
(message)RequestSyncDevicesResponse
(message)StateAndNotificationPayload
(message)SyncRequest
(message)SyncResponse
(message)SyncResponsePayload
(message)
HomeGraphApiService
Google Home Graph API service. The Home Graph service provides support for accessing first-party and third-party devices stored in Google's Home Graph. The Home Graph database provides contextual data about the relationships between devices and the home.
For more details, see the Home Graph developer guide.
DeleteAgentUser |
---|
Unlinks the given third-party user from your smart home Action. All data related to this user will be deleted. For more details on how users link their accounts, see fulfillment and authentication. The third-party user's identity is passed in via the
|
Query |
---|
Gets the current states in Home Graph for the given set of the third-party user's devices. The third-party user's identity is passed in via the
|
ReportStateAndNotification |
---|
Reports device state and optionally sends device notifications. Called by your smart home Action when the state of a third-party device changes or you need to send a notification about the device. See Implement Report State for more information. This method updates the device state according to its declared traits. Publishing a new state value outside of these traits will result in an The third-party user's identity is passed in via the
|
RequestSyncDevices |
---|
Requests Google to send an The third-party user's identity is passed via the
|
Sync |
---|
Gets all the devices associated with the given third-party user. The third-party user's identity is passed in via the
|
AgentDeviceId
Third-party device ID for one device.
Fields | |
---|---|
id |
Third-party device ID. |
AgentOtherDeviceId
Alternate third-party device ID.
Fields | |
---|---|
agent_id |
Project ID for your smart home Action. |
device_id |
Unique third-party device ID. |
DeleteAgentUserRequest
Request type for the DeleteAgentUser
call.
Fields | |
---|---|
request_id |
Request ID used for debugging. |
agent_user_id |
Required. Third-party user ID. |
Device
Third-party device definition. Next ID = 14
Fields | |
---|---|
id |
Third-party device ID. |
type |
Hardware type of the device. See device types. |
traits[] |
Traits supported by the device. See device traits. |
name |
Names given to this device by your smart home Action. |
will_report_state |
Indicates whether your smart home Action will report state of this device to Google via |
room_hint |
Suggested name for the room where this device is installed. Google attempts to use this value during user setup. |
structure_hint |
Suggested name for the structure where this device is installed. Google attempts to use this value during user setup. |
device_info |
Device manufacturer, model, hardware version, and software version. |
attributes |
Attributes for the traits supported by the device. |
custom_data |
Custom device attributes stored in Home Graph and provided to your smart home Action in each QUERY and EXECUTE intent. Data in this object has a few constraints: No sensitive information, including but not limited to Personally Identifiable Information. |
other_device_ids[] |
Alternate IDs associated with this device. This is used to identify cloud synced devices enabled for local fulfillment. |
notification_supported_by_agent |
Indicates whether your smart home Action will report notifications to Google for this device via If your smart home Action enables users to control device notifications, you should update this field and call |
DeviceInfo
Device information.
Fields | |
---|---|
manufacturer |
Device manufacturer. |
model |
Device model. |
hw_version |
Device hardware version. |
sw_version |
Device software version. |
DeviceNames
Identifiers used to describe the device.
Fields | |
---|---|
name |
Primary name of the device, generally provided by the user. |
nicknames[] |
Additional names provided by the user for the device. |
default_names[] |
List of names provided by the manufacturer rather than the user, such as serial numbers, SKUs, etc. |
QueryRequest
Request type for the Query
call.
Fields | |
---|---|
request_id |
Request ID used for debugging. |
agent_user_id |
Required. Third-party user ID. |
inputs[] |
Required. Inputs containing third-party device IDs for which to get the device states. |
QueryRequestInput
Device ID inputs to QueryRequest
.
Fields | |
---|---|
payload |
Payload containing third-party device IDs. |
QueryRequestPayload
Payload containing device IDs.
Fields | |
---|---|
devices[] |
Third-party device IDs for which to get the device states. |
QueryResponse
Response type for the Query
call. This should follow the same format as the Google smart home action.devices.QUERY
response.
Example:
{
"requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
"payload": {
"devices": {
"123": {
"on": true,
"online": true
},
"456": {
"on": true,
"online": true,
"brightness": 80,
"color": {
"name": "cerulean",
"spectrumRGB": 31655
}
}
}
}
}
Fields | |
---|---|
request_id |
Request ID used for debugging. Copied from the request. |
payload |
Device states for the devices given in the request. |
QueryResponsePayload
Payload containing device states information.
Fields | |
---|---|
devices |
States of the devices. Map of third-party device ID to struct of device states. |
ReportStateAndNotificationDevice
The states and notifications specific to a device.
Fields | |
---|---|
states |
States of devices to update. See the Device STATES section of the individual trait reference guides. |
notifications |
Notifications metadata for devices. See the Device NOTIFICATIONS section of the individual trait reference guides. |
ReportStateAndNotificationRequest
Request type for the ReportStateAndNotification
call. It may include states, notifications, or both. States and notifications are defined per device_id
(for example, "123" and "456" in the following example).
Example:
{
"requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
"agentUserId": "1234",
"payload": {
"devices": {
"states": {
"123": {
"on": true
},
"456": {
"on": true,
"brightness": 10
}
},
}
}
}
Fields | |
---|---|
request_id |
Request ID used for debugging. |
event_id |
Unique identifier per event (for example, a doorbell press). |
agent_user_id |
Required. Third-party user ID. |
follow_up_token |
Deprecated. |
payload |
Required. State of devices to update and notification metadata for devices. |
ReportStateAndNotificationResponse
Response type for the ReportStateAndNotification
call.
Fields | |
---|---|
request_id |
Request ID copied from |
RequestSyncDevicesRequest
Request type for the RequestSyncDevices
call.
Fields | |
---|---|
agent_user_id |
Required. Third-party user ID. |
async |
Optional. If set, the request will be added to a queue and a response will be returned immediately. This enables concurrent requests for the given |
RequestSyncDevicesResponse
Response type for the RequestSyncDevices
call.
Intentionally empty upon success. An HTTP response code is returned with more details upon failure.
StateAndNotificationPayload
Payload containing the state and notification information for devices.
Fields | |
---|---|
devices |
The devices for updating state and sending notifications. |
SyncRequest
Request type for the Sync
call.
Fields | |
---|---|
request_id |
Request ID used for debugging. |
agent_user_id |
Required. Third-party user ID. |
SyncResponse
Response type for the Sync
call. This should follow the same format as the Google smart home action.devices.SYNC
response.
Example:
{
"requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
"payload": {
"agentUserId": "1836.15267389",
"devices": [{
"id": "123",
"type": "action.devices.types.OUTLET",
"traits": [
"action.devices.traits.OnOff"
],
"name": {
"defaultNames": ["My Outlet 1234"],
"name": "Night light",
"nicknames": ["wall plug"]
},
"willReportState": false,
"deviceInfo": {
"manufacturer": "lights-out-inc",
"model": "hs1234",
"hwVersion": "3.2",
"swVersion": "11.4"
},
"customData": {
"fooValue": 74,
"barValue": true,
"bazValue": "foo"
}
}]
}
}
Fields | |
---|---|
request_id |
Request ID used for debugging. Copied from the request. |
payload |
Devices associated with the third-party user. |
SyncResponsePayload
Payload containing device information.
Fields | |
---|---|
agent_user_id |
Third-party user ID |
devices[] |
Devices associated with the third-party user. |