Added support for Ajax doorbell camera#104
Open
scilicet64 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In #103 I reported I was not able to log the camera because OOM. I did not intend to integrate AJAX in it and fix #103, but this PR is tested in the past week running on my Homey Pro.
The events from the camera where too much for the accumulating buffer in the logger, so this was changed to a ringbuffer that would just have the latest log, like a tail, that fits in the Homey memory.
An issue with the events was that after a reset of homey, the camera was still sending events after the subscription request, and it seemed that doing a new subscription was causing to double up on the events and so on.
Im not sure if you want to store the analytics of the camera like pet,car,human detection with the bounding boxes, but this might be interesting when an snapshot will be available from the camera. The doorbell itself does not support snapshot urls, so that would require a possible fallback to grab an image from the stream if that would be possible. I did not test the capabilities of snapshots of the NVR yet, but I will do that after this PR. The past week I had a very stable experience with com.onvif and the ajax doorbell camera, including visitor detection integration (linked to button press of the doorbell) and the human detection.