getCurrentHomeInfo
Requires:
HomeKit≥1.0.4@ray-js/ray≥1.2.10
Platforms:
iOSAndroid
Method signature
getCurrentHomeInfo(params: )Minimum SDK versions
- iOS
ThingSmartHomeKitBizBundle - ≥ 5.2.0
- Android
com.thingclips.smart:thingsmart-bizbundle-homekit - ≥ 5.2.0
Description
Get current home information
Parameters
| Property | Type | Required | Description |
|---|---|---|---|
complete | () => void | No | Completion callback (executed on both success and failure) |
success | (params: Object) => void | No | Callback on successful API call |
fail | (params: Object) => void | No | Failure callback |
success callback parameters
| Property | Type | Description | HomeKit Since | Minimum SDK versions |
|---|---|---|---|---|
homeName | string | Home name | v3.0.3 | — |
homeId | string | Home ID | v3.0.3 | — |
longitude | string | Longitude | v3.0.3 | — |
latitude | string | Latitude | v3.0.3 | — |
address | string | Detailed address | v3.0.3 | — |
admin | boolean | Is admin true: admin; false: not admin | v3.0.3 | — |
mode | number | Home mode, values from ThingSmartHomeMode | v3.7.8 |
|
role | number | Home role, values from ThingSmartHomeRole | v3.7.12 |
|
fail callback parameters
| Property | Type | Description |
|---|---|---|
errorMsg | string | Error message |
errorCode | string | number | Error code |
| Error extension |
Return Value
None