Replies: 1 comment
-
I have asked REOLink about the DUO snapshot issue, and their response was that if there are parameters passed in the URL for the Snap command, it will ignore the JSON, so right now the only reliable means to capture a snapshot is via a GET request, they gave no word as to when/if this will be fixed. My progress on my code work has slowed due to time limitations, and I am currently experimenting with providing ONVIF, and a variant of kmhallens SMTP, support as addons. This separates the "Service" side from the integration side and would allow HA core restarts to not eat up the limited logins on the cameras. This especially affects the ONVIF, as it seems to hold on to old webhook addresses and does not always accept a new one when it is registered, causing, what appears to me, the multitude of motion unavailable issues. The other big advantage of the addon approach is that is reduces the footprint and requirements of the integration. |
Beta Was this translation helpful? Give feedback.
-
I recenlty purchased a duo and I did not like the method of adding it to the integration (it is a multi channel device) so I started down the road of updating it. In the process I also found the most recent published CGI docs from Reolink, and this led me down the "from scratch" rabbit hole. It has taken a few weekends but I now have a basic (and I do mean basic) integration running, that supports snapshots, the live streams, and ONVIF motion notices with ai. I dont want to step on your guys toes, nor do anything to lower your effort and work you put into this, but I would like to share the ideas and what I created with you, to see what can be ported into this integration.
I currently have the code parts for this in a couple of private repositories so if you are interested I will see about giving you access, but for now I am not going open them to the public.
I have tested with the duo, an 810A and an 520A as those are currently uninstalled cameras I have. I have not tested with and NVR because I dont have one to test it with.
The major functional changes I made are, I only do one entity config per device, and setup multiple entities for it. I always create the Main/Sub/Ext streams and but set the Sub and Ext to disabled by default. Each camera entity can be configured for RTSP,RTMP, or MJpeg streams (Defaults to RTMP) this is set via options for each camera and channel
I also create the separate motion sensors for all that is supported by the camera via abilities. I decided to, as much as possible, use the ONVIF libraries to do the motion side of things.
I completely rewrote the backend rest library from scratch as a rest api (I would like to also build a similar one for their media/client protocol) I also support an "encrypted" http connection based on what the web client does.
I tried to separate the ONVIF motion from the binary sensor code its self so it could be swapped out with another method in the future, this is still a work in progress though.
Going through this I definately found some weakness in the Reolink API's and implementations. The biggest bug I have found so far (and mentioned here in one of the bug posts) is that the API for the duo is broken, in that a post request for a snap will only do channel 0 but a get request will do the correct channel. This is probably due to the duo being the first multi channel camera, and they probably "borrowed" code from the nvr to implement it.
Beta Was this translation helpful? Give feedback.
All reactions