简体   繁体   English

触发 Google Nest 相机拍照

[英]Trigger Google Nest Camera to Take Image

I know this is a relatively simple question, but it is unclear to me if it is possible to schedule the google nest camera to take an image every 15 minutes and have it upload to the cloud.我知道这是一个相对简单的问题,但我不清楚是否可以安排谷歌巢相机每 15 分钟拍摄一次图像并将其上传到云端。

I have looked at the SDM (Smart Device Management) API and found the following POST request:我查看了 SDM(智能设备管理)API 并发现了以下 POST 请求:

sdm.devices.traits.CameraEventImage

POST /enterprises/project-id/devices/device-id:executeCommand
{
  "command" : "sdm.devices.commands.CameraEventImage.GenerateImage",
  "params" : {
    "eventId" : "26TU35cUFaYxYbQFumKQIilunU..."
  }
}

I am wondering if anyone has any experience with this.我想知道是否有人对此有任何经验。 Is making this API call sufficient to trigger the camera to take an image, or does this need to programmed directly onto the camera.是否使此 API 调用足以触发相机拍摄图像,或者是否需要直接在相机上进行编程。

I haven't found a way to generate an image directly through that command.我还没有找到直接通过该命令生成图像的方法。 However, I was able to execute GenerateRtspStream which gives you an rtsps link that is valid for 5 minutes and then create an image from that livestream link through ffmpeg<\/a> with the commands shown in this stack overflow answer<\/a>但是,我能够执行 GenerateRtspStream ,它会为您提供一个有效期为 5 分钟的 rtsps 链接,然后使用此堆栈溢出答案中<\/a>显示的命令通过ffmpeg<\/a>从该直播链接创建图像

{
  "command" : "sdm.devices.commands.CameraLiveStream.GenerateRtspStream",
  "params" : {
  }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM