Hello,
Not sure whether provided example is out of date or I am missing something.
Sync response:
{"status":200,"headers":{"content-type":"application/json;charset=utf-8"},"body":{"requestId":"3975532901942190831","payload":{"agentUserId":"5fb9fc3a45e1952e0919c043","devices":[{"id":"64971cac94b0e2a6240518ad","type":"action.devices.types.CAMERA","traits":["action.devices.traits.CameraStream"],"name":{"defaultNames":["front camera"],"name":"front camera","nicknames":["front camera"]},"willReportState":true,"roomHint":"Living Room","deviceInfo":{"manufacturer":"xxx","model":"Camera","hwVersion":"1.0","swVersion":"1.0"},"attributes":{"cameraStreamSupportedProtocols":["webrtc"],"cameraStreamNeedAuthToken":true,"cameraStreamNeedDrmEncryption":false,"cameraStreamSupportsPreview":true}}]}}}
GetCameraStream Response:
{"status":200,"headers":{"content-type":"application/json;charset=utf-8"},"body":{"requestId":"15140443867674926092","payload":{"commands":[{"ids":["64971cac94b0e2a6240518ad"],"status":"SUCCESS","states":{"cameraStreamSignalingUrl":"https://xxxx/signaling/answer","cameraStreamProtocol":"webrtc","cameraStreamIceServers":"","cameraStreamOffer":"","cameraStreamAuthToken":""}}]}}}
The camera says Offline and in the cloud logs, I am seeing this error. "EMPTY_SDP"
{
"insertId": "1986k64f262ndk",
"jsonPayload": {
"clientUpdateLog": {
"camerastreamProtocol": "webrtc",
"httpRequestId": "15140443867674926092",
"deviceType": "action.devices.types.CAMERA",
"camerastreamExecutionUpdate": {
"webrtcSignalingInitiationTime": "2023-07-01T04:51:15.638412952Z",
"status": "EMPTY_SDP",
"testPartnerFacingDebugString": "The operation couldn’t be completed. (ASTWebRTCConnectionDomain error -1015.)",
"streamTerminationTime": "2023-07-01T04:51:15.642353057Z"
}
}
},
....
"receiveTimestamp": "2023-07-01T04:51:15.903721178Z"
}
Looks like cameraStreamOffer: "" is the root cause which is here: https://github.com/google-home/smarthome-camerastream-webrtc/blob/main/camerastream-done/functions/index.js#L196
i tried creating a cameraStreamOffer: based on WebRTC Validator Tool and still does not work.
Please advise