Last Updated on : 2024-08-30 05:50:21download
The philosophy of homes is abstracted away from smart home scenarios. Each home encompasses a collection of devices, accounts, permissions, and other resources that are managed by app users.
Home management services support the following capabilities:
You can use the singleton class FamilyManagerCoreKit
to manage specific family business instances.
Example:
//Family Management Module, return IFamilyUseCase interface to provide the functions of the family module.
FamilyManagerCoreKit.getFamilyUseCase()
// Family Room Module, return IRoomUseCase interface to provide the functions of the family room module.
FamilyManagerCoreKit.getRoomUseCase()
// Family Member Module, return IMemberUseCase interface to provide the functions of the family member module.
FamilyManagerCoreKit.getMemberUseCase()
//Family information change listener
FamilyManagerCoreKit.registerFamilyChangeListener(listener: FamilyChangeListener)
FamilyManagerCoreKit.unregisterFamilyChangeListener(listener: FamilyChangeListener)
//Family status change listener
FamilyManagerCoreKit.registerHomeStatusListener(homeId: Long, listener: IThingHomeStatusListener)
FamilyManagerCoreKit.unregisterHomeStatusListener(homeId: Long, listener: IThingHomeStatusListener)
Error codes | Description |
---|---|
IS_BLANK | Request parameter is empty. |
OVER_LENGTH | Request parameter exceeds the length limit. |
ILLEGAL | Request parameter is invalid. |
PERMISSION_DENIED | No permission. |
PERMISSION_VALIDATE_FAILED | No permission. |
GROUP_MANAGEMENT_DISABLED | No permission to manage the home. |
NUMEN_SERVER_BUSY | Server is busy. |
API name | Error codes | Description |
---|---|---|
Create a home | USER_ROOM_NAME_OUT_LENGTH | Home name exceeds the length limit. |
Dismiss a home | GROUP_HAVE_SERVICE | Purchased value-added service exists. Dismiss denied. |
Create a default home | ACQUIRE_LOCK_FAIL | A default home already exists. Unable to create two default homes. |
GROUP_ALREADY_EXISTS | A home already exists. Unable to create a default home. | |
Modify home information | NOT_EXISTS | The home does not exist. |
ACQUIRE_LOCK_FAIL | Unable to modify the same home simultaneously. | |
Transfer a home | USER_GROUP_MEMBER_IS_DELETE | The user is not a member of the home. |
ALREADY_GROUP_OWNER | The user is already the home owner. | |
USER_NOT_ACCEPT | The user does not accept the home invitation. | |
Remove a home member | REMOVE_ALL_BEFORE_LEAVING | Only one member exists in the home. Deleting is not allowed. |
Add a home member | MEMBER_FOR_ACCOUNT_NOT_EMPTY | User account cannot be empty when adding an admin or custom user. |
CAN_NOT_ADD_NOT_SMART_HOME_VERSION_USER | Unable to add a member who uses an app based on Smart Life App SDKs earlier than v3.0. | |
USER_IS_IN_FAMILY_GROUP | The user is already a member of the home. | |
GROUP_NOT_EXIST | The home does not exist. | |
Update member information | USER_NOT_EXISTS | The user does not exist. |
USER_NOT_ACCEPT | The user does not accept the home invitation. | |
USER_GROUP_MEMBER_IS_DELETE | The user is not a member of the home. | |
Link an account | CAN_NOT_ADD_NOT_SMART_HOME_VERSION_USER | Unable to add a member who uses an app based on Smart Life App SDKs earlier than v3.0. |
USER_IS_IN_FAMILY_GROUP | The user is already a member of the home. | |
GROUP_NOT_EXIST | The home does not exist. | |
Invite a member | INVITATION_CODE_FOR_LOCATION_OVER_LIMIT | The number of invitation codes exceeds the limit. |
Add a member with an invitation code | REACH_ACCESS_LIMIT | The number of invitation codes exceeds the limit. |
USER_NOT_EXISTS | The user does not exist. | |
GROUP_NOT_EXIST | The home does not exist. | |
USER_IS_IN_FAMILY_GROUP | The user is already a member of the home. | |
Invite a member again | INVITATION_CODE_INVALID_OR_NOT_EXIST | The invitation code does not exist. |
Add a room | NOT_EXISTS | The home does not exist. |
USER_ROOM_NAME_OUT_LENGTH | Home name exceeds the length limit. | |
ROOM_MAX_LIMIT_200 | The number of rooms exceeds the limit. | |
Organize devices or groups by room | INVALID_INPUT | Input parameter is invalid. |
Update a room name | USER_ROOM_NAME_OUT_LENGTH | Home name exceeds the length limit. |
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback