- Inheritance
-
- Object
- PlatformInterface
- TuyaFlutterHaSdkPlatform
- Implementers
Properties
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addDeviceToRoom({required int homeId, required int roomId, required String devId})
→ Future<void>
-
Add a given device to a room
-
addGroupToRoom({required int homeId, required int roomId, required int groupId})
→ Future<void>
-
Add a group to a given room
-
addRoom({required int homeId, required String roomName})
→ Future<void>
-
Add a room to a home
-
checkIfMatter({required String devId})
→ Future<bool>
-
Check if a device is matter device or not
-
checkLogin()
→ Future<bool>
-
Checks if any user is logged in currently.
returns true if logged in and false if not logged in
-
connectDeviceAndQueryWifiList({required int timeout})
→ Future<void>
-
Connects to device AP and queries Wi-Fi networks (AP+ flow).
-
controlMatter({required String devId, required Map<String, dynamic> dps})
→ Future<void>
-
Send dps configuration to control the wifi device
-
createHome({required String name, String? geoName, List<String>? rooms, double? latitude, double? longitude})
→ Future<int>
-
Creates a new home.
name,geoName,rooms,latitude,longitude details are passed on to the native
Returns the new home ID.
-
deleteAccount()
→ Future<void>
-
Deletes the current user account.
-
deleteHome({required int homeId})
→ Future<void>
-
Deletes a home by ID.
-
discoverDeviceInfo()
→ Future<Map<String, dynamic>?>
-
Scans for the first inactivated BLE device advertising Tuya packets.
Returns its raw JSON map, or null if none found.
-
dynamicWifiLockPassword({required String devId})
→ Future<String>
-
Get a dynamic password for opening a wifi lock
-
getCurrentUser()
→ Future<Map<String, dynamic>>
-
Get the current user’s info. Throws if no user is logged in.
returns a map with all the user details
-
getHomeDevices({required int homeId})
→ Future<List<Map<String, dynamic>>>
-
Gets all devices for the given homeId.
-
getHomeList()
→ Future<List<Map<String, dynamic>>>
-
Retrieves a list of all homes.
-
getPlatformVersion()
→ Future<String?>
-
Returns the platform version, e.g. "iOS 18.5" or "Android 12".
-
getRoomList({required int homeId})
→ Future<List<Map<String, dynamic>>?>
-
Get rooms details for a home
-
getSSID()
→ Future<String?>
-
Retrieves the current Wi-Fi SSID.
-
getToken({required int homeId})
→ Future<String?>
-
Retrieves a pairing token for the given homeId.
-
initDevice({required String devId})
→ Future<void>
-
Init the device
-
lockBLELock({required String devId})
→ Future<void>
-
Lock a bluetooth lock device
-
loginWithUid({required String countryCode, required String uid, required String password, required bool createHome})
→ Future<Map<String, dynamic>>
-
Login (or register) with UID.
countryCode,uid,password,createHome details are passed on to the native
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
pairBleDevice({required String uuid, required String productId, required int homeId, int? deviceType, String? address, int? flag, int? timeout})
→ Future<Map<String, dynamic>?>
-
Activate (pair) a pure-BLE device with the cloud.
-
queryDeviceInfo({required String devId, List<String>? dps})
→ Future<Map<String, dynamic>?>
-
Query information about a device
-
queryDeviceWiFiStrength({required String devId})
→ Future<String?>
-
Get the signal strength of a specific device
-
querySubDeviceList({required String devId})
→ Future<Map<String, dynamic>?>
-
Query details of any sub devices
-
removeDevice({required String devId})
→ Future<void>
-
Remove a specific device
-
removeDeviceFromRoom({required int homeId, required int roomId, required String devId})
→ Future<void>
-
Remove device from a given room
-
removeGroupFromRoom({required int homeId, required int roomId, required int groupId})
→ Future<void>
-
Remove a group from a given room
-
removeRoom({required int homeId, required int roomId})
→ Future<void>
-
Remove room from a home
-
renameDevice({required String devId, required String name})
→ Future<void>
-
Rename a specific device
-
restoreFactoryDefaults({required String devId})
→ Future<void>
-
Restore factory defaults for a specific device
-
resumeAPPlus({required String ssid, required String password, required String token, required int timeout})
→ Future<void>
-
Completes AP+ pairing with SSID/password/token.
-
sortRooms({required int homeId, required List<int> roomIds})
→ Future<void>
-
Sort the order of rooms in a home
-
startComboPairing({required String uuid, required String productId, required int homeId, required String ssid, required String password, int? timeout, int? deviceType, String? address, String? token, int? flag})
→ Future<Map<String, dynamic>?>
-
Start combo (BLE→Wi-Fi) pairing for a device.
-
startConfigWiFi({required String mode, required String ssid, required String password, required String token, required int timeout})
→ Future<void>
-
Starts EZ or AP Wi-Fi pairing.
-
stopConfigWiFi()
→ Future<void>
-
Stops any ongoing Wi-Fi pairing.
-
toString()
→ String
-
A string representation of this object.
inherited
-
tuyaSdkInit({required String appKey, required String appSecret, required bool isDebug})
→ Future<void>
-
Perform native-side initialization of the Tuya SDK.
appKey and appSecret must match the current platform.
-
unlockBLELock({required String devId})
→ Future<void>
-
Unlock a bluetooth lock device
-
unlockWifiLock({required String devId, required bool open})
→ Future<void>
-
Reply to a unlock request on wifi lock
-
updateHomeInfo({required int homeId, required String homeName, String? geoName, double? latitude, double? longitude})
→ Future<void>
-
Updates home information.
homeId,homeName,geoName,latitude,longitude details are passed on to the native
-
updateLocation({required double latitude, required double longitude})
→ Future<void>
-
Updates the user’s location (latitude, longitude).
-
updateNickname({required String nickname})
→ Future<void>
-
Updates the current user’s nickname.
nickname is passed on to the native
-
updateRoomName({required int homeId, required int roomId, required String roomName})
→ Future<void>
-
Update the name of a given room
-
updateTempUnit({required int tempUnit})
→ Future<void>
-
Changes the user’s temperature unit preference.
tempUnit is passed on to the native
-
updateTimeZone({required String timeZoneId})
→ Future<void>
-
Updates the user’s time zone.
timeZoneId is passed on to the native
-
userLogout()
→ Future<void>
-
Logs out the current user.