Goal: get passed video clip from generated resource event (is this even possible?)
- Using event subscription
- Nest Outdoor Camera (Battery) plugged into power
- Subscribed to Google Cloud pub/sub topic and getting Resource events in realtime (https://developers.google.com/nest/device-access/api/events#relation-events) such as below:
- Am able to view live video using sdm.devices.commands.CameraLiveStream.GenerateWebRtcStream
event JSON:
{ "eventId" : "5f48043f-ffcd-4a5a-a0f3-cc0473770d6b", "timestamp" : "2019-01-01T00:00:01Z", "resourceUpdate" : { "name" : "enterprises/project-id/devices/device-id", "events" : { "sdm.devices.events.CameraMotion.Motion" : { "eventSessionId" : "CjY5Y3VKaTZwR3o4Y19YbTVfMF...", "eventId" : "dABYrGjJLQ8k0C2peoeKLeDk5_...", } } } "userId" : "AVPHwEuBfnPOnTqzVFT4IONX2Qqhu9EJ4ubO-bNnQ-yi", "eventThreadId" : "d67cd3f7-86a7-425e-8bb3-462f92ec9f59", "eventThreadState" : "STARTED", "resourceGroup" : [ "enterprises/project-id/devices/device-id" ] }
Also how do I move back in time with sdm.devices.commands.CameraLiveStream.GenerateWebRtcStream say 2 days ago?
Thanks for bringing this up. Unfortunately, accessing historical video streams using sdm.devices.commands.CameraLiveStream.GenerateWebRtcStream directly is not possible with the current capabilities.
However, for historical video access, you can consider using clips associated with events such as motion. The ClipPreview trait provides access to video clips with a frame rate of 10fps associated with events. You can find more information about ClipPreview here.
Please note that accessing clips is different from accessing live streams, and you would need to associate events with the specific time frame you're interested in.