Coder Social home page Coder Social logo

Alarm IO Channel for NVR about pyhik HOT 4 CLOSED

mezz64 avatar mezz64 commented on September 26, 2024
Alarm IO Channel for NVR

from pyhik.

Comments (4)

mezz64 avatar mezz64 commented on September 26, 2024

Can you have multiple IO sensors per channel? Does the "dynInputIOPortID" field show up during any of your other event types, or just IO events?

from pyhik.

randellhodges avatar randellhodges commented on September 26, 2024

When querying the NVR, dynInputIOPortID shows up once for each of the cameras that have an alarm. I am assuming if a camera supported multiple alarm outputs, you'd get one per camera.

I have 6 cameras. 5 support alarm outputs, the cameras 1 thru 5.

I have:

  • IO-1 thru IO-16 for the DVR alarms. They have a node named inputIOPortID and they have values 1 thru 16.
  • IO-101 thru IO-501 for the camera alarms. They have a node named dynInputIOPortID and they have values 101 thru 501.

I had just forked and started working on change (thought I'd try to be useful) that would just take the and do a rsplit('-', 1)[-1] for use as the etchannel. I then saw how you use that as a flag for NVR, but I was going to use the DeviceInfo, deviceType to set that flag. I see values of IPCamera and DVR for that.

Not sure if what I was going to propose works well with rebranded stuff or not.

Edit: I don't know yet if this means we'd have to look at a different node inside the process_stream method or not. I'll have to see if I can get the alarm to trigger while debugging the stream to see what it sends.

from pyhik.

mezz64 avatar mezz64 commented on September 26, 2024

Can you post the full xml for your event triggers?

I'm hesitant to modify the id behavior for the exact reason you mention. The only reason it's in there is to allow rebranded stuff to work. I'd rather just add in another option, just want to make sure it doesn't interfere with any existing fields.

from pyhik.

randellhodges avatar randellhodges commented on September 26, 2024

Attached. Also included is what I was playing with for getting the id. Works for me, but I have all hikvision stuff. I left the nvr detection alone.

There is some debug stuff in the stream processing. I'm trying to see how the io alerts trigger. Either I don't have the camera configured, or the triggering of IO doesn't go thru the stream. Still learning how that works.

nvr_with_io.zip

Edit: My idea with the splitting of the number won't provide consistent results. I found that on my cube cam (directly, not going thru the nvr) the PIR event trigger doesn't have the channel suffixed. So you are correct that the better way would be to add the other nodes to check.

from pyhik.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.