Device Initialization

Last Updated on : 2023-05-19 09:19:04download

The initialization of a central control device consists of gateway initialization and central control service initialization.

Gateway initialization

For more information, see Gateway Initialization.

Central control service initialization

Function prototype OPERATE_RET tuya_home_init(IN CHAR_T *db_path, IN TUYA_HOME_CONTROL_ALL_INFO_SYNC_CB all_info_sync_cb)
Function description Central control service initialization
Parameter db_path: The path of the database.
all_info_sync_cb: The sync callback.
Return value OPERATE_RET:
  • 0: Success.
  • Other values: Failure. See the error code.