Continuing the discussion from Reolink NVR to Home Assistant Issue:
Sooooo, the Reolink NVRs have an API where you can check the alert state. But, it’s not a streaming API – it’s REST. Home Assistant can of course query REST APIs no problem, but since timeliness is often a factor here, examples like in the post above tend to poll a lot.
The NVR can also send alerts via a push service to their own app – but whatever is doing that is kind of opaque. The public API contains calls to activate or deactivate this for various channels – but not any way to change where it points or hook into it. Might be possible to sniff network traffic and figure out what’s going on, but… I had another horrible idea.
The NVR can also do another kind of “push” – it can upload an image to an FTP server when there’s an alert. Sooooo, this got me thinking: could make a simple pyftpdlib app that accepts these connections and fires off mqtt or a web-hook in response. (The associated image could just be dropped, or put in a media directory somewhere – or pushed via mqtt, even.)
Does this crazy idea seem useful to anyone else? Hopefully Reolink will implement something native (webhooks are in the works, but rather than holding my breath until their work is done…