Configure Video Intercom Alarm or Event

The alarm triggered or event occurred during video intercom can be uploaded to central platform for further processing after setting alarm or event parameters and configuring arming or listening mode of alarm/event receiving.

  • Make sure you have called NET_DVR_Init to initialize the development resources.

  • Make sure you have called NET_DVR_Login_V40 to log in to device.

Figure 1 Programming Flow of Configuring Video Intercom Alarm or Event

  1. Call NET_DVR_GetDeviceAbility and set dwAbilityType to "IP_VIEW_DEV_ABILITY" (macro definition value: 0x014) to get video intercom device capability for checking if setting video intercom alarm or event is supported.

    The video intercom device capability is returned in the message XML_IpViewDevAbility.

    If supports, the node <UploadAlarmCfg> is returned and you can perform the following steps.

  2. Optional: Call NET_DVR_GetDVRConfig with "NET_DVR_GET_VIDEO_INTERCOM_ALARM_CFG" (command No.: 16037) and set lChannel to "0xFFFFFFFF" for getting default or configured video intercom alarm or event parameters for reference.

    The alarm or event parameters of video intercom are returned in the structure NET_DVR_VIDEO_INTERCOM_ALARM_CFG by lpOutBuffer.

  3. Call NET_DVR_SetDVRConfig with "NET_DVR_SET_VIDEO_INTERCOM_ALARM_CFG" (command No.: 16038), set lChannel to "0xFFFFFFFF", and set lpInBuffer to the structure NET_DVR_VIDEO_INTERCOM_ALARM_CFG for setting video intercom alarm or event parameters.
  4. Optional: Respectively set lCommand in alarm/event callback function (MSGCallBack) to "COMM_ALARM_VIDEO_INTERCOM" (command No.: 0x1133) and "COMM_UPLOAD_VIDEO_INTERCOM_EVENT" (command No.:0x1132) for receiving video intercom alarm and event information in arming mode (refer to Receive Alarm/Event in Arming Mode) or listening mode (refer to Receive Alarm/Event in Listening Mode).

    The video intercom alarm information is called back in the structure NET_DVR_VIDEO_INTERCOM_ALARM; and the video intercom event information is called back in the structure NET_DVR_VIDEO_INTERCOM_EVENT.

Call NET_DVR_Logout and NET_DVR_Cleanup to log out of the device and release the development resources.