Package apple.homekit
Class HMHome
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.homekit.HMHome
-
- All Implemented Interfaces:
NSObject
public class HMHome extends NSObject
Represents a home. This class represents a home and is the entry point to communicate and configure different accessories in the home. This is also used to manage all the rooms, zones, service groups, users, triggers, and action sets in the home. API-Since: 8.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Block_accessibilityActivateBlock_ret, NSObject.Block_accessibilityActivationPointBlock_ret, NSObject.Block_accessibilityAttributedHintBlock_ret, NSObject.Block_accessibilityAttributedLabelBlock_ret, NSObject.Block_accessibilityAttributedUserInputLabelsBlock_ret, NSObject.Block_accessibilityAttributedValueBlock_ret, NSObject.Block_accessibilityContainerTypeBlock_ret, NSObject.Block_accessibilityCustomActionsBlock_ret, NSObject.Block_accessibilityCustomRotorsBlock_ret, NSObject.Block_accessibilityDecrementBlock_ret, NSObject.Block_accessibilityElementsBlock_ret, NSObject.Block_accessibilityElementsHiddenBlock_ret, NSObject.Block_accessibilityFrameBlock_ret, NSObject.Block_accessibilityHeaderElementsBlock_ret, NSObject.Block_accessibilityHintBlock_ret, NSObject.Block_accessibilityIdentifierBlock_ret, NSObject.Block_accessibilityIncrementBlock_ret, NSObject.Block_accessibilityLabelBlock_ret, NSObject.Block_accessibilityLanguageBlock_ret, NSObject.Block_accessibilityMagicTapBlock_ret, NSObject.Block_accessibilityNavigationStyleBlock_ret, NSObject.Block_accessibilityPathBlock_ret, NSObject.Block_accessibilityPerformEscapeBlock_ret, NSObject.Block_accessibilityRespondsToUserInteractionBlock_ret, NSObject.Block_accessibilityShouldGroupAccessibilityChildrenBlock_ret, NSObject.Block_accessibilityTextualContextBlock_ret, NSObject.Block_accessibilityTraitsBlock_ret, NSObject.Block_accessibilityUserInputLabelsBlock_ret, NSObject.Block_accessibilityValueBlock_ret, NSObject.Block_accessibilityViewIsModalBlock_ret, NSObject.Block_automationElementsBlock_ret, NSObject.Block_isAccessibilityElementBlock_ret, NSObject.Block_setAccessibilityActivateBlock, NSObject.Block_setAccessibilityActivationPointBlock, NSObject.Block_setAccessibilityAttributedHintBlock, NSObject.Block_setAccessibilityAttributedLabelBlock, NSObject.Block_setAccessibilityAttributedUserInputLabelsBlock, NSObject.Block_setAccessibilityAttributedValueBlock, NSObject.Block_setAccessibilityContainerTypeBlock, NSObject.Block_setAccessibilityCustomActionsBlock, NSObject.Block_setAccessibilityCustomRotorsBlock, NSObject.Block_setAccessibilityDecrementBlock, NSObject.Block_setAccessibilityElementsBlock, NSObject.Block_setAccessibilityElementsHiddenBlock, NSObject.Block_setAccessibilityFrameBlock, NSObject.Block_setAccessibilityHeaderElementsBlock, NSObject.Block_setAccessibilityHintBlock, NSObject.Block_setAccessibilityIdentifierBlock, NSObject.Block_setAccessibilityIncrementBlock, NSObject.Block_setAccessibilityLabelBlock, NSObject.Block_setAccessibilityLanguageBlock, NSObject.Block_setAccessibilityMagicTapBlock, NSObject.Block_setAccessibilityNavigationStyleBlock, NSObject.Block_setAccessibilityPathBlock, NSObject.Block_setAccessibilityPerformEscapeBlock, NSObject.Block_setAccessibilityRespondsToUserInteractionBlock, NSObject.Block_setAccessibilityShouldGroupAccessibilityChildrenBlock, NSObject.Block_setAccessibilityTextualContextBlock, NSObject.Block_setAccessibilityTraitsBlock, NSObject.Block_setAccessibilityUserInputLabelsBlock, NSObject.Block_setAccessibilityValueBlock, NSObject.Block_setAccessibilityViewIsModalBlock, NSObject.Block_setAutomationElementsBlock, NSObject.Block_setIsAccessibilityElementBlock, NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedHMHome(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()@NotNull NSArray<? extends HMAccessory>accessories()Array of HMAccessory objects that represents all accessories added to the home.@NotNull NSArray<? extends HMActionSet>actionSets()Array of HMActionSet objects that represents all the action sets in the home.voidaddAccessoryCompletionHandler(@NotNull HMAccessory accessory, @NotNull HMHome.Block_addAccessoryCompletionHandler completion)Adds a new accessory to the home.voidaddActionSetWithNameCompletionHandler(@NotNull java.lang.String actionSetName, @NotNull HMHome.Block_addActionSetWithNameCompletionHandler completion)Adds a new action set to the home.voidaddAndSetupAccessoriesWithCompletionHandler(@NotNull HMHome.Block_addAndSetupAccessoriesWithCompletionHandler completion)Deprecated.voidaddAndSetupAccessoriesWithPayloadCompletionHandler(@NotNull HMAccessorySetupPayload payload, @NotNull HMHome.Block_addAndSetupAccessoriesWithPayloadCompletionHandler completion)Deprecated.voidaddRoomWithNameCompletionHandler(@NotNull java.lang.String roomName, @NotNull HMHome.Block_addRoomWithNameCompletionHandler completion)Adds a room to the home.voidaddServiceGroupWithNameCompletionHandler(@NotNull java.lang.String serviceGroupName, @NotNull HMHome.Block_addServiceGroupWithNameCompletionHandler completion)Adds a service group to the home.voidaddTriggerCompletionHandler(@NotNull HMTrigger trigger, @NotNull HMHome.Block_addTriggerCompletionHandler completion)Adds a trigger to the home.voidaddUserWithCompletionHandler(@NotNull HMHome.Block_addUserWithCompletionHandler completion)Deprecated.voidaddZoneWithNameCompletionHandler(@NotNull java.lang.String zoneName, @NotNull HMHome.Block_addZoneWithNameCompletionHandler completion)Adds a zone to the home.static HMHomealloc()static HMHomeallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)voidassignAccessoryToRoomCompletionHandler(@NotNull HMAccessory accessory, @NotNull HMRoom room, @NotNull HMHome.Block_assignAccessoryToRoomCompletionHandler completion)Assigns a new room for the accessory.static booleanautomaticallyNotifiesObserversForKey(@NotNull java.lang.String key)@Nullable HMActionSetbuiltinActionSetOfType(@NotNull java.lang.String actionSetType)Retrieve a built-in action set for the home.static voidcancelPreviousPerformRequestsWithTarget(@NotNull java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull java.lang.Object aTarget, @NotNull org.moe.natj.objc.SEL aSelector, @Nullable java.lang.Object anArgument)static @NotNull NSArray<java.lang.String>classFallbacksForKeyedArchiver()static @NotNull org.moe.natj.objc.ClassclassForKeyedUnarchiver()@NotNull HMUsercurrentUser()HMUser object representing the current user of the home.static java.lang.StringdebugDescription_static()@Nullable HMHomeDelegatedelegate()Delegate that receives updates on the state of the home.static java.lang.Stringdescription_static()voidexecuteActionSetCompletionHandler(@NotNull HMActionSet actionSet, @NotNull HMHome.Block_executeActionSetCompletionHandler completion)Executes all the actions within an action set.static longhash_static()@NotNull HMHomeAccessControlhomeAccessControlForUser(@NotNull HMUser user)Retrieve the access level of the user associated with the home.longhomeHubState()Specifies the state of the home hub.HMHomeinit()static NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)booleanisPrimary()Specifies whether this home is the primary home.static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static @NotNull NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(@NotNull java.lang.String key)voidmanageUsersWithCompletionHandler(@NotNull HMHome.Block_manageUsersWithCompletionHandler completion)Presents a view controller to manage users of the home.@NotNull java.lang.StringmatterControllerID()Identifier of the Matter controller associated with this home.@NotNull HMHome.Block_matterControllerXPCConnectBlock_retmatterControllerXPCConnectBlock()Block generating XPC connection on demand through which to access the Matter controller associated with this home.@NotNull java.lang.Stringname()The name of the home.static HMHomenew_objc()voidremoveAccessoryCompletionHandler(@NotNull HMAccessory accessory, @NotNull HMHome.Block_removeAccessoryCompletionHandler completion)Removes an accessory from the home.voidremoveActionSetCompletionHandler(@NotNull HMActionSet actionSet, @NotNull HMHome.Block_removeActionSetCompletionHandler completion)Removes an existing action set from the home.voidremoveRoomCompletionHandler(@NotNull HMRoom room, @NotNull HMHome.Block_removeRoomCompletionHandler completion)Removes a room from the home.voidremoveServiceGroupCompletionHandler(@NotNull HMServiceGroup group, @NotNull HMHome.Block_removeServiceGroupCompletionHandler completion)Removes a service group from the home.voidremoveTriggerCompletionHandler(@NotNull HMTrigger trigger, @NotNull HMHome.Block_removeTriggerCompletionHandler completion)Removes a trigger from the home.voidremoveUserCompletionHandler(@NotNull HMUser user, @NotNull HMHome.Block_removeUserCompletionHandler completion)Deprecated.voidremoveZoneCompletionHandler(@NotNull HMZone zone, @NotNull HMHome.Block_removeZoneCompletionHandler completion)Removes a zone from the home.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)@NotNull HMRoomroomForEntireHome()This method returns a room that represents the entire home.@NotNull NSArray<? extends HMRoom>rooms()Array of HMRoom objects that represents all rooms in the home.@NotNull NSArray<? extends HMServiceGroup>serviceGroups()Array of HMServiceGroup objects that represents all service groups in the home.@Nullable NSArray<? extends HMService>servicesWithTypes(@NotNull NSArray<java.lang.String> serviceTypes)Queries all services that match the specified types.voidsetDelegate(@Nullable HMHomeDelegate value)Delegate that receives updates on the state of the home.voidsetDelegate_unsafe(@Nullable HMHomeDelegate value)Delegate that receives updates on the state of the home.static voidsetVersion_static(long aVersion)static org.moe.natj.objc.Classsuperclass_static()booleansupportsAddingNetworkRouter()True if this home supports all of the requirements for adding a network router.@NotNull NSArray<? extends HMTrigger>triggers()Array of HMTrigger objects that represents all the triggers in the home.voidunblockAccessoryCompletionHandler(@NotNull HMAccessory accessory, @NotNull HMHome.Block_unblockAccessoryCompletionHandler completion)unblock a blocked accessory.@NotNull NSUUIDuniqueIdentifier()A unique identifier for the home.voidupdateNameCompletionHandler(@NotNull java.lang.String name, @NotNull HMHome.Block_updateNameCompletionHandler completion)This method is used to change the name of the home.@NotNull NSArray<? extends HMUser>users()Deprecated.static booleanuseStoredAccessor()Deprecated.static longversion_static()@NotNull NSArray<? extends HMZone>zones()Array of HMZone objects that represents all the zones in the home.-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivateBlock, accessibilityActivationPoint, accessibilityActivationPointBlock, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedHintBlock, accessibilityAttributedLabel, accessibilityAttributedLabelBlock, accessibilityAttributedUserInputLabels, accessibilityAttributedUserInputLabelsBlock, accessibilityAttributedValue, accessibilityAttributedValueBlock, accessibilityContainerType, accessibilityContainerTypeBlock, accessibilityCustomActions, accessibilityCustomActionsBlock, accessibilityCustomRotors, accessibilityCustomRotorsBlock, accessibilityDecrement, accessibilityDecrementBlock, accessibilityDirectTouchOptions, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsBlock, accessibilityElementsHidden, accessibilityElementsHiddenBlock, accessibilityFrame, accessibilityFrameBlock, accessibilityHeaderElementsBlock, accessibilityHint, accessibilityHintBlock, accessibilityIdentifierBlock, accessibilityIncrement, accessibilityIncrementBlock, accessibilityLabel, accessibilityLabelBlock, accessibilityLanguage, accessibilityLanguageBlock, accessibilityMagicTapBlock, accessibilityNavigationStyle, accessibilityNavigationStyleBlock, accessibilityPath, accessibilityPathBlock, accessibilityPerformEscape, accessibilityPerformEscapeBlock, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityRespondsToUserInteractionBlock, accessibilityScroll, accessibilityShouldGroupAccessibilityChildrenBlock, accessibilityTextualContext, accessibilityTextualContextBlock, accessibilityTraits, accessibilityTraitsBlock, accessibilityUserInputLabels, accessibilityUserInputLabelsBlock, accessibilityValue, accessibilityValueBlock, accessibilityViewIsModal, accessibilityViewIsModalBlock, accessibilityZoomInAtPoint, accessibilityZoomOutAtPoint, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, automationElements, automationElementsBlock, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hash, indexOfAccessibilityElement, isAccessibilityElement, isAccessibilityElementBlock, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivateBlock, setAccessibilityActivationPoint, setAccessibilityActivationPointBlock, setAccessibilityAttributedHint, setAccessibilityAttributedHintBlock, setAccessibilityAttributedLabel, setAccessibilityAttributedLabelBlock, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedUserInputLabelsBlock, setAccessibilityAttributedValue, setAccessibilityAttributedValueBlock, setAccessibilityContainerType, setAccessibilityContainerTypeBlock, setAccessibilityCustomActions, setAccessibilityCustomActionsBlock, setAccessibilityCustomRotors, setAccessibilityCustomRotorsBlock, setAccessibilityDecrementBlock, setAccessibilityDirectTouchOptions, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsBlock, setAccessibilityElementsHidden, setAccessibilityElementsHiddenBlock, setAccessibilityFrame, setAccessibilityFrameBlock, setAccessibilityHeaderElementsBlock, setAccessibilityHint, setAccessibilityHintBlock, setAccessibilityIdentifierBlock, setAccessibilityIncrementBlock, setAccessibilityLabel, setAccessibilityLabelBlock, setAccessibilityLanguage, setAccessibilityLanguageBlock, setAccessibilityMagicTapBlock, setAccessibilityNavigationStyle, setAccessibilityNavigationStyleBlock, setAccessibilityPath, setAccessibilityPathBlock, setAccessibilityPerformEscapeBlock, setAccessibilityRespondsToUserInteraction, setAccessibilityRespondsToUserInteractionBlock, setAccessibilityShouldGroupAccessibilityChildrenBlock, setAccessibilityTextualContext, setAccessibilityTextualContextBlock, setAccessibilityTraits, setAccessibilityTraitsBlock, setAccessibilityUserInputLabels, setAccessibilityUserInputLabelsBlock, setAccessibilityValue, setAccessibilityValueBlock, setAccessibilityViewIsModal, setAccessibilityViewIsModalBlock, setAutomationElements, setAutomationElementsBlock, setIsAccessibilityElement, setIsAccessibilityElementBlock, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, storedValueForKey, superclass, takeStoredValueForKey, takeValueForKey, takeValueForKeyPath, takeValuesFromDictionary, unableToSetNilForKey, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, valuesForKeys, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static HMHome alloc()
-
allocWithZone
public static HMHome allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(@NotNull @NotNull java.lang.String key)
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(@NotNull @NotNull java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull @NotNull java.lang.Object aTarget, @NotNull @NotNull org.moe.natj.objc.SEL aSelector, @Nullable @Nullable java.lang.Object anArgument)
-
classFallbacksForKeyedArchiver
@NotNull public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
@NotNull public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
description_static
public static java.lang.String description_static()
-
hash_static
public static long hash_static()
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
instanceMethodSignatureForSelector
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
-
instancesRespondToSelector
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
-
isSubclassOfClass
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
-
keyPathsForValuesAffectingValueForKey
@NotNull public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(@NotNull @NotNull java.lang.String key)
-
new_objc
public static HMHome new_objc()
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
setVersion_static
public static void setVersion_static(long aVersion)
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
version_static
public static long version_static()
-
accessories
@NotNull public @NotNull NSArray<? extends HMAccessory> accessories()
Array of HMAccessory objects that represents all accessories added to the home.
-
actionSets
@NotNull public @NotNull NSArray<? extends HMActionSet> actionSets()
Array of HMActionSet objects that represents all the action sets in the home.
-
addAccessoryCompletionHandler
public void addAccessoryCompletionHandler(@NotNull @NotNull HMAccessory accessory, @NotNull @NotNull HMHome.Block_addAccessoryCompletionHandler completion)Adds a new accessory to the home.- Parameters:
accessory- Accessory to add to the home.completion- Block that is invoked once the request is processed. The NSError provides more information on the status of the request, error will be nil on success.
-
addActionSetWithNameCompletionHandler
public void addActionSetWithNameCompletionHandler(@NotNull @NotNull java.lang.String actionSetName, @NotNull @NotNull HMHome.Block_addActionSetWithNameCompletionHandler completion)Adds a new action set to the home.- Parameters:
actionSetName- Name of the action set to add to the home.completion- Block that is invoked once the request is processed. The HMActionSet parameter is the new action set added to the home. The NSError provides more information on the status of the request, error will be nil on success.
-
addAndSetupAccessoriesWithCompletionHandler
@Deprecated public void addAndSetupAccessoriesWithCompletionHandler(@NotNull @NotNull HMHome.Block_addAndSetupAccessoriesWithCompletionHandler completion)Deprecated.Find nearby accessories and add them to the home. During this process, each of the accessories added to the home is assigned to a room and its services are configured.- Parameters:
completion- Block that is invoked once the request is processed. The NSError provides more information on the status of the request, error will be nil on success. API-Since: 10.0 Deprecated-Since: 15.4 Deprecated-Message: Use -[HMAccessorySetupManager performAccessorySetupUsingRequest:completionHandler:] instead
-
addRoomWithNameCompletionHandler
public void addRoomWithNameCompletionHandler(@NotNull @NotNull java.lang.String roomName, @NotNull @NotNull HMHome.Block_addRoomWithNameCompletionHandler completion)Adds a room to the home.- Parameters:
roomName- Name of the room to add to the home.completion- Block that is invoked once the request is processed. The HMRoom is the new room added to the home. The NSError provides more information on the status of the request, error will be nil on success.
-
addServiceGroupWithNameCompletionHandler
public void addServiceGroupWithNameCompletionHandler(@NotNull @NotNull java.lang.String serviceGroupName, @NotNull @NotNull HMHome.Block_addServiceGroupWithNameCompletionHandler completion)Adds a service group to the home.- Parameters:
serviceGroupName- Name of the service group to add to the home.completion- Block that is invoked once the request is processed. The HMServiceGroup is the new service group added to the home. The NSError provides more information on the status of the request, error will be nil on success.
-
addTriggerCompletionHandler
public void addTriggerCompletionHandler(@NotNull @NotNull HMTrigger trigger, @NotNull @NotNull HMHome.Block_addTriggerCompletionHandler completion)Adds a trigger to the home. Unless the trigger object is added to the home, it cannot be activated. Throws error and will not be added to home if there is no Home Hub associated with the home Triggers are specific to an iOS device and are not synced across multiple devices to ensure that the action sets are executed only once.- Parameters:
trigger- Trigger to add to the home.completion- Block that is invoked once the request is processed. The HMTrigger parameter is the new trigger added to the home. The NSError provides more information on the status of the request, error will be nil on success. Errors when no Home Hub is associated with the home
-
addUserWithCompletionHandler
@Deprecated public void addUserWithCompletionHandler(@NotNull @NotNull HMHome.Block_addUserWithCompletionHandler completion)Deprecated.Adds a user to the home.- Parameters:
completion- Block that is invoked once the request is processed. The HMUser object provides a reference to the user that was added to the home. The NSError provides more information on the status of the request, error will be nil on success. The userInfo dictionary will contain the HMUserFailedAccessoriesKey which provides more details on the accessories that failed to add the user. API-Since: 8.0 Deprecated-Since: 9.0
-
addZoneWithNameCompletionHandler
public void addZoneWithNameCompletionHandler(@NotNull @NotNull java.lang.String zoneName, @NotNull @NotNull HMHome.Block_addZoneWithNameCompletionHandler completion)Adds a zone to the home.- Parameters:
zoneName- Name of the zone to add to the home.completion- Block that is invoked once the request is processed. The HMZone is the new zone added to the home. The NSError provides more information on the status of the request, error will be nil on success.
-
assignAccessoryToRoomCompletionHandler
public void assignAccessoryToRoomCompletionHandler(@NotNull @NotNull HMAccessory accessory, @NotNull @NotNull HMRoom room, @NotNull @NotNull HMHome.Block_assignAccessoryToRoomCompletionHandler completion)Assigns a new room for the accessory. When an accessory is added to a home, it is automatically assigned the room corresponding to + [HMHome roomForEntireHome]. This method is used to change the room assigned to an accessory.- Parameters:
accessory- Accessory whose rooms needs to modifiedroom- New room for the accessory.completion- Block that is invoked once the request is processed. The NSError provides more information on the status of the request, error will be nil on success.
-
builtinActionSetOfType
@Nullable public @Nullable HMActionSet builtinActionSetOfType(@NotNull @NotNull java.lang.String actionSetType)
Retrieve a built-in action set for the home.- Parameters:
actionSetType- Type of the builtin action set. Supported action set types are HMActionSetTypeWakeUp, HMActionSetTypeSleep, HMActionSetTypeHomeDeparture and HMActionSetTypeHomeArrival.- Returns:
- Reference to the built-in action set corresponding to type argument, nil if no matching action set is found. API-Since: 9.0
-
currentUser
@NotNull public @NotNull HMUser currentUser()
HMUser object representing the current user of the home. API-Since: 9.0
-
delegate
@Nullable public @Nullable HMHomeDelegate delegate()
Delegate that receives updates on the state of the home.
-
executeActionSetCompletionHandler
public void executeActionSetCompletionHandler(@NotNull @NotNull HMActionSet actionSet, @NotNull @NotNull HMHome.Block_executeActionSetCompletionHandler completion)Executes all the actions within an action set.- Parameters:
actionSet- Action set to execute.completion- Block that is invoked once the request is processed. The NSError provides more information on the status of the request, error will be nil on success.
-
homeAccessControlForUser
@NotNull public @NotNull HMHomeAccessControl homeAccessControlForUser(@NotNull @NotNull HMUser user)
Retrieve the access level of the user associated with the home. API-Since: 9.0
-
isPrimary
public boolean isPrimary()
Specifies whether this home is the primary home.
-
manageUsersWithCompletionHandler
public void manageUsersWithCompletionHandler(@NotNull @NotNull HMHome.Block_manageUsersWithCompletionHandler completion)Presents a view controller to manage users of the home. This API is available only for users that have administrator access to the home.- Parameters:
completion- Block that is invoked once user management is completed. The completion block is fired to allow clients to know when the user has dismissed the view. The NSError provides more information on the status of the request, error will be nil on success. If the user does not have administrator privileges the error code will be set to HMErrorCodeInsufficientPrivileges. API-Since: 9.0
-
name
@NotNull public @NotNull java.lang.String name()
The name of the home.
-
removeAccessoryCompletionHandler
public void removeAccessoryCompletionHandler(@NotNull @NotNull HMAccessory accessory, @NotNull @NotNull HMHome.Block_removeAccessoryCompletionHandler completion)Removes an accessory from the home.- Parameters:
accessory- Accessory to remove from the home.completion- Block that is invoked once the request is processed. The NSError provides more information on the status of the request, error will be nil on success.
-
removeActionSetCompletionHandler
public void removeActionSetCompletionHandler(@NotNull @NotNull HMActionSet actionSet, @NotNull @NotNull HMHome.Block_removeActionSetCompletionHandler completion)Removes an existing action set from the home.- Parameters:
actionSet- Action set to remove from the home. A builtin action set cannot be removed.completion- Block that is invoked once the request is processed. The NSError provides more information on the status of the request, error will be nil on success.
-
removeRoomCompletionHandler
public void removeRoomCompletionHandler(@NotNull @NotNull HMRoom room, @NotNull @NotNull HMHome.Block_removeRoomCompletionHandler completion)Removes a room from the home. Any references to this room will be removed from all properties of the home. For example, the room will be removed from the zone. Any accessories associated contained by this room will be moved to the room provided by - [HMHome roomForEntireHome].- Parameters:
room- Room to remove from the home.completion- Block that is invoked once the request is processed. The NSError provides more information on the status of the request, error will be nil on success.
-
removeServiceGroupCompletionHandler
public void removeServiceGroupCompletionHandler(@NotNull @NotNull HMServiceGroup group, @NotNull @NotNull HMHome.Block_removeServiceGroupCompletionHandler completion)Removes a service group from the home.- Parameters:
group- Service group to remove from the home.completion- Block that is invoked once the request is processed. The NSError provides more information on the status of the request, error will be nil on success.
-
removeTriggerCompletionHandler
public void removeTriggerCompletionHandler(@NotNull @NotNull HMTrigger trigger, @NotNull @NotNull HMHome.Block_removeTriggerCompletionHandler completion)Removes a trigger from the home. If the trigger is active, they are automatically deactivated.- Parameters:
trigger- Trigger to remove from the home.completion- Block that is invoked once the request is processed. The NSError provides more information on the status of the request, error will be nil on success.
-
removeUserCompletionHandler
@Deprecated public void removeUserCompletionHandler(@NotNull @NotNull HMUser user, @NotNull @NotNull HMHome.Block_removeUserCompletionHandler completion)Deprecated.Removes a user from the home.- Parameters:
user- HMUser whose access is being revoked.completion- Block that is invoked once the request is processed. The NSError provides more information on the status of the request, error will be nil on success. The userInfo dictionary will contain the HMUserFailedAccessoriesKey which provides more details on the accessories that failed to remove the user. API-Since: 8.0 Deprecated-Since: 9.0
-
removeZoneCompletionHandler
public void removeZoneCompletionHandler(@NotNull @NotNull HMZone zone, @NotNull @NotNull HMHome.Block_removeZoneCompletionHandler completion)Removes a zone from the home.- Parameters:
zone- Zone to remove from the home.completion- Block that is invoked once the request is processed. The NSError provides more information on the status of the request, error will be nil on success.
-
roomForEntireHome
@NotNull public @NotNull HMRoom roomForEntireHome()
This method returns a room that represents the entire home. This can be used to assign a room to a service that is not necessarily located in one particular room.- Returns:
- HMRoom that represents the home.
-
rooms
@NotNull public @NotNull NSArray<? extends HMRoom> rooms()
Array of HMRoom objects that represents all rooms in the home.
-
serviceGroups
@NotNull public @NotNull NSArray<? extends HMServiceGroup> serviceGroups()
Array of HMServiceGroup objects that represents all service groups in the home.
-
servicesWithTypes
@Nullable public @Nullable NSArray<? extends HMService> servicesWithTypes(@NotNull @NotNull NSArray<java.lang.String> serviceTypes)
Queries all services that match the specified types.- Parameters:
serviceTypes- Array of NSString objects that specifies the service types to match.- Returns:
- Array of HMService objects that match the specified service types, nil if no matching services were found.
-
setDelegate_unsafe
public void setDelegate_unsafe(@Nullable @Nullable HMHomeDelegate value)Delegate that receives updates on the state of the home.
-
setDelegate
public void setDelegate(@Nullable @Nullable HMHomeDelegate value)Delegate that receives updates on the state of the home.
-
triggers
@NotNull public @NotNull NSArray<? extends HMTrigger> triggers()
Array of HMTrigger objects that represents all the triggers in the home.
-
unblockAccessoryCompletionHandler
public void unblockAccessoryCompletionHandler(@NotNull @NotNull HMAccessory accessory, @NotNull @NotNull HMHome.Block_unblockAccessoryCompletionHandler completion)unblock a blocked accessory. A misbehaving accessory will automatically be blocked. After that all requests to the accessory will fail. This API must be used to explicitly unblock the accessory- Parameters:
accessory- accessory to be unblockedcompletion- Block that is invoked once the request is processed. The NSError provides more information on the status of the request, error will be nil on success.
-
uniqueIdentifier
@NotNull public @NotNull NSUUID uniqueIdentifier()
A unique identifier for the home. API-Since: 9.0
-
updateNameCompletionHandler
public void updateNameCompletionHandler(@NotNull @NotNull java.lang.String name, @NotNull @NotNull HMHome.Block_updateNameCompletionHandler completion)This method is used to change the name of the home.- Parameters:
name- New name for the home.completion- Block that is invoked once the request is processed. The NSError provides more information on the status of the request, error will be nil on success.
-
users
@NotNull @Deprecated public @NotNull NSArray<? extends HMUser> users()
Deprecated.Array of HMUser objects that represent all users associated with the home. API-Since: 8.0 Deprecated-Since: 9.0 Deprecated-Message: No longer supported.
-
zones
@NotNull public @NotNull NSArray<? extends HMZone> zones()
Array of HMZone objects that represents all the zones in the home.
-
homeHubState
public long homeHubState()
Specifies the state of the home hub. API-Since: 11.0
-
addAndSetupAccessoriesWithPayloadCompletionHandler
@Deprecated public void addAndSetupAccessoriesWithPayloadCompletionHandler(@NotNull @NotNull HMAccessorySetupPayload payload, @NotNull @NotNull HMHome.Block_addAndSetupAccessoriesWithPayloadCompletionHandler completion)Deprecated.Add accessory with the given setup payload to the home. [@note] This SPI requires entitlement: com.apple.developer.homekit.allow-setup-payload- Parameters:
completion- Block that is invoked once the request is processed. Accessories provides the list of added accessories. The NSError provides more information on the status of the request, error will be nil on success. API-Since: 11.3 Deprecated-Since: 15.0 Deprecated-Message: Use -[HMAccessorySetupManager performAccessorySetupUsingRequest:completionHandler:] instead
-
supportsAddingNetworkRouter
public boolean supportsAddingNetworkRouter()
True if this home supports all of the requirements for adding a network router. API-Since: 13.2
-
matterControllerID
@NotNull public @NotNull java.lang.String matterControllerID()
Identifier of the Matter controller associated with this home. This property can be passed as the first argument to +[MTRDeviceController sharedControllerWithId:xpcConnectBlock:] method to get a MTRDeviceController object. API-Since: 16.1
-
matterControllerXPCConnectBlock
@NotNull public @NotNull HMHome.Block_matterControllerXPCConnectBlock_ret matterControllerXPCConnectBlock()
Block generating XPC connection on demand through which to access the Matter controller associated with this home. This property can be passed as the second argument to +[MTRDeviceController sharedControllerWithId:xpcConnectBlock:] method to get a MTRDeviceController object. API-Since: 16.1
-
useStoredAccessor
@Deprecated public static boolean useStoredAccessor()
Deprecated.
-
-