Last Updated on : 2024-06-12 10:22:50download
IoT devices have gained ground in many homes and industries. Increasing importance has been attached to the implementation of secure and flexible device control and management. Therefore, well-engineered features can be integrated to achieve these purposes, such as device control, group management, smart scenes, multi-control linkage, and scheduled tasks. This topic describes the helpful knowledge about IoT device control by mobile apps.
The device control capabilities mentioned in this topic apply to the development of Tuya IoT mobile apps. Whether your App SDK provided by a third party supports a certain control method only depends on that App SDK.
In simple scenarios, a mobile app is used to control only one device, or simultaneously control multiple devices.
In some other scenarios, devices are required to be controlled by multiple users or dependent on the status of other devices. For example, a smart lock must support locking or unlocking by all home members. In this case, the following requirements must be met: a mobile app can be used to control multiple devices. Multiple users can be authorized to mutually control multiple devices.
To simplify device control, Tuya abstracts each function of IoT devices into a data point (DP) that defines the current device status.
Tuya describes the capabilities and functionality of an IoT device as a things data model, which is mapped to the concept of Product on the Tuya IoT Platform. You can check the definitions of DPs for a product on the Tuya IoT Platform. The following figure shows the definitions of the standard functions for an example product.
Tuya allows mobile apps to send a control command to a device and achieve the desired functionality. The following line shows the command format. The DP value depends on the function definition for the product on the Tuya IoT Platform.
{
"<dpId>":"<dpValue>"
}
To meet your needs in smart scene configuration, Tuya IoT App SDK provides APIs that enable customized smart scenes. If the status of a smart device changes, or if an environmental condition changes, other certain smart devices have their switches or status changed. This is how a smart scene works.
Smart scenes include the following types: Automation and Tap-to-Run.
Users can set specific conditions to run a smart scene. When the conditions are met, the Automation scene is automatically triggered. The following condition types are supported:
Users can add actions to a Tap-to-Run smart scene. Later, they can tap the scene to run it when needed. Scene actions support the following types of objects:
A device group includes devices of the same type and gathers a series of devices. Wi-Fi and Zigbee devices can be grouped in most cases.
Users can create different groups of devices on an IoT mobile app by region, type, permissions, or other rules. This allows numerous devices to be managed in bulk. For example, firmware updates can be performed for multiple groups of utility meters in a specific project.
Tuya Smart provides basic capabilities of scheduled tasks for devices and device groups.
The app can be used to set a scheduled task based on specific scheduled task API calls. Then, smart devices will automatically run predefined tasks. A smart device supports multiple scheduled tasks. A scheduled task supports multiple timers.
In this feature, a device feature is linked with a feature of another device to create a multi-control group. When a device of the multi-control group is controlled, the linked status of other devices in the group is synchronously changed.
For example, 3 two-gang Zigbee sub-device switches, the first DP of each switch is linked with the first DP of the other two switches to create a multi-control group. When the first DP for one of these switches is set to off
, the first DP of the other two switches is synchronously set to off
.
Tuya provides native control panels that are developed with native code. Panel control support most Powered by Tuya
products and DPs, and features fast response and high compatibility. You can easily integrate panel libraries into your project to implement all-around capabilities for products in Tuya’s ecosystem.
Service | iOS | Android |
---|---|---|
Smart Life App SDK | Device control | Device control |
Commercial Lighting App SDK | Device control | Device control |
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback