The primary unit of living space, typically composed of rooms organized into zones.


@interface HMHome : NSObject


An HMHome instance is a top-level container in HomeKit representing a structure that a user considers as a single home. Users might have multiple homes that are far apart, like a primary home and a vacation home. Or they might have two homes that are close together, but that they consider as distinct units—for example, a main home and a guest cottage on the same property.

An HMHome instance:

  • Is the main access point for communicating with and configuring accessories, like a garage door opener or a thermostat.

  • Organizes accessories into a number of rooms, which are themselves optionally grouped into zones, such as the upstairs.

  • Allows the user to define sets of actions that can be performed with a single operation, and triggers that cause an action set to be performed at a specific time.

You create a new home only in response to a specific user request, but you don’t do it directly. When the user asks your app to create a new home—for example, by tapping an Add button in your interface—your app calls the home manager’s addHomeWithName:completionHandler: method with a name that the user supplies. To get a list of existing home instances, use the homes array of the home manager (an instance of HMHomeManager).

Because HomeKit gives your app access to a shared database of home automation information, other apps can change the home’s configuration. Adopt the HMHomeDelegate protocol in your app to stay informed of any such changes that happen outside your app.


Keeping Track of Home Configuration Changes


A delegate that receives updates on the state of the home.


An interface that communicates changes to a home’s configuration.

Identifying a Home


The name the user gives to the home.

- updateName:completionHandler:

Updates the name of the home.


A unique identifier for the home.


A Boolean value that indicates whether this is the primary home for its home manager.

Dividing a House into Rooms


An array of the rooms created and managed by the user.

- roomForEntireHome

A room that represents all parts of the home that don’t have a more specific room to represent them.

- addRoomWithName:completionHandler:

Creates a new room with the specified name.

- removeRoom:completionHandler:

Removes a room from the home.


The smallest subdivision of a home’s space.

Grouping Rooms into Zones


An array of all the zones in the home.

- addZoneWithName:completionHandler:

Adds a new zone to the home.

- removeZone:completionHandler:

Removes a zone from the home.


A collection of rooms that users think of as a single area, like upstairs or downstairs.

Managing Accessories


The collection of accessories that are part of the home.

- addAndSetupAccessoriesWithCompletionHandler:

Finds and adds nearby accessories to the home.

- addAndSetupAccessoriesWithPayload:completionHandler:

Finds and adds nearby accessories to the home using a HomeKit code provided by your app.

- addAccessory:completionHandler:

Adds a new accessory to the home.

- assignAccessory:toRoom:completionHandler:

Assigns an accessory to a different room.

- removeAccessory:completionHandler:

Removes an accessory from the home.

- unblockAccessory:completionHandler:

Unblocks a blocked accessory.


A home automation accessory, like a garage door opener or a thermostat.

Grouping Services

- servicesWithTypes:

Returns an array of all services provided by accessories in the home that match the specified types.


An array of all service groups in the home.

- addServiceGroupWithName:completionHandler:

Adds a service group to the home.

- removeServiceGroup:completionHandler:

Removes a service group from the home.


A collection of accessory services.

Querying the State of a Home Hub


The state of the home hub.


The possible states of the home hub.

Creating Action Sets


An array of the action sets in the home.

- addActionSetWithName:completionHandler:

Adds a new action set to the home.

- removeActionSet:completionHandler:

Removes an action set from the home.

- executeActionSet:completionHandler:

Executes all the actions in a specified action set.

- builtinActionSetOfType:

Retrieves the builtin action set for the specified type.


A collection of actions that you trigger as a group.

Triggering an Action Set


An array of triggers defined in the home.

- addTrigger:completionHandler:

Adds a trigger to the home.

- removeTrigger:completionHandler:

Removes a trigger from the home.


A trigger to activate an action set based on a periodic timer.


A trigger to activate an action set based on a set of events and optional conditions.


An abstract base class for triggering actions based on a set of conditions.

Managing Users

- manageUsersWithCompletionHandler:

Presents a view controller to manage users of the home.


The current HomeKit user.


A person in the home who may have access to control accessories and services in the home.

Controlling User Access

- homeAccessControlForUser:

Retrieves the access level of a user associated with the home.


The access privileges of a user associated with a home.


An abstract superclass for accessing user privileges.


The key for retrieving details of what accessories failed to add or remove a user.

Deprecated Symbols


All users associated with the home.

- addUserWithCompletionHandler:

Adds a user to the home.

- removeUser:completionHandler:

Removes a user from the home.


Instance Properties


Inherits From

See Also

Working with the Home Layout


An array of all homes managed by this home manager.