I'd like to be able to use the stream from my nest cam (battery) in a home automation project, storing video streams and/or snapshops from the stream. I have successfully connected my devices using homeassistant to prove it is possible, and have leaned heavily on the code from python-google-nest-sdm.
I am attempting to stream live video from the nest cam (battery) device using sdm.devices.commands.CameraLiveStream.GenerateWebRtcStream. I have successfully connected to my devices, sent an sdpOffer and received a response from the sdm. I am struggling to build a working stream from the answer.
{ "results": { "answerSdp": "v=0\r\no=- ...\na=sctpmap:5000 webrtc-datachannel 1024\r\n", "expiresAt": "2021-12-21T21:45:27.779Z", "mediaSessionId": "C..F" } }
I have followed code from various other projects and tried using aiortc from python eg. aoirtc, and javascript examples from eg WebRTC
The closest I have got is following the code from googlelabs inserting the answerSdp into the remotePeer, but I am getting an error and I am sure I am not establishing the local and remote peers correctly.
Any help would be appreciated!
Thanks