Device model
The device model is defined by the fields in this section.
Device model fields can only contain letters, numbers, and the following symbols: period (.), hyphen (-), underscore (_), space ( ) and plus (+). The first character of a field must be a letter or number.
{ "project_id": "my-devices-project", "device_model_id": "my-devices-project-prototype-light-v1", "manifest": { "manufacturer": "Assistant SDK developer", "product_name": "Assistant SDK light", "device_description": "Assistant SDK light device" }, "device_type": "action.devices.types.LIGHT", "traits": ["action.devices.traits.OnOff"] }
{ "project_id": string, "device_model_id": string, "manifest": { "manufacturer": string, "product_name": string, "device_description": string }, "device_type": string, "traits": [ string ] }
project_id
: (String) Required. Google Cloud Platform project ID of the Actions Console project to associate with this device model. A project can contain multiple device models.device_model_id
: (String) Required. Globally-unique identifier for this device model; use theproject_id
as a prefix to help avoid collisions over the range of all projects. Used in metrics and during device registration.manifest
: (object(Manifest)) Required. Metadata that describes the device model and manufacturer. This may be shown in the (upcoming) SDK console, metrics dashboards, and other related visual interfaces.manifest.manufacturer
: (String) Required. Name of the device manufacturer.manifest.product_name
: (String) Required. Consumer-facing product name for this device model.manifest.device_description
: (String) Optional. Description of this device model.
device_type
: (String) Required. The type of device hardware. Select from the following:action.devices.types.CAMERA
action.devices.types.DISHWASHER
action.devices.types.DRYER
action.devices.types.LIGHT
action.devices.types.OUTLET
action.devices.types.PHONE
action.devices.types.REFRIGERATOR
action.devices.types.SCENE
action.devices.types.SOUNDBAR
action.devices.types.SPEAKER
action.devices.types.SWITCH
action.devices.types.THERMOSTAT
action.devices.types.TV
action.devices.types.VACUUM
action.devices.types.WASHER
traits
: (Array<String>) Optional. List of traits the device supports. Traits include the commands, attributes, and states for the device. You do not need to define an Action package to use built-in traits.
Device instance
The device instance is defined by the fields in this section.
Device instance fields must start with a letter or number. The device ID can only contain letters, numbers, and the following symbols: period (.), hyphen (-), underscore (_), and plus (+). The device nickname can only contain numbers, letters, and the space ( ) symbol.
{ "id": "my_led_1", "model_id": "my-devices-project-prototype-light-v1", "nickname": "My Assistant Light", "client_type": "SDK_LIBRARY" }
{ "id": string, "model_id": string, "nickname": string, "client_type": string }
id
: (String) Required. Identifier for the test device. Must be unique within all of the devices registered under the same Google Developer project.model_id
: (String) Required. Identifier of the device model; must be the same as thedevice_model_id
associated with this test device. The device model must have been registered previously.nickname
: (String) Optional. Nickname for the device. This name will be used to refer to the device in visual interfaces like the Assistant settings.client_type
: (String) Required. The type of client device. Must be either of the following:SDK_SERVICE
orSDK_LIBRARY
.