Hi,
I've been using the API to try to integrate the camera with our companies software and I've found a few possible bugs to report that are hopefully fixable.
1. My biggest issue is when saving the file to the SD card. I'm hitting the "startFilesave" endpoint, and then trying to use the "playbackLength" and "playbackPosition" parameters to track progress.
a. First I need to get "playbackLength" in order to setup progress monitoring (progress will be currentPlaybackPosition / playbackLength). This value is not correct. When I try to save the file from the buffer into the SD card, "playbackLength" is stale, and appears to be the value from the previous video I saved. If I try to save the video again, it appears to be correct.
b. For the "playbackPosition", I tried hooking into to the Server Sent Events to monitor this, but it doesn't seem to throw notifications when this value changes. I at least do get an event when the state changes away from "filesave", so I know when the save process has finished. But according to the docs, it seems like I should be getting these events when anything changes.
c. So, because that didn't work for me, I resorted to manually polling "playbackPosition" in order to try to track progress. During the filesave operation, the playback position starts at a seemingly random value (I've seen it at 100, up around 1200, etc), jumps back to 0, then goes all the way to the end like it should, but then goes back to a different random value before I receive the SSE that the camera state has switched off of "filesave". I'm not sure what's happening here, but all these pieces together make it impossible to consistently and correctly track the progress of the save operation.
These bugs seem to be present on the web interface as well. I've noticed the stale "playbackLength" bug for sure, and the weird thing where "playbackPosition" jumps to some random value at the end of the filesave operation.
2. I can't connect to the rtsp stream. I'm using VLC to try to connect to it and it's just not working.
3. More minor, but some of the endpoints don't like if I specify an encoding in Content-Type in the headers. I'm using .NET HttpClient and the default Content-Type for json is "application/json; charset=utf-8". This seems to work for some endpoints but not others, so I'm just clearing out that "charset" piece and everything works. Still this seems buggy.