![]() |
Tuya iOS Smart Life App SDK 5.15.0
|
#import <ThingSmartLockDevice.h>
Properties | |
id< ThingSmartLockDeviceDelegate > | delegate |
![]() | |
NSString * | devId |
Returns the device id. More... | |
ThingSmartDeviceModel * | deviceModel |
Returns the model of basic device information. More... | |
id< ThingSmartDeviceDelegate > | delegate |
Definition at line 27 of file ThingSmartLockDevice.h.
- (void) addLockNormalUserWithUserName: | (NSString *) | userName | |
avatarImage: | (nullable UIImage *) | avatarImage | |
unlockRelations: | (nullable NSArray< ThingSmartLockRelationModel * > *) | unlockRelations | |
success: | (nullable ThingSuccessString) | success | |
failure: | (nullable ThingFailureError) | failure | |
新增门锁成员
userName | 用户名称 |
avatarImage | 用户头像图片 |
unlockRelations | 门锁密码关联数组 |
success | 成功回调 |
failure | 失败回调 |
- (void) addLockNormalUserWithUserName: | (NSString *) | userName | |
avatarImage: | (nullable UIImage *) | avatarImage | |
unlockRelations: | (nullable NSArray< ThingSmartLockRelationModel * > *) | unlockRelations | |
success: | (nullable ThingSuccessString) | success | |
failure: | (nullable ThingFailureError) | failure | |
新增门锁成员
userName | 用户名称 |
avatarImage | 用户头像图片 |
unlockRelations | 门锁密码关联数组 |
success | 成功回调 |
failure | 失败回调 |
- (void) createLockTempPwd: | (NSString *) | password | |
name: | (NSString *) | name | |
effectiveDate: | (NSDate *) | effectiveDate | |
invalidDate: | (NSDate *) | invalidDate | |
countryCode: | (NSString *) | countryCode | |
phone: | (NSString *) | phone | |
success: | (nullable ThingSuccessBOOL) | success | |
failure: | (nullable ThingFailureError) | failure | |
创建门锁临时密码 可以选择是否要发送短信,需要确定该 pid 的所有者预充值短信费用,否则会创建失败
password | 临时密码,纯数字,7 位 |
name | 密码标示名字 |
effectiveDate | 密码生效时间 |
invalidDate | 密码失效时间 |
countryCode | 国家码,例如 86 |
phone | 手机号码,当创建成功时,会通知给该手机用户 |
success | 成功回调 |
failure | 失败回调 |
- (void) createLockTempPwd: | (NSString *) | password | |
name: | (NSString *) | name | |
effectiveDate: | (NSDate *) | effectiveDate | |
invalidDate: | (NSDate *) | invalidDate | |
countryCode: | (NSString *) | countryCode | |
phone: | (NSString *) | phone | |
success: | (nullable ThingSuccessBOOL) | success | |
failure: | (nullable ThingFailureError) | failure | |
创建门锁临时密码 可以选择是否要发送短信,需要确定该 pid 的所有者预充值短信费用,否则会创建失败
password | 临时密码,纯数字,7 位 |
name | 密码标示名字 |
effectiveDate | 密码生效时间 |
invalidDate | 密码失效时间 |
countryCode | 国家码,例如 86 |
phone | 手机号码,当创建成功时,会通知给该手机用户 |
success | 成功回调 |
failure | 失败回调 |
- (void) createLockTempPwd: | (NSString *) | password | |
name: | (NSString *) | name | |
effectiveDate: | (NSDate *) | effectiveDate | |
invalidDate: | (NSDate *) | invalidDate | |
success: | (nullable ThingSuccessBOOL) | success | |
failure: | (nullable ThingFailureError) | failure | |
创建门锁临时密码
password | 临时密码,纯数字,7 位 |
name | 密码标示名字 |
effectiveDate | 密码生效时间 |
invalidDate | 密码失效时间 |
success | 成功回调 |
failure | 失败回调 |
- (void) createLockTempPwd: | (NSString *) | password | |
name: | (NSString *) | name | |
effectiveDate: | (NSDate *) | effectiveDate | |
invalidDate: | (NSDate *) | invalidDate | |
success: | (nullable ThingSuccessBOOL) | success | |
failure: | (nullable ThingFailureError) | failure | |
创建门锁临时密码
password | 临时密码,纯数字,7 位 |
name | 密码标示名字 |
effectiveDate | 密码生效时间 |
invalidDate | 密码失效时间 |
success | 成功回调 |
failure | 失败回调 |
- (void) deleteLockTempPwdWithPwdId: | (NSInteger) | tempPwdId | |
force: | (BOOL) | force | |
success: | (nullable ThingSuccessBOOL) | success | |
failure: | (nullable ThingFailureError) | failure | |
删除临时密码
tempPwdId | 临时密码 id |
force | 是否强制删除 yes: 不需要等门锁同步,密码列表里面就不再返回; no: 等门锁确认后,才是真的已删除,列表还会返回 |
success | 成功回调 |
failure | 失败回调 |
- (void) deleteLockTempPwdWithPwdId: | (NSInteger) | tempPwdId | |
force: | (BOOL) | force | |
success: | (nullable ThingSuccessBOOL) | success | |
failure: | (nullable ThingFailureError) | failure | |
删除临时密码
tempPwdId | 临时密码 id |
force | 是否强制删除 yes: 不需要等门锁同步,密码列表里面就不再返回; no: 等门锁确认后,才是真的已删除,列表还会返回 |
success | 成功回调 |
failure | 失败回调 |
- (void) deleteLockUserWithUserId: | (NSString *) | userId | |
success: | (nullable ThingSuccessBOOL) | success | |
failure: | (nullable ThingFailureError) | failure | |
删除门锁成员用户
userId | 用户 id |
success | 成功回调 |
failure | 失败回调 |
- (void) deleteLockUserWithUserId: | (NSString *) | userId | |
success: | (nullable ThingSuccessBOOL) | success | |
failure: | (nullable ThingFailureError) | failure | |
删除门锁成员用户
userId | 用户 id |
success | 成功回调 |
failure | 失败回调 |
- (void) fetchRemoteVoiceUnlockWithDevId: | (NSString *) | devId | |
success: | (ThingSuccessID) | success | |
failure: | (nullable ThingFailureError) | failure | |
查询音箱密码开启状态
devId | 设备ID |
success | 成功回调 |
failure | 失败回调 |
- (void) fetchRemoteVoiceUnlockWithDevId: | (NSString *) | devId | |
success: | (ThingSuccessID) | success | |
failure: | (nullable ThingFailureError) | failure | |
查询音箱密码开启状态
devId | 设备ID |
success | 成功回调 |
failure | 失败回调 |
- (void) getLockDynamicPasswordWithSuccess: | (nullable ThingSuccessString) | success | |
failure: | (nullable ThingFailureError) | failure | |
获取动态密码 get lock dynamic password
success | 成功回调 |
failure | 失败回调 |
- (void) getLockDynamicPasswordWithSuccess: | (nullable ThingSuccessString) | success | |
failure: | (nullable ThingFailureError) | failure | |
获取动态密码 get lock dynamic password
success | 成功回调 |
failure | 失败回调 |
- (void) getLockHijackRecordListWithDpCodes: | (NSArray< NSString * > *) | dpCodes | |
offset: | (NSInteger) | offset | |
limit: | (NSInteger) | limit | |
success: | (void(^)(NSArray< ThingSmartLockRecordModel * > *)) | success | |
failure: | (nullable ThingFailureError) | failure | |
获取门锁劫持记录
dpCodes | dpCodes |
offset | 分页数 |
limit | 每页限制数据条数 |
success | 成功回调 |
failure | 失败回调 |
- (void) getLockHijackRecordListWithDpCodes: | (NSArray< NSString * > *) | dpCodes | |
offset: | (NSInteger) | offset | |
limit: | (NSInteger) | limit | |
success: | (void(^)(NSArray< ThingSmartLockRecordModel * > *)) | success | |
failure: | (nullable ThingFailureError) | failure | |
获取门锁劫持记录
dpCodes | dpCodes |
offset | 分页数 |
limit | 每页限制数据条数 |
success | 成功回调 |
failure | 失败回调 |
- (void) getLockMemberListWithSuccess: | (nullable void(^)(NSArray< ThingSmartLockMemberModel * > *lockMemberModels)) | success | |
failure: | (nullable ThingFailureError) | failure | |
获取门锁成员列表
success | 成功回调 |
failure | 失败回调 |
- (void) getLockMemberListWithSuccess: | (nullable void(^)(NSArray< ThingSmartLockMemberModel * > *lockMemberModels)) | success | |
failure: | (nullable ThingFailureError) | failure | |
获取门锁成员列表
success | 成功回调 |
failure | 失败回调 |
- (void) getLockRecordListWithDpCodes: | (NSArray< NSString * > *) | dpCodes | |
offset: | (NSInteger) | offset | |
limit: | (NSInteger) | limit | |
success: | (nullable void(^)(NSArray< ThingSmartLockRecordModel * > *lockRecordModels)) | success | |
failure: | (nullable ThingFailureError) | failure | |
获取门锁记录
dpCodes | dpCodes |
offset | 分页数 |
limit | 每页限制数据条数 |
success | 成功回调 |
failure | 失败回调 |
- (void) getLockRecordListWithDpCodes: | (NSArray< NSString * > *) | dpCodes | |
offset: | (NSInteger) | offset | |
limit: | (NSInteger) | limit | |
success: | (nullable void(^)(NSArray< ThingSmartLockRecordModel * > *lockRecordModels)) | success | |
failure: | (nullable ThingFailureError) | failure | |
获取门锁记录
dpCodes | dpCodes |
offset | 分页数 |
limit | 每页限制数据条数 |
success | 成功回调 |
failure | 失败回调 |
- (void) getLockTempPwdListWithSuccess: | (nullable void(^)(NSArray< ThingSmartLockTempPwdModel * > *lockTempPwdModels)) | success | |
failure: | (nullable ThingFailureError) | failure | |
获取门锁临时密码列表
success | 成功回调 |
failure | 失败回调 |
- (void) getLockTempPwdListWithSuccess: | (nullable void(^)(NSArray< ThingSmartLockTempPwdModel * > *lockTempPwdModels)) | success | |
failure: | (nullable ThingFailureError) | failure | |
获取门锁临时密码列表
success | 成功回调 |
failure | 失败回调 |
- (void) getUnlockRecordList: | (NSInteger) | offset | |
limit: | (NSInteger) | limit | |
success: | (nullable void(^)(NSArray< ThingSmartLockRecordModel * > *lockRecordModels)) | success | |
failure: | (nullable ThingFailureError) | failure | |
获取门锁开锁记录
offset | 分页数 |
limit | 每页限制数据条数 |
success | 成功回调 |
failure | 失败回调 |
- (void) getUnlockRecordList: | (NSInteger) | offset | |
limit: | (NSInteger) | limit | |
success: | (nullable void(^)(NSArray< ThingSmartLockRecordModel * > *lockRecordModels)) | success | |
failure: | (nullable ThingFailureError) | failure | |
获取门锁开锁记录
offset | 分页数 |
limit | 每页限制数据条数 |
success | 成功回调 |
failure | 失败回调 |
- (void) removeHijackingConfigWithDevId: | (NSString *) | devId | |
dpId: | (NSString *) | dpId | |
dpValue: | (NSString *) | dpValue | |
success: | (ThingSuccessID) | success | |
failure: | (nullable ThingFailureError) | failure | |
移除防劫持设置
devId | 设备ID |
dpId | dp点 |
dpValue | dp值 |
success | 成功回调 |
failure | 失败回调 |
- (void) removeHijackingConfigWithDevId: | (NSString *) | devId | |
dpId: | (NSString *) | dpId | |
dpValue: | (NSString *) | dpValue | |
success: | (ThingSuccessID) | success | |
failure: | (nullable ThingFailureError) | failure | |
移除防劫持设置
devId | 设备ID |
dpId | dp点 |
dpValue | dp值 |
success | 成功回调 |
failure | 失败回调 |
- (void) replyRemoteUnlock: | (BOOL) | open | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | (nullable ThingFailureError) | failure | |
远程开门应答命令回复 当在门锁上触发远程开门请求后,调用该方法可以实现远程开门,正常无远程开门请求,调用此方法无作用
open | 是否开门 |
success | 下发回复成功回调 |
failure | 下发回复失败回调 |
- (void) replyRemoteUnlock: | (BOOL) | open | |
success: | (nullable ThingSuccessHandler) | success | |
failure: | (nullable ThingFailureError) | failure | |
远程开门应答命令回复 当在门锁上触发远程开门请求后,调用该方法可以实现远程开门,正常无远程开门请求,调用此方法无作用
open | 是否开门 |
success | 下发回复成功回调 |
failure | 下发回复失败回调 |
- (void) setHijackingConfigWithDevId: | (NSString *) | devId | |
dpId: | (NSString *) | dpId | |
dpValue: | (NSString *) | dpValue | |
success: | (ThingSuccessBOOL) | success | |
failure: | (nullable ThingFailureError) | failure | |
设置防劫持
devId | 设备ID |
dpId | dp点 |
dpValue | dp值 |
success | 成功回调 |
failure | 失败回调 |
- (void) setHijackingConfigWithDevId: | (NSString *) | devId | |
dpId: | (NSString *) | dpId | |
dpValue: | (NSString *) | dpValue | |
success: | (ThingSuccessBOOL) | success | |
failure: | (nullable ThingFailureError) | failure | |
设置防劫持
devId | 设备ID |
dpId | dp点 |
dpValue | dp值 |
success | 成功回调 |
failure | 失败回调 |
- (void) setRemoteVoiceUnlockWithDevId: | (NSString *) | devId | |
open: | (BOOL) | open | |
pwd: | (NSString *) | pwd | |
success: | (ThingSuccessID) | success | |
failure: | (nullable ThingFailureError) | failure | |
设置或取消音箱密码
devId | 设备ID |
open | 开关状态 |
pwd | 密码 |
success | 成功回调 |
failure | 失败回调 |
- (void) setRemoteVoiceUnlockWithDevId: | (NSString *) | devId | |
open: | (BOOL) | open | |
pwd: | (NSString *) | pwd | |
success: | (ThingSuccessID) | success | |
failure: | (nullable ThingFailureError) | failure | |
设置或取消音箱密码
devId | 设备ID |
open | 开关状态 |
pwd | 密码 |
success | 成功回调 |
failure | 失败回调 |
- (void) updateLockNormalUserWithUserId: | (NSString *) | userId | |
userName: | (nullable NSString *) | userName | |
avatarImage: | (nullable UIImage *) | avatarImage | |
unlockRelations: | (nullable NSArray< ThingSmartLockRelationModel * > *) | unlockRelations | |
success: | (nullable ThingSuccessBOOL) | success | |
failure: | (nullable ThingFailureError) | failure | |
更新门锁成员信息
userId | 用户 id |
userName | 用户名称, nil 则不修改 |
avatarImage | 用户头像图片, nil 则不修改 |
unlockRelations | 门锁密码关联数组, nil 则不修改 |
success | 成功回调 |
failure | 失败回调 |
- (void) updateLockNormalUserWithUserId: | (NSString *) | userId | |
userName: | (nullable NSString *) | userName | |
avatarImage: | (nullable UIImage *) | avatarImage | |
unlockRelations: | (nullable NSArray< ThingSmartLockRelationModel * > *) | unlockRelations | |
success: | (nullable ThingSuccessBOOL) | success | |
failure: | (nullable ThingFailureError) | failure | |
更新门锁成员信息
userId | 用户 id |
userName | 用户名称, nil 则不修改 |
avatarImage | 用户头像图片, nil 则不修改 |
unlockRelations | 门锁密码关联数组, nil 则不修改 |
success | 成功回调 |
failure | 失败回调 |
|
readwritenonatomicweak |
Definition at line 29 of file ThingSmartLockDevice.h.