Comments (4)
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.
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.
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.
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.
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)
- There was a problem: 'NoneType' object has no attribute 'text' HOT 6
- Track events not shown in triggers XML endpoint HOT 7
- hikvision.py reference api document HOT 2
- Control PTZ
- Accessing Alarm trigger of camera in python code HOT 1
- /ISAPI/Event/triggers returning device error HOT 1
- Multiple detection stopped working in HA
- HomeAssistant 'Problem finding attribute: 'duration'' in logging HOT 3
- Request: Features for video Intercom HOT 1
- faceSnap sensor support HOT 11
- TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType' HOT 20
- Delay is receiving Events HOT 2
- Only usable with `admin` username HOT 1
- What about streaming through the NVR HOT 1
- Home Assistant 2022.12.0B0 HOT 16
- Trigger Light strobe / Alarm. Is it possible? HOT 1
- ANPR DS-2CD4A26FWD-IZS HOT 10
- binary sensor not created HOT 2
- etchannel_num = int(etchannel.text) - TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType' HOT 21
- Video Tampering Detection event not properly detected because of XML namespace problem
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyhik.