[英]Google Smart Home: Fullfill action.devices.commands.GetCameraStream asynchronously
I am implementing google smart home actions for my device.我正在为我的设备实施谷歌智能家居操作。 The device is a camera with the action.devices.traits.CameraStream
.该设备是一个带有action.devices.traits.CameraStream
的相机。 I want to know what is the best way to respond to the action.devices.commands.GetCameraStream
command asynchronously.我想知道异步响应action.devices.commands.GetCameraStream
命令的最佳方式是什么。
Currently, once my server receives this command, it needs to notify the device and wait for the device to start streaming.目前,一旦我的服务器收到此命令,它需要通知设备并等待设备开始流式传输。 Then the server can respond to google with the cameraStreamAccessUrl
.然后服务器可以使用cameraStreamAccessUrl
响应 google。 This is not ideal because the server is being blocked and exactly how it knows the device has started streaming is a bit tricky.这并不理想,因为服务器被阻止并且它如何知道设备已经开始流式传输有点棘手。 I am wondering if there is a better way to achieve this, for example, the server can respond immediately with some sort of deferred response and have the device tell google what the cameraStreamAccessUrl
is.我想知道是否有更好的方法来实现这一点,例如,服务器可以立即响应某种延迟响应,并让设备告诉谷歌cameraStreamAccessUrl
是什么。
Is this possible?这可能吗? Thanks for your help!谢谢你的帮助!
It sounds like you're trying to find something like follow-up responses to asynchronously notify the stream has started.听起来您正在尝试寻找类似后续响应的信息,以异步通知 stream 已启动。 Unfortunately, CameraStream
does not currently support follow-up responses, but you could file a feature request on the public tracker .不幸的是, CameraStream
目前不支持后续响应,但您可以在public tracker上提交功能请求。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.