Configure Base Station Solution

Last Updated on : 2024-11-20 08:51:46download

This topic describes how to configure the base station solution to implement batch management of IP cameras (IPCs) by using the Smart Life app. For example, add or delete IPC sub-devices of various types, stream videos, and configure features.

Create product

Log in to the Tuya Developer Platform and click Create. Under the Standard Category tab, choose IP Camera > Base Station. Choose TuyaOS for smart mode. Under the Custom Solution tab, choose Base Station.

For more information about product creation, see Create Products.

Configure Base Station Solution

Standard functions

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.

Configure Base Station Solution

Storage settings

DP definition:

DP name Identifier Data transfer type Data type Property Notes
DP 102
Supported storage device types
supported_storage Send and report (read-write) Value The valid values range from 0 to 65535, with a pitch of 1 and a scale of 0. /
DP 103
Get the storage space
storage_capacity Report only (read-only) String
DP 104
Storage status
storage_status Report only (read-only) Value The valid values range from 1 to 5, with a pitch of 1 and a scale of 0. /
DP 105
Storage formatting
storage_format Send and report (read-write) / / /
DP 106
Uninstall storage device
storage_umount Send and report (read-write) Boolean / /
DP 107
The state of storage formatting
storage_format_status Send and report (read-write) Value The valid values range from -20000 to 20000, with a pitch of 1 and a scale of 0. /
DP 113
The current storage device
current_storage Send and report (read-write) Value The valid values range from 0 to 65535, with a pitch of 1 and a scale of 0. /

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.

Siren

DP definition:

DP name Identifier Data transfer type Data type Property Notes
DP 114
Siren
siren_switch Send and report (read-write) Boolean / true: Turn on siren.
false: Turn off siren.

Remote restart

DP definition:

DP name Identifier Data transfer type Data type Property Notes
DP 115
Restart device
device_restart Send and report (read-write) Boolean After the user tap the restart button on the app, the platform will send the command true to the device. The device will act accordingly.

IPC sub-device configuration

For more information about creating an IPC product, see IPC Configuration.

Hardware development

To implement the solution, you need to integrate the SDK into your project. The hardware design is implemented on your terms.

  1. Download the SDK from GitHub. If you do not find the required SDK, contact the project manager and request the SDK.
  2. Develop with the SDK as instructed by the XVR SDK Development Guide. Request this guide from the project manager.

Push notification

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:

Configure Base Station Solution

  • Push notification is available to accounts of the premium version or ultimate version.
  • Push notifications for base station and IPC are set separately.

OTA update

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 Firmware. Operation on the Tuya Developer Platform:

Configure Base Station Solution

Update channels for the base station and IPC are set separately.

Quick product creation

Create a product by copying a pre-defined product to your account.

Debug with virtual device

Download the SDK and run the demo.

Base station

#define IPC_ App_PID " t9w7dkrxaj3jmjq1"
#define IPC_ App_UUID " tuya720b7f6da902298b"
#define IPC_ App_AUTHKEY " Fc83LABjeY1RUoXOgTopZQVp8Ptg5ouw"

Sub-device

PID:qxqduhvs1x7brlc9
UUID:tuyade915cbded1aeee6
AUTHKEY:9iqErN70iXG09VuJiHMcrzk29fo18QSR
  • Replace the values of IPC_ App_PID and IPC sub-device PID with the PIDs of your base station and IPC products.
  • The sample UUID only supports a single IPC sub-device. To connect to multiple IPC sub-devices, create an OEM product or create a sub-device product on the Tuya Developer Platform to get the free UUID.