NVR Integration Options and Discussion

Posted on
Fri Aug 21, 2020 8:42 am
whmoorejr offline
User avatar
Posts: 522
Joined: Jan 15, 2013
Location: Houston, TX

NVR Integration Options and Discussion

I'm fully aware of the software options for analyzing video that work with indigo to provide motion status of cameras and such.... What I'd like is a NVR tie in that would work. I have this operational now in a couple different ways, but I thought I'd open this up for discussion to see if there is a better solution, a plugin option, etc.

Most Dahua NVRs (this covers Lorex, Amcrest, Q-See and many more brands) have two ways of obtaining events (video motion, video loss, video blind, etc.).
1) Selecting "Alarm Center" on the NVR to transmit to an "Alarm Center" server.
2) Polling the device

The Amcrest, Dahua and Hikvision manuals describe "Alarm Center" https://dahuawiki.com/Alarm_Center as using the "Alarm Center Protocol" which ,I think, is another word for the "Contact ID Protocol". Here you select an IP and Port number to broadcast the message to. Since I haven't figured out how to receive that broadcast, I haven't been able to bounce it off the Ademco Protocol to interpret the message. Something I found that defines the protocol: http://www.voip-sip-sdk.com/p_583-ademco-contact-id-protocol-standard-for-alarm-system-communication-voip.html , https://li0r.wordpress.com/contact-id-protocol/

Tinkering with the HDDPd plugin and also tinkering with the Node-Red HTTP-in node got me nowhere. (Not saying a solution isn't in there, just pointing out my limitations of understanding)

What I have gotten to work:
NVR Control: The Dahua line of NVRs are scriptable to the point of managing what is displayed on the screen, trigger an alarm-in (for tagging saved video clips), etc using their API.
Indigo Control: I used the SMTPd plugin to add cameras to indigo. (Now my NVR and each camera send motion emails to the Indigo SMTP plugin which sets off triggers to activate virtual camera devices.

Indigo Control (Part2 - Node Red): Another working solution I found is through Node-Red and the Dahua Node. The node can be set up using digest authentication to poll a Dahua line of NVR (I'm using an Amcrest NVR now) and then communicate that to indigo. The node is written in .js and I have no idea if it could be converted into something to run solely on indigo as a plugin (seriously I have zero plugin skills). https://github.com/inwaar/node-red-contrib-dahua-device. But it does work if anyone else wants a drag & drop node red solution for their NVR.


What might??? work:

Ademco Node: There is an Ademco Node, https://flows.nodered.org/node/node-red-node-ademco but like most other stuff, it receives the Contact ID protocol message via a direct connection (USB/Serial), I don't think it will work via HTTP (Alarm Center option in NVR).

Raspberry Pi: I was looking to see if one of the Alarm Center raspberry pi builds (which appear to be python based) could be modified into a plugin? https://github.com/scudre/alarm-central-station-receiver. <-- this one I think is written in python.... so maybe closer for integrating directly into Indigo?

Other "Alarm Center" Approaches that could be indigo-able?: https://github.com/schmupu/ioBroker.contactid

Existing Alarm Plugin: IF NVRs are using the same communication protocol as industry standard alarms "Contact ID Protocol", then could an existing plugin be copied/modified/adapted to receive the NVR messages. (I haven't touched this approach yet because I'm freaked out that I will screw up my rock-solid DSC Alarm plugin)

Anyone else make any headway with NVR-Indigo integration?

Bill
My Plugin: My People

Posted on
Mon Aug 24, 2020 9:07 pm
mundmc offline
User avatar
Posts: 814
Joined: Sep 14, 2012

NVR Integration Options and Discussion

I bailed on my Amcrest NVR when i could not access individual cams through it’s mandatory subnet. But [mention]whmoorejr [/mention] you got some serious multi-platform-kung-fu so i am eagerly subbed to this thread :)

Posted on
Tue Aug 25, 2020 1:06 am
whmoorejr offline
User avatar
Posts: 522
Joined: Jan 15, 2013
Location: Houston, TX

Re: NVR Integration Options and Discussion

mundmc wrote:
I bailed on my Amcrest NVR when i could not access individual cams through it’s mandatory subnet. But [mention]whmoorejr [/mention] you got some serious multi-platform-kung-fu so i am eagerly subbed to this thread :)


Yeah, I gave up on the built-in POE switch. I don’t remember if I had an issue with the snapshots... but I did have issues with manipulating the settings on other Non-Amcrest cameras. I run a separate POE injector, so for control pages, I pull snapshots directly from the cameras. Hikvision NVRs, for example, have “Virtual Host” option to directly access the cameras. I don’t know if they have added anything like that to their newer NVRs yet. They are kinda slow on updates.... spending most of their time working on their “smart AI” line (which is worthless IMO.)

[Update] I was able to use this script in an action to pull an image directly from the NVR and put on my desktop:

Code: Select all
import requests
url = 'http://admin:password@IPaddress:PORT/cgi-bin/snapshot.cgi?channel=1'
reply = requests.get(url)
reply.raise_for_status()
with open('/Users/yourhomedirectory/Desktop/NVR.jpg', 'wb') as image_file:
    image_file.write(reply.content)

After you put in your password, IP address & port of NVR and put in your home directory, this should place a snapshot on your desktop called "NVR.jpg"

I just use the NVRs for recording and for a dedicated display.

Since I can control the NVR remotely via indigo (which camera is where on the screen), I'm thinking about getting an HDMI Modulator. Since the NVR is up 24/7., the feed would be on the home coax 24/7 and hopefully 0 lag time to see cameras when you switch to that channel (versus a Roku or appleTV camera app loading multiple RTSP streams).

Bill
My Plugin: My People

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests