Event Reporting

Last Updated on : 2025-05-19 07:42:26download

Functional description

The camera sends alerts of events, including motion, human shape, pet, and doorbell call, to the cloud to get reflected in the message center on the mobile app. This feature supports both standard image messages and video messages.

Basic features

Header file

  • tuya_ipc_cloud_storage.h
  • tuya_ipc_notify.h

Initialize event reporting

OPERATE_RET tuya_ipc_event_module_init(INT_T max_event, TUYA_ALARM_BITMAP_T *alarms_of_event, INT_T alarm_cnt_per_event)

Report an event

Report sub-device events using DP 212.

OPERATE_RET tuya_xvr_notify_with_event(IN CONST CHAR_T * sub_node_id, IN CONST CHAR_T *snap_buffer, IN CONST UINT_T snap_size, IN CONST NOTIFICATION_CONTENT_TYPE_E type, IN CONST NOTIFICATION_NAME_E name, BOOL_T is_notify);