Last Updated on : 2024-06-26 06:59:54download
The basic IoT applications and product applications are encapsulated in the standard APIs of the application layer. This helps reduce your efforts to write protocols and logic on your own. Your required features can be implemented simply by making API calls and setting parameters, which can notably boost your development efficiency.
Applications | Description |
---|---|
OTA | Call the OTA function to empower your product with the OTA update feature. |
Pairing | Call the pairing function to enable various pairing modes such as Wi-Fi Easy Connect mode and access point (AP) mode. |
Production test | Call the production test function to implement the logic for firmware flashing and authorization and the final test. |
The following table lists the advanced features in the application layer.
Applications | Description |
---|---|
Energy monitoring | Electricity data of power, voltage, current, and usage can be collected and reported to the cloud and mobile app. |
Schedules with randomness | With this feature, users can set up random light schedules that emulate their presence at home while they are away, which helps to deter burglars. |
Schedules | Users can set up multiple schedules to turn on/off devices according to the pre-set start time and end time. Schedules can be repeated daily, weekly, or a specific day of the week. This feature is widely used in irrigators. |
Inching switch | An inching switch is used to turn on a device for a short time. It meets the demand for turning off a device automatically after a custom time duration each time it is turned on, regardless of how it is activated. |
Child lock | The child lock feature can disable the buttons on the control panel, which can prevent children from accidentally operating a device. The adult can turn off the child lock temporarily to operate the device and then turn it back on again. |
Countdown | Users can set a countdown timer to automatically turn the smart device on or off after a certain amount of time. |
Electrical component: components_lib.zip
Extract the zip file and get the components_lib
file. Configure the file according to the following steps to call interfaces and implement required features.
Add the feature lib
to the SDK.
Edit and build the code and link with the library.
Add the following command to the components.mk
in the ty_iot_bk7231n_2.3.1/apps/bk7231n_dltj_1plug_demo
.
LIBFLAGS += -L $(TOP_DIR)/components_lib/lib/ -lapp_measure_chip -lapp_uf_db
LIBFLAGS += -L $(TOP_DIR)/sdk/lib/ -ltuya_iot
TY_INC_DIRS += $(shell find $(TOP_DIR)/components_lib/include -type d)
For more information about making API calls, see each API topic in this chapter.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback