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!