Last Updated on : 2024-06-25 09:41:00download
This topic describes the custom functions for IP cameras (IPCs), which can be added as needed for your product.
Log in to the Tuya Developer Platform. Choose the target product. Under the Function Definition tab, click Add in the Custom Function section to create custom functions.
Under the Device Interaction tab, choose Panel Control. Select IPC General Panel (App minimum version 3.17.0).
Demonstration:
Description:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
Flame detection | flame_sensitivity | Send and report (read-write) | Enum | Enum values: low, medium, high | The control panel shows the icon of the feature after you add this DP. |
Demonstration:
Description:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
Working mode | ipc_usage_mode | Send and report (read-write) | Enum | Enum values: 0, 1, 2, 3 | We recommend you not add more than six enum values. |
You can reuse this DP for a different feature by editing its multilingual UI text.
Demonstration:
Description:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
4G signal strength | ipc_cellular_signal | Send and report (read-write) | Enum | Enum values: 0, 1, 2, 3 | The device reports the cellular network signal strength to the app.0 indicates no signal.1 to 3 indicate three signal levels respectively. |
Demonstration:
Description:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
Channel switching | ipc_c_switch_channel | Send and report (read-write) | String | / | / |
Up to six channels are supported due to protocol limits. Contact the project manager for the protocol content.
Demonstration:
Description:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
PIR switch | ipc_pir_switch | Send and report (read-write) | Boolean | / | / |
PIR sensitivity | ipc_pir_sensitivity | Send and report (read-write) | Value | The valid values range from 1 to 5, with a pitch of 1 and a scale of 0. | Up to ten levels are supported. |
This feature can also be set on Settings in the IPC control panel.
Demonstration:
Description:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
PIR light on time | pir_light_on_time | Send and report (read-write) | Enum | Enum values: 1, 5, 10, 15, in seconds. This DP is used for the single PIR scenario. | / |
DP 181 PIR 1 switch |
flight_pir_a | Send and report (read-write) | Boolean | / | Required |
DP 184 PIR sensitivity |
pir_sensitivity | Send and report (read-write) | Enum | Enum values: 0, 1, 2 | Required |
Demonstration:
Description:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
Camera view | ipc_camera_view | Send and report (read-write) | Enum | Enum values: 0 – Wide-angle lens. 1 – Telephoto lens. |
The control panel shows the icon of the feature after you add this DP. |
Demonstration:
Description:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
Zoom box | position_view | Send and report (read-write) | Boolean | 0, 1 | The preview screen shows the zoom box in the lower right corner after you add this DP. |
For zooming in beyond 2x, the zoom box does not disappear when the finger is released.
Demonstration:
Description:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
Magnification level | ipc_magnification | Send and report (read-write) | Boolean | / | The specific magnification level displayed on the screen, up to 12x. |
With garden lights turned on, the IPC works as a motion sensor light in private mode and does not stream video. After garden lights are turned off, the IPC resumes camera mode.
Demonstration:
Description:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
Garden lights | ipc_garden_lights | Send and report (read-write) | Boolean | / | The control panel shows the icon of the feature after you add this DP. |
With the patrol feature enabled, create a cruise plan to start patrolling. As scheduled, the camera performs a panoramic cruise from its current position to the initial position. In a cruise path, it stays at six positions and returns to the current position after patrol.
Demonstration:
Description:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
DP 174 Auto-patrol switch |
cruise_switch | Send and report (read-write) | Boolean | / | / |
DP 175 Auto-patrol mode |
cruise_mode | Send and report (read-write) | Enum | Enum values: 0 | 0: Panoramic cruise |
DP 176 Auto-patrol schedule setting |
cruise_time_mode | Send and report (read-write) | Enum | Enum values: 1 | 1: Custom cruise |
DP 178 Site favorites |
memory_point_set | Send and report (read-write) | / | / | Data format: { “type”: 1, // type indicates the operation: 1 – Add to favorite. 2 – Delete a favorite. 3 – Go to a favorite. “data”: { “name”: “xxx” // The name of the favorite site, passed in when it is added. “seq”: 1, // Passed in when the favorite site is deleted or added. “pan”: 3456, // Passed in when the favorite site is deleted or added. “tilt”: 234, // Passed in when the favorite site is deleted or added. “zoom”: 899 // Passed in when the favorite site is deleted or added. } } The format of the return data: { “type”: 1, “data”: { “error”: 10001 //(0 – Success. 10001 – Site favorites exceed the limit. 10002 – In cruising. } } |
DP 179 Auto-patrol status |
cruise_status | Send and report (read-write) | Enum | Enum values: 0, 1, 2 | 0: Panoramic cruise. 1: Site cruise. 2: Not in cruise mode. |
Cruise plan | cruise_schedule | Send and report (read-write) | Raw | / | / |
Dwell time | cruise_stay_time | Send and report (read-write) | Value | The valid values range from 10 to 120, with a pitch of 10 and a scale of 0. | / |
The camera stays at each site for ten seconds by default.
Users can set a dwell time between 10 and 120 seconds with 12x optical zoom, at an interval of 10 seconds. Up to ten cruise plans can be created.
Demonstration:
Description:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
Lock/unlock | access_lock_support | Report only (read-only) | String | / | DP ID 1, DP ID 2, DP ID 3, and more indicate the DP ID of the door lock respectively. |
DP ID 1 Door lock 1 |
accessory_lock1 | Send and report (read-write) | Boolean | / | Door lock ID, ranging from 1 to 8. |
DP ID 2 Door lock 2 |
accessory_lock2 | Send and report (read-write) | Boolean | / | Door lock ID, ranging from 1 to 8. |
DP ID 3 Door lock 3 |
accessory_lock3 | Send and report (read-write) | Boolean | / | Door lock ID, ranging from 1 to 8. |
DP ID 4 Door lock 4 |
accessory_lock4 | Send and report (read-write) | Boolean | / | Door lock ID, ranging from 1 to 8. |
With this DP added, users can swipe up the incoming call page to show the unlocking button. Multiple locks are supported.
Demonstration:
Description:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
DP138 Light switch |
floodlight_switch | Send and report (read-write) | Boolean | / | The control panel shows the icon of the feature after you add this standard DP. |
Custom DP Light mode |
light_mode | Send and report (read-write) | Enum | Enum values: always_on_mode , breathing_light_mode , marquee_mode |
Steady on effect, breathing effect, and running effect. |
Demonstration:
Description:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
DP138 Light switch |
floodlight_switch | Send and report (read-write) | Boolean | / | The control panel shows the icon of the feature after you add this standard DP. |
Custom DP Color control |
light_color_control | Send and report (read-write) | String | / | HSV information |
Demonstration:
Description:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
PIR switch | ipc_pir_switch | Send and report (read-write) | Boolean | / | / |
PIR sensitivity | ipc_pir_sensitivity | Send and report (read-write) | Value | The valid values range from 1 to 5, with a pitch of 1 and a scale of 0. | Up to ten levels are supported. |
Demonstration:
Description:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
Display SD card storage space | ipc_save_percent | Send and report (read-write) | Boolean | / | This feature takes effect after you add this DP, without additional implementation. |
Demonstration:
Description:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
Mic sensitivity | mic_sensitivity | Send and report (read-write) | Enum | Enum values: 0, 1, 2 | 0 – Low sensitivity. 1 – Medium sensitivity. 3 – High Sensitivity. |
Demonstration:
After you add the independent alert reporting switch, crying detection is decoupled from the sound detection. It can be independently turned on or off without a strong association with sound detection.
Description:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
DP 134 Motion alert |
motion_switch | Send and report (read-write) | Boolean | / | Required |
DP 141 Sound detected |
decibel_upload | Report only (read-only) | String | / | It is used for sending alerts to the app. |
DP 167 Cry detection switch |
cry_detection_switch | Send and report (read-write) | Boolean | / | true : Enable crying detection. false : Disable crying detection. |
DP 185 Alarm report |
alarm_message | Report only (read-only) | Raw | / | The camera reports the captured image to the app. |
Independent alert reporting switch | ipc_alarm_ind | Send and report (read-write) | Boolean | / | After you add this DP, crying detection is decoupled from the sound detection. |
Demonstration:
The Face Detection switch will be added to the Detection Alarm Settings. It can work with the DP 185 to alert users when a face is detected.
Description:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
DP 134 Motion alert |
motion_switch | Send and report (read-write) | Boolean | / | Required |
DP 185 Alarm report |
alarm_message | Report only (read-only) | Raw | / | The camera reports the captured image to the app. |
Face detection | ipc_face_detection | Send and report (read-write) | Boolean | / | / |
Independent alert reporting switch | ipc_alarm_ind | Send and report (read-write) | Boolean | / | Add this DP to implement an independent motion detection switch. |
Demonstration:
Description:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
DP 134 Motion alert |
motion_switch | Send and report (read-write) | Boolean | / | Required |
DP 185 Alarm report |
alarm_message | Report only (read-only) | Raw | / | The camera reports the captured image to the app. |
Alarm linkage | ipc_local_link | Send and report (read-write) | Boolean | / | / |
Demonstration:
It is used to set the recording time for low power cameras.
Description:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
DP 134 Motion alert |
motion_switch | Send and report (read-write) | Boolean | / | Required |
Video recording duration | ipc_recording_time | Send and report (read-write) | Enum | Enum values: 0, 1, 2, 3, 4, 5, 6 | The enum values correspond to 15s, 20s, 30s, 45s, 60s, 90s, and 120s. |
Demonstration:
With early termination enabled, assume that the recording time is set to 30s, if no PIR event is triggered within 10s, the camera will terminate recording and enter sleep mode. Otherwise, the camera continues recording until the specified time is reached.
Description:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
DP 134 Motion alert |
motion_switch | Send and report (read-write) | Boolean | / | Required |
Video recording duration | ipc_recording_time | Send and report (read-write) | Enum | Enum values: 0, 1, 2, 3, 4, 5, 6 | The enum values correspond to 15s, 20s, 30s, 45s, 60s, 90s, and 120s. |
Early termination | ipc_recording_finish | Send and report (read-write) | Boolean | / | / |
Demonstration:
It is used to set the alarm interval for low power cameras.
Description:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
DP 134 Motion alert |
motion_switch | Send and report (read-write) | Boolean | / | Required |
Alert interval | pir_alarm_interval | Send and report (read-write) | Enum | Enum values: 0, 1, 2, 3 | The enum values correspond to 0s, 10s, 30s, and 60s. |
Demonstration:
Description:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
DP 134 Motion alert |
motion_switch | Send and report (read-write) | Boolean | / | Required |
DP 168 Motion area switch |
motion_area_switch | Send and report (read-write) | Boolean | / | Required |
DP 169 Motion area |
motion_area | Send and report (read-write) | String | / | Required |
Polygon surveillance area switch | ipc_polygon_switch | Send and report (read-write) | Boolean | / | The surveillance area defaults to a rectangle. With this DP added, it can be a polygon. |
Multiple surveillance areas | ipc_detection_area | Send and report (read-write) | Boolean | / | With this DP added, multiple areas can be set. Otherwise, only one area can be set. |
Surveillance area data | multi_motion_area | Send and report (read-write) | Raw | [{ “ispoly”: 0,// Indicates whether this is a polygon surveillance area. “points”: [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100]// Anchor data. The even-numbered bits indicate the x-coordinate. The odd-numbered bits indicate the y-coordinate. Eight points in total. }, { “ispoly”: 0, “points”: [Same as above] }, { “ispoly”: 0, “points”: [Same as above] }, { “ispoly”: 0, “points”: [Same as above] }] |
/ |
Demonstration:
Description:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
Privacy zone switch | ipc_privacy_zone | Send and report (read-write) | Boolean | / | With this DP added, multiple privacy zones can be set. |
Polygon privacy zone detection | ipc_privacy_polygon | Send and report (read-write) | Boolean | / | The surveillance area defaults to a rectangle. With this DP added, it can be a polygon. |
Privacy zone detection data | multi_privacy_area | Send and report (read-write) | Raw | [{ “ispoly”: 0,// Indicates whether this is a polygon surveillance area. “points”: [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100]// Anchor data. The even-numbered bits indicate the x-coordinate. The odd-numbered bits indicate the y-coordinate. Eight points in total. }, { “ispoly”: 0, “points”: [Same as above] }, { “ispoly”: 0, “points”: [Same as above] }, { “ispoly”: 0, “points”: [Same as above] }] |
/ |
Demonstration:
The IPC SDK in use must support AP mode. Contact the project manager to enable PID AP mode.
Description:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
AP state | ipc_ap_mode | Send and report (read-write) | String | / | After users tap AP mode on the app, the camera reports the AP mode, SSID, and password to the app. |
AP mode switch | ipc_ap_switch | Send and report (read-write) | String | / | Enable or disable AP mode. |
Time sync in AP mode | ipc_ap_sync_time | Send and report (read-write) | String | / | If the chip in the camera does not have a built-in clock, the app syncs time with the camera when users open the settings menu. |
Demonstration:
For a paired camera, the ONVIF feature is disabled by default. When it is enabled for the first time, you should force users to change the default ONVIF password.
Description:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
ONVIF switch | onvif_switch | Send and report (read-write) | Boolean | / | / |
Whether to change the default ONVIF password | onvif_pw_changed | Report only (read-only) | Boolean | / | When ONVIF is enabled for the first time, the camera reports 0 to prompt users to change the default password. After the password is changed, the camera reports 1 to close the prompt window. |
ONVIF IP reporting | onvif_ip_addr | Report only (read-only) | String | / | In the format xx.xx.xx.xx For example, 192.168.0.100 |
Change the ONVIF password | onvif_change_pwd | Send and report (read-write) | String | / | The app sends data to the camera: {“oldpwd”:“oldpassword”,“newpwd”:“newpassword”} Camera returns: Success{“res”:“ok”} Failure{“res”:“failed”,“errcode”:1} Error code: 1: Incorrect password. 2: Invalid password format. |
Demonstration:
Description:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
Screen settings | screen_set | Report only (read-only) | Boolean | / | In the app, Advanced Settings show Screen Settings after you add this DP. |
Auto wake-up | screen_auto_awake | Send and report (read-write) | Boolean | / | / |
Screen off time | screen_off_time | Send and report (read-write) | Value | The valid values range from 1 to 10, with a pitch of 1 and a scale of 0, in minutes. | The range is subject to dynamic adaption based on the DP configuration. |
Screen brightness | screen_lightness | Send and report (read-write) | Value | The valid values range from 1 to 100, with a pitch of 1 and a scale of 0. | The range is subject to dynamic adaption based on the DP configuration. |
Demonstration:
Description:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
Ringtone settings | ringtone_set | Report only (read-only) | Boolean | / | In the app, Advanced Settings show Ringtone Settings after you add this DP. |
Ringtone | vth_chime_ring_tune | Send and report (read-write) | Enum | Enum values: 1, 2, 3, 4 | The range is subject to dynamic adaption based on the DP configuration. |
Ringtone volume | vth_chime_volume | Send and report (read-write) | Value | The valid values range from 1 to 100, with a pitch of 1 and a scale of 0. | The range is subject to dynamic adaption based on the DP configuration. |
Demonstration:
The Tamper Alarm switch will be added to the Advanced Settings. It can work with the DP 185 to alert users when a tamper event is detected.
Description:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
DP 185 Alarm report |
alarm_message | Report only (read-only) | Raw | / | The camera reports the captured image to the app. |
Tamper alarm | ipc_anti_dismantle | Send and report (read-write) | Boolean | / | The control panel shows the tamper alarm switch after you add this DP. |
Demonstration:
With this DP added, users can tap the fast-forward or rewind button to skip the content for a specified time when they play back the footage on the SD card.
Description:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
Playback speed | recording_length_set | Send and report (read-write) | Value | The value ranges from 1 to 30, with a pitch of 1 and a scale of 0. | The time interval ranges from 1s to 30s. If the firmware does not support this range, you can use the default range of 10s to 30s. |
To allows users to set the fast-forward and rewind time interval on the app, add the following DP. This requires the firmware support and the camera to report the recording_length_set
data.
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
Fast-forward and rewind time interval | recording_settings | Send and report (read-write) | Boolean | / | The control panel shows the setting menu after you add this DP. |
Demonstration:
The configurable features on the panel are independent of DP configuration. If needed, contact the project manager to configure the required feature. After configuration, clear the app cache to take effect, without pairing with the camera again.
Demonstration:
Before configuration | After configuration |
---|---|
This feature is available on Smart Life app v3.17 or later.
Demonstration:
Before configuration | After configuration |
---|---|
This feature is available on Smart Life app v3.25 or later.
Demonstration:
Before configuration | After configuration |
---|---|
This feature is available on Smart Life app v3.25 or later.
Demonstration:
Before configuration | After configuration |
---|---|
This feature is available on Smart Life app v3.25 or later.
Battery level | Before configuration | After configuration |
---|---|---|
100% | ||
20% | ||
5% |
Before configuration | After configuration |
---|---|
This feature is available on Smart Life app v3.17 or later.
Before configuration | After configuration |
---|---|
This feature is available on Smart Life app v3.17 or later.
Before configuration | After configuration |
---|---|
Before configuration | After configuration |
---|---|
flight_pir_a
, the Smart icon will be displayed automatically. You can hide or display it as needed.Before configuration | After configuration |
---|---|
Before configuration | After configuration |
---|---|
This feature is available on Smart Life app v3.20 or later.
Before configuration | After configuration |
---|---|
Before configuration | After configuration |
---|---|
This feature is available on Smart Life app v3.17 or later.
Before configuration | After configuration |
---|---|
This feature is available on Smart Life app v3.25 or later.
Before configuration | After configuration |
---|---|
This feature is available on Smart Life app v3.20 or later.
Before configuration | After configuration |
---|---|
Before configuration | After configuration |
---|---|
Before configuration | After configuration |
---|---|
This feature is available on Smart Life app v3.17 or later.
Before configuration | After configuration |
---|---|
Before configuration | After configuration |
---|---|
Enable emergency call
Set emergency telephone number
Before configuration | After configuration |
---|---|
Direction | Before configuration | After configuration (early style) | After configuration (new style) |
---|---|---|---|
Horizontal | |||
Vertical |
This feature is available on Smart Life app v3.30 or later.
On the video screen, tap the linkage icon to control smart devices associated with the home, such as lights and garage door opener. These devices must have the Quick Toggle enabled on the Tuya Developer Platform.
Demonstration:
In full-screen mode, tap the linkage icon in the top right corner.
Select a device and feature to control.
Arrange the device icons and finish setting. Then, tap the associated position on the screen to trigger device linkage.
This feature is available on Smart Life app v3.33 or later.
Before configuration | After configuration |
---|---|
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback