简体   繁体   中英

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 . I want to know what is the best way to respond to the action.devices.commands.GetCameraStream command asynchronously.

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 . 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.

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. Unfortunately, CameraStream does not currently support follow-up responses, but you could file a feature request on the public tracker .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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