Last Updated on : 2024-06-25 09:39:29download
This topic describes how to configure the NVR solution to implement batch management of IP cameras (IPCs) by using the Smart Life app. For example, with an NVR, you can activate and manage IPCs in bulk and view multiple channels at the same time.
Log in to the Tuya Developer Platform and click Create. Under the Standard Category tab, choose IP Camera > NVR. Choose TuyaOS for smart mode. Under the Custom Solution tab, choose Smart Camera.
For more information about the detailed processes of product creation, see Create Products.
If your product has the gateway feature built in, choose Gateway Device for Device Type. If not, choose Common Device.
You can select the standard function as needed. The icon of the selected function will be displayed on the control panel and device setting page in the mobile app.
There are a bunch of custom functions to implement more features for your NVR product, such as multi-view, disk storage, siren, and remote restart.
Demonstration:
DP definition:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
Input channels | ipc_multi_view | Report only (read-only) | String | - | Example: {“4,9,16”}, indicating simultaneous 4/9/16 channels are supported. The app dynamically adapts to the received data. |
Demonstration:
DP definition:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
Supported storage device types | supported_storage | Send and report (read-write) | Value | {“min”:0,“max”:65535,“scale”:0,“step”:1,“type”:“value”} | Represented by bit. 1 : Detected. 0 : Not detected.
|
The current storage device | current_storage | Send and report (read-write) | Value | {“min”:0,“max”:65535,“scale”:0,“step”:1,“type”:“value”} | Represented by bit. 1 : Enable. 0 : Disable.
|
Get the storage space | storage_capacity | Report only (read-only) | String | {“type”:“string”,“maxlen”:255} | Change the unit to KB. These three strings indicate the total storage space, the used storage space, and the available storage space respectively. |
Storage status | storage_status | Send and report (read-write) | Value | {“min”:1,“max”:5,“scale”:0,“step”:1,“type”:“value”} | status : The status of the storage module.
|
Storage formatting | storage_format | Send and report (read-write) | Boolean | {“type”:“bool”} | The device starts formatting when it receives true . |
The state of storage formatting | storage_format_status | Send and report (read-write) | Value | {“min”:-2000,“max”:2000,“scale”:0,“step”:1,“type”:“value”} | Possible error code.
|
Uninstall storage device | storage_umount | Send and report (read-write) | Boolean | {“type”:“bool”} | true : Uninstall the storage device. |
The module should report the storage-related DP status to the cloud when the storage status changes or storage-related queries or commands are received.
Example 1:
When the device detects a storage device, it reports the supported storage device type, current storage device, storage status, and storage space to the cloud.
Example 2:
When users tap Storage Settings on the app, the device reports the current storage status and storage space on receiving the storage status query command of NULL.
DP definition:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
Siren | siren_switch | Send and report (read-write) | Boolean | - | - |
Demonstration:
DP definition:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
Restart device | device_restart | Send and report (read-write) | Boolean | - | - |
Demonstration:
IPCs are connected to an NVR as sub-devices. For more information about creating an IPC product, see IPC Configuration. This section describes the NVR-specific DPs that can be added to the IPC product.
Demonstration:
DP definition:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
Stretching videos | ipc_res_change | Report only (read-only) | String | - | Example: {“video”:[{“restype”:“4”,“oldres”:“9441080",“newres”:“19201080"},{“restype”:“2”,“oldres”:“9441080"“newres”:"19201080”}],“message”:“1920*1080”} Format description:
|
Demonstration:
DP definition:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
Recording on/off | record_switch | Send and report (read-write) | Boolean | - | - |
Recording mode | record_mode | Send and report (read-write) | Enum | Enum values: 1, 2, 3 |
|
Schedule recording | record_timing_set | Send and report (read-write) | String | - | An array of JSON strings containing eight unsigned integers (decimal) represent Sunday to Saturday from left to right. Each string has 24 numbers, representing 00:00 to 01:00, 01:00 to 02:00 … 23:00 to 24:00. 0 : No recording. 1 : Ordinary recording. 2 : Event recording. 3 to 9 : Reserved. {001122222222222111111111,001122222222222111111111,001122222222222111111111,001122222222222111111111, 001122222222222111111111,001122222222222111111111, 001122222222222111111111} |
Demonstration:
DP definition:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
Event type retrieve | recoding_event_list | Report only (read-only) | String | - | Format: {1,2,5,7,12} Each number represents an event type. The IPC should implement the event playback API. |
Event description:
Number | Event type | Number | Event type |
---|---|---|---|
0 | Motion detection | 9 | Human shape detection |
1 | Doorbell | 10 | Pet detection |
2 | Device linkage | 11 | Vehicle detection |
3 | People pass by | 12 | Baby crying |
4 | People loiter | 13 | Unusual sound |
5 | Doorbell message | 14 | Face detected |
6 | Doorbell call answered | 15 | Tamper alarm |
7 | Doorbell call unanswered | 16 | Camera connection alert |
8 | Doorbell call rejected | 17 | Low battery warning |
Scenarios:
The IPCs that can connect to an NVR vary in features. For example, the panel of cube cameras does not display the PT feature while PT cameras need it. The dynamic adaptation enables the app panel to dynamically adapt to the sub-device features according to the received capability values.
DP definition:
DP name | Identifier | Data transfer type | Data type | Property | Notes |
---|---|---|---|---|---|
Report sub-device capability | sub_dp_report | Report only (read-only) | String | - | Example: [4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295 ] From right to left, the sequence number starts from 1. The sequence number of each bit represents DP ID. 1 indicates a capability is supported. 0 indicates a capability is not supported. Eight unsigned integers can identify DP ID 1 through 256 so that the app panel can adapt to each sub-device. |
To implement the NVR solution, you need to integrate the XVR SDK into your project. The hardware design is implemented on your terms.
You can set rules to trigger an automated push notification. For example, set a threshold for a function. If the preset value is reached, the user will receive an alert from the mobile phone.
Operation on the Tuya Developer Platform:
To deploy a firmware update via OTA, upload the update file to the Tuya Developer Platform. Implement the OTA update feature in the SDK and write it to the local flash memory. For more information, see Update custom firmware uploaded.
Operation on the Tuya Developer Platform:
Update channels for NVR and IPC are set separately.
Check out the NVR solution. Click Start OEM to get started.
Download XVR SDK and run the demo.
Example:
#define IPC_App_PID " 6q4d0m7odkazdqrt"
#define IPC_App_UUID "zy00fac576ee7586ac6b"
#define IPC_App_AUTHKEY "wm1TZ4M9xKM2kO4xYhLc22cX3yBI7eAF"
#define IPC_App_SUB_DEV_PID " qxqduhvs1x7brlc9"
IPC_App_PID
and IPC_App_SUB_DEV_PID NVR
with the PIDs of your NVR and IPC.Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback