To wydarzenie obsługuje powiadomienia, które można aktualizować. Istniejące powiadomienia z aplikacji utworzone na podstawie tego zdarzenia można aktualizować za pomocą treści kolejnego zdarzenia z tym samym eventThreadId.
Obiekt wskazujący zasoby, które mogą mieć podobne aktualizacje do tego zdarzenia. Zasób samego zdarzenia (z obiektu resourceUpdate) będzie zawsze obecny w tym obiekcie.
object
Więcej informacji o różnych typach zdarzeń i sposobach ich działania znajdziesz w sekcji Zdarzenia.
Błędy
W związku z tym atrybutem mogą być zwracane te kody błędów:
Komunikat o błędzie
RPC
Rozwiązywanie problemów
Obraz z kamery nie jest już dostępny do pobrania.
DEADLINE_EXCEEDED
Obrazy wydarzeń wygasają 30 sekund po opublikowaniu wydarzenia. Pamiętaj, aby pobrać obraz przed wygaśnięciem.
Identyfikator zdarzenia nie należy do kamery.
FAILED_PRECONDITION
Użyj prawidłowego parametru eventID zwróconego przez zdarzenie kamery.
[null,null,["Ostatnia aktualizacja: 2025-09-02 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eCameraMotion\u003c/code\u003e trait applies to Nest devices that detect motion and triggers a \u003ccode\u003eMotion\u003c/code\u003e event when motion is detected.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMotion\u003c/code\u003e event provides an \u003ccode\u003eeventSessionId\u003c/code\u003e for correlating related events and an \u003ccode\u003eeventId\u003c/code\u003e for fetching an image associated with the event.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eMotion\u003c/code\u003e events are updateable, meaning initial notifications can be updated with subsequent event information within the same \u003ccode\u003eeventThreadId\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use the \u003ccode\u003eGenerateImage\u003c/code\u003e command with the \u003ccode\u003eeventId\u003c/code\u003e to download a snapshot from the camera related to the motion event.\u003c/p\u003e\n"],["\u003cp\u003eEvent images expire after 30 seconds, and using incorrect event IDs can lead to errors.\u003c/p\u003e\n"]]],[],null,["\u003cbr /\u003e\n\nCameraMotion Schema\n\n[Nest Cam (legacy)](/nest/device-access/api/camera) [Nest Cam (outdoor or indoor, battery)](/nest/device-access/api/camera-battery) [Nest Cam with floodlight](/nest/device-access/api/camera-floodlight) [Nest Cam (indoor, wired)](/nest/device-access/api/camera-wired) [Nest Hub Max](/nest/device-access/api/display) [Nest Doorbell (legacy)](/nest/device-access/api/doorbell) [Nest Doorbell (battery)](/nest/device-access/api/doorbell-battery) [Nest Doorbell (wired)](/nest/device-access/api/doorbell-wired)\n\n`sdm.devices.traits.CameraMotion`\n\nThis trait belongs to any device that supports motion detection events.\n\n\u003cbr /\u003e\n\nFields\n\n\nThere are no fields available for this trait.\n\n\u003cbr /\u003e\n\nCommands\n\nThere are no commands available for this trait.\n\nEvents\n\n\u003cbr /\u003e\n\nMotion [Updateable](/nest/device-access/api/events#updateable_notifications)\n\nMotion has been detected by the camera.\n\nThis event supports updateable notifications. Existing app notifications created from this event can be updated using the content of an subsequent event with the same `eventThreadId`.\n\nMotion event \n\nPayload \n\n {\n \"eventId\" : \"6fe31a62-3241-4b55-98c6-efa44dff66fc\",\n \"timestamp\" : \"2019-01-01T00:00:01Z\",\n \"resourceUpdate\" : {\n \"name\" : \"enterprises/project-id/devices/device-id\",\n \"events\" : {\n \"sdm.devices.events.CameraMotion.Motion\" : {\n \"eventSessionId\" : \"CjY5Y3VKaTZwR3o4Y19YbTVfMF...\",\n \"eventId\" : \"8KkxviLtLw6mTZrfR1o2idlXsd...\",\n }\n }\n }\n \"userId\" : \"AVPHwEuBfnPOnTqzVFT4IONX2Qqhu9EJ4ubO-bNnQ-yi\",\n \"eventThreadId\" : \"d67cd3f7-86a7-425e-8bb3-462f92ec9f59\",\n \"eventThreadState\" : \"STARTED\",\n \"resourceGroup\" : [\n \"enterprises/project-id/devices/device-id\"\n ]\n }\n\nMotion event fields\n\n| Field | Description | Data Type |\n|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------|\n| `eventSessionId` | [Nest Doorbell (battery)](/nest/device-access/api/doorbell-battery) [Nest Doorbell (wired)](/nest/device-access/api/doorbell-wired) An ID given to events occurring as part of a single session of related events. May be used for consolidating events. Use it to associate this event with the related [ClipPreview](/nest/device-access/traits/device/camera-clip-preview#clippreview) event of the CameraClipPreview trait. | `string` Example: \"CjY5Y3VKaTZwR3o4Y19YbTVfMF...\" |\n| `eventId` | [Nest Cam (legacy)](/nest/device-access/api/camera) [Nest Hub Max](/nest/device-access/api/display) [Nest Doorbell (legacy)](/nest/device-access/api/doorbell) An ID associated with the event. Use it with the [GenerateImage command](/nest/device-access/traits/device/camera-event-image#generateimage) to download the camera image related to this event. | `string` Example: \"8KkxviLtLw6mTZrfR1o2idlXsd...\" |\n\nEvent payload fields\n\n| Field | Description | Data Type |\n|--------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------|\n| `eventId` | The unique identifier for the event. | `string` Example: \"6fe31a62-3241-4b55-98c6-efa44dff66fc\" |\n| `timestamp` | The time when the event occurred. | `string` Example: \"2019-01-01T00:00:01Z\" |\n| `resourceUpdate` | An object that details information about the resource update. | `object` |\n| `userId` | A unique, obfuscated identifier that represents the user. | `string` Example: \"AVPHwEuBfnPOnTqzVFT4IONX2Qqhu9EJ4ubO-bNnQ-yi\" |\n| `eventThreadId` | [Updateable](/nest/device-access/api/events#updateable_notifications) The unique identifier for the event thread. | `string` Example: \"d67cd3f7-86a7-425e-8bb3-462f92ec9f59\" |\n| `eventThreadState` | [Updateable](/nest/device-access/api/events#updateable_notifications) The state of the event thread. | `string` Values: \"STARTED\", \"UPDATED\", \"ENDED\" |\n| `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` |\n\nSee [Events](/nest/device-access/api/events) for more information on the different\ntypes of events and how they work.\n\n\u003cbr /\u003e\n\n\nErrors\n\nThe following error code(s) may be returned in relation to this trait:\n\n| Error Message | RPC | Troubleshooting |\n|---------------------------------------------------|-----------------------|-------------------------------------------------------------------------------------------------------------------|\n| 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. |\n| Event id does not belong to the camera. | `FAILED_PRECONDITION` | Use the correct `eventID` returned by the camera event. |\n\nSee the [API Error Code Reference](/nest/device-access/reference/errors/api) for\nthe full list of API error codes.\n\n\u003cbr /\u003e"]]