Rennbon / pyhikvision

hikvision-sdk for Python3 in action
MIT License
286 stars 48 forks source link

Q: example script to get events from video intercoms #11

Closed pergolafabio closed 1 year ago

pergolafabio commented 3 years ago

hey @Rennbon or @allen0125

im not a developer, is it possible to have some example.py file for getting events from a videointercom system based on this SDK so somekind of loop to get events like :

event type: COMM_ALARM_V30:

ALARMINFO_V30_ALARMTYPE_MOTION_DETECTION

event type: COMM_ALARM_VIDEO_INTERCOM:

VIDEO_INTERCOM_ALARM_ALARMTYPE_DOORBELL_RINGING VIDEO_INTERCOM_ALARM_ALARMTYPE_DISMISS_INCOMING_CALL VIDEO_INTERCOM_ALARM_ALARMTYPE_TAMPERING_ALARM

event type: COMM_UPLOAD_VIDEO_INTERCOM_EVENT:

VIDEO_INTERCOM_EVENT_EVENTTYPE_UNLOCK_LOG VIDEO_INTERCOM_EVENT_EVENTTYPE_ILLEGAL_CARD_SWIPING_EVENT

much appreciated!!

Rennbon commented 3 years ago

Thank you for your advice. I'll take it into consideration

pergolafabio commented 3 years ago

thnx in advance

though,

We have discovered a bug in the SDK Linux edition , build 6.1.6.45 – 20210302 32 + 64 bit editions This bug is only present in the Linux 32 and 64 bit editions, When testing the Windows SDK, its running OK

I’m testing :

NET_DVR_ALARMINFO_V30 https://open.hikvision.com/hardware/v2/%E7%BB%93%E6%9E%84%E4%BD%93/NET_DVR_ALARMINFO_V30.html

this one seems OK, the AlarmTypes are OK

when testing these 2

NET_DVR_VIDEO_INTERCOM_ALARM & NET_DVR_VIDEO_INTERCOM_EVENT https://open.hikvision.com/hardware/v2/%E7%BB%93%E6%9E%84%E4%BD%93/NET_DVR_VIDEO_INTERCOM_ALARM.html https://open.hikvision.com/hardware/v2/%E7%BB%93%E6%9E%84%E4%BD%93/NET_DVR_VIDEO_INTERCOM_EVENT.html

the AlarmType & EventType are not ok, I’m getting the value 0 or other strange values, instead of the ones corresponding to the event

this is only happening in Linux edition, when I use the windows SDK, its OK tested on an example device intercom DS-KD8003, running latest firmware 2.2.45_210430

pergolafabio commented 2 years ago

hey @Rennbon , did you already had a chance to look at the alarm events?

thnx!

pergolafabio commented 1 year ago

hi, any update? :-)