12-13-2022 01:10 PM
I am trying to use the Nest APIs to connect. I have gotten all the auth token stuff working. I have created an offer and gotten an answer but the data does not flow. I realized I was not asking for the H264 codec in my offer so I just changed that. Now every time this is the response I get from the API:
```
Answered! Go to the Recommended Answer.
12-14-2022 11:39 AM
In case anyone comes upon this I have resolved this issue:
In pion it was solved by calling m.RegisterDefaultCodecs() instead of sending a few codecs in as the save-to-disk sample does.
In general it appears that the google API will fail with multiple strange errors if it doesn't like the codec (409, 500). More frustrating is that if it will sometimes appear to succeed with some codecs but then just silent fail and not send data. Sending the full barrage of codecs solved that for now.
12-14-2022 11:39 AM
In case anyone comes upon this I have resolved this issue:
In pion it was solved by calling m.RegisterDefaultCodecs() instead of sending a few codecs in as the save-to-disk sample does.
In general it appears that the google API will fail with multiple strange errors if it doesn't like the codec (409, 500). More frustrating is that if it will sometimes appear to succeed with some codecs but then just silent fail and not send data. Sending the full barrage of codecs solved that for now.
12-19-2022 09:04 AM
We are glad that you were able to resolve the issue. We do have a document in regard to camerastream trait. Also, we do have a list of what audio and video codecs we support and many more information that can be found in this document.
12-21-2022 11:18 AM
Thank you for replying. I don't understand how to fit the camerastream trait page you linked into the framework. Is this a command that can be sent with the devices/{DEVICE_ID}:executeCommand API call?
Also why does the API respond with an apparent "accept" SDP string but then fail to send data if the codec mix is not its liking? It seems like the GenerateWebRtcStream is the place to show logical failure to accept?
03-03-2023 05:18 AM
There are two set of APIs for Home Controls within Google. Smart Home API for Cameras allows you to connect 3p cameras to Google Home ecosystem and provide controls through Google Home App and Google Assistant. Device Access APIs for Cameras allows you to control 1p Google Nest Cameras through external systems.
Both APIs support WebRTC and SDP exchange is documented. I think you are working with the Device Access APIs, but above answer was with Smart Home APIs. Sorry for the confusion.