TuyaHomeSdkFlutter class
Methods
-
addHomeWithName({required String name, required String geoName, List<String> rooms = const [''], double latitude = 0.0, double longitude = 0.0})
→ Future<num?>
-
Adds a home with the specified name, geographical name, rooms, latitude, and longitude.
-
assignDeviceToRoom({required String deviceId, required num homeId, required num roomId})
→ Future<bool>
-
Assigns a device to a room in the Tuya Home SDK.
-
checkCodeWithUserName({required String username, required String countryCode, required String code, required int type})
→ Future<bool>
-
Checks a verification code with a given username, country code, code, and type.
-
discoverDeviceInfo()
→ Future<ThingSmartDeviceModel?>
-
Discovers device information.
-
getHomeDevices({required num homeId})
→ Future<List<ThingSmartDeviceModel>>
-
Retrieves a list of devices associated with a specific home ID.
-
getHomeList()
→ Future<List<ThingSmartHomeModel>>
-
Retrieves a list of ThingSmartHomeModel objects representing the homes associated with the user.
-
getHomeRooms({required num homeId})
→ Future<List<ThingSmartRoomModel>>
-
Retrieves the list of rooms in a home.
-
getToken({required num homeId})
→ Future<String?>
-
Retrieves the token for a specific home ID.
-
getUserInfo()
→ Future<ThingSmartUserModel?>
-
Retrieves the user information from the Tuya Home SDK.
-
getWifiSsid()
→ Future<String?>
-
Retrieves the SSID (Service Set Identifier) of the currently connected Wi-Fi network.
-
initSdk(String appKey, String appSecret, String key, {bool isDebug = kDebugMode})
→ Future<void>
-
Initializes the Tuya Home SDK with the provided app key and app secret.
-
loginWithUserName({required String username, required String countryCode, required String password})
→ Future<bool>
-
Logs in a user with the provided username, country code, and password.
-
logout()
→ Future<bool>
-
Logs out the user from the Tuya Home SDK.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
onDeviceDpsUpdated({required String deviceId})
→ Stream
-
Listens for device DPS updates.
-
publishDps({required String deviceId, required Map<String, dynamic> dps})
→ Future<bool>
-
Publishes device data points to a specific device using the Tuya Home SDK Flutter.
-
registerByUserName({required String username, required String countryCode, required String code, required String password})
→ Future<bool>
-
Registers a user by username.
-
removeDevice({required String deviceId})
→ Future<bool>
-
Removes a device with the specified device ID.
-
removeHome({required num homeId})
→ Future<bool>
-
Removes a home with the specified home ID.
-
requestHomeToken({required num homeId})
→ Future<String?>
-
-
resetPasswordByEmail({required String username, required String countryCode, required String code, required String password})
→ Future<bool>
-
Resets a user's password with the provided username, country code, code, and password.
-
sendVerifyCodeWithUserName({required String username, required String countryCode, required int type})
→ Future<bool>
-
Sends a verification code to a user's username with the specified country code and type.
-
startConfigBLEWifiDevice({required String ssid, required String password, required num homeId, required String deviceUuid, required String deviceProductId, int timeout = 3000})
→ Future<ThingSmartDeviceModel?>
-
Starts the configuration process for a BLE WiFi device.
-
startConfigWiFiDevice({required String ssid, required String password, required String token, int timeout = 3000})
→ Future<ThingSmartDeviceModel?>
-
Starts the configuration process for a WiFi device.
-
toString()
→ String
-
A string representation of this object.
inherited
-
updateHome({required num homeId, required String name, required String geoName, required List<String> rooms, double latitude = 0.0, double longitude = 0.0})
→ Future<bool>
-
Updates a home with the specified parameters.
-
updateUserIcon({String? icon})
→ Future<ThingSmartUserModel?>
-
Updates the user icon with the provided
icon
.
-
updateUserNickName({String? nickname})
→ Future<ThingSmartUserModel?>
-
Updates the nickname of the user.