A trait in the SDM API comprises fields, commands, and events.
Fields
Fields are values with common data types, such as a number or a string. For example, a field
might contain a the current mode or the ambient humidity of a Google Nest Thermostat.
Traits and fields can be viewed with a GET call to the desired API endpoint:
The sdm.devices.types.device-type returned by the SDM API should not be used
to deduce or infer functionality of the actual device it is assigned to. There is no guarantee
that a device type will remain stable for a specific device as more features are added to the SDM
API. Instead, use the returned traits for the device.
parentRelations
The parentRelations object represents the parent resource of the current resource,
either a structure or room. Display name corresponds to the customName field of the
Info trait
for devices with a structure parent or the
RoomInfo trait for devices with a
room parent.
Commands
Commands are requests associated with a trait. For example, changing the current mode or
temperature setpoint on a Google Nest Thermostat.
Most responses to a command are a simple success or failure. See the individual trait guides for
specific command usage examples.
Events
Events are asynchronous and managed by Google Cloud Pub/Sub in a single topic per
Project ID.
Events are sent by default for any change in the value of a trait field. They can also be sent in
response to specific device actions or changes in resource assignments. See
Events
for more information.
[null,null,["Last updated 2024-11-26 UTC."],[[["The Smart Device Management API allows you to interact with Nest devices through traits, commands, and events."],["Traits represent device capabilities and their associated data, such as temperature or humidity, and are categorized by device type like Thermostat or Camera."],["Commands are used to control devices, for instance, changing the thermostat mode, while events provide asynchronous notifications about device state changes."],["You can access device information and traits through a GET request to the specified API endpoint using the device ID."],["Google Cloud Pub/Sub manages events and delivers them to a dedicated topic for each project ID, allowing you to stay updated on device activity."]]],[]]