CameraSound Schema

Nest Cam (legacy) Nest Hub Max Nest Doorbell (legacy) 

sdm.devices.traits.CameraSound

This trait belongs to any device that supports sound detection events.

Fields

There are no fields available for this trait.

Commands

There are no commands available for this trait.

Events

Sound

Sound has been detected by the camera.

Sound event

Payload

{
  "eventId" : "226244b4-a134-47e9-a616-5f5bab51a110",
"timestamp" : "2019-01-01T00:00:01Z",
"resourceUpdate" : { "name" : "enterprises/project-id/devices/device-id", "events" : { "sdm.devices.events.CameraSound.Sound" : { "eventSessionId" : "CjY5Y3VKaTZwR3o4Y19YbTVfMF...", "eventId" : "ghTrtk9t0TProA9d3y7WaiIi5Y..." } } } "userId" : "AVPHwEuBfnPOnTqzVFT4IONX2Qqhu9EJ4ubO-bNnQ-yi",
"resourceGroup" : [ "enterprises/project-id/devices/device-id" ] }

Sound event fields

Field Description Data Type
eventSessionId An ID given to events occurring as part of a single session of related events. May be used for consolidating events. string
Example: "CjY5Y3VKaTZwR3o4Y19YbTVfMF..."
eventId An ID associated with the event.

Use it with the GenerateImage command to download the camera image related to this event.

string
Example: "ghTrtk9t0TProA9d3y7WaiIi5Y..."

Event payload fields

Field Description Data Type
eventId The unique identifier for the event. string
Example: "226244b4-a134-47e9-a616-5f5bab51a110"
timestamp The time when the event occurred. string
Example: "2019-01-01T00:00:01Z"
resourceUpdate An object that details information about the resource update. object
userId A unique, obfuscated identifier that represents the user. string
Example: "AVPHwEuBfnPOnTqzVFT4IONX2Qqhu9EJ4ubO-bNnQ-yi"
resourceGroup An object that indicates resources that might have similar updates to this event. The resource of the event itself (from the resourceUpdate object) will always be present in this object. object

See Events for more information on the different types of events and how they work.

Errors

The following error code(s) may be returned in relation to this trait:

Error Message RPC Troubleshooting
Camera image is no longer available for download. DEADLINE_EXCEEDED Event images expire 30 seconds after the event is published. Make sure to download the image prior to expiration.
Event id does not belong to the camera. FAILED_PRECONDITION Use the correct eventID returned by the camera event.

See the API Error Code Reference for the full list of API error codes.