iOS Guides | Samples

HomeKit Namespace

The HomeKit namespace provides control of and access to home automation devices.

Remarks

The HomeKit namespace, introduced in iOS 8, provides control and access of home automation devices.

Home automation with Home Kit relies on Apple's Home Automation Protocol. Home Kit allows applications to:

  • Discover accessories and services and add them to a persistent configuration store.
  • Read and write the persistent configuration store.
  • Communicate with accessories and services.

Many HomeKit objects have a UniqueIdentifier property. This property may be thought of as a key in an internal database. It is persistent as long as the object in question is not removed from the HMHome. If the object is re-added, it will have a different identifier, even if it's values are identical.

Classes

TypeReason
HMAccessControl
HMAccessoryA home automation accessory controllable by Home Kit.
HMAccessoryBrowserBrowses and discovers HMAccessory objects.
HMAccessoryBrowserDelegateDelegate object for HMAccessoryBrowser objects, provides methods called when accessories are discovered or removed.
HMAccessoryBrowserDelegate_ExtensionsExtension methods to the IHMAccessoryBrowserDelegate interface to support all the methods from the HMAccessoryBrowserDelegate protocol.
HMAccessoryBrowserEventArgsProvides data for the HMAccessoryBrowserEventArgs.DidFindNewAccessory and HMAccessoryBrowserEventArgs.DidRemoveNewAccessory events.
HMAccessoryCategoryCombines the HomeKit.HKAccessoryCategoryType with a localized description.
HMAccessoryCategoryTypeEnumerates the kind of accessories supported by HomeKit.
HMAccessoryCategoryTypeExtensions
HMAccessoryDelegateDelegate object for HMAccessory objects, provides methods called when characteristics of the accessory change.
HMAccessoryDelegate_ExtensionsExtension methods to the IHMAccessoryDelegate interface to support all the methods from the HMAccessoryDelegate protocol.
HMAccessoryFirmwareVersionEventArgsProvides data for the HMAccessoryFirmwareVersionEventArgs.DidUpdateFirmwareVersion event.
HMAccessoryProfileAssociates an HMAccessory with a unique identifier and an array of HMService services.
HMAccessoryProfileEventArgsProvides data for the HMAccessoryProfileEventArgs.DidAddProfile and HMAccessoryProfileEventArgs.DidRemoveProfile events.
HMAccessoryServiceUpdateCharacteristicEventArgsProvides data for the HMAccessoryServiceUpdateCharacteristicEventArgs.DidUpdateValueForCharacteristic event.
HMAccessorySetupPayload
HMAccessoryUpdateEventArgsProvides data for the HMAccessoryUpdateEventArgs.DidUpdateAssociatedServiceType and HMAccessoryUpdateEventArgs.DidUpdateNameForService events.
HMActionAbstract base class for objects that perform actions within Home Kit.
HMActionSetAggregates HMAction objects and applies them as a single action.
HMActionSetTypeEnumerates the different kinds of HMActionSet.
HMCalendarEventAn HMTimeEvent that fires at a specified date.
HMCameraAudioControlA HMCameraControl that has audio capabilities (either one- or two-way).
HMCameraAudioStreamSettingSettings for camera's with audio devices. Used with HMCameraStream.AudioSetting.
HMCameraControlBase class for controls of video cameras.
HMCameraProfileA HMAccessoryProfile describing a video camera.
HMCameraSettingsControlThe HMCameraControl that describes the camera's aiming and zooming capabilities.
HMCameraSnapshotA HMCameraSource that represents a still image captured by a camera.
HMCameraSnapshotControlA HMCameraControl that manages the taking of a still image with a video camera.
HMCameraSnapshotControlDelegateDelegate object that responds to requests for snapshot requests from a HMCameraControl object.
HMCameraSnapshotControlDelegate_ExtensionsExtension methods to the IHMCameraSnapshotControlDelegate interface to support all the methods from the HMCameraSnapshotControlDelegate protocol.
HMCameraSourceAbstract base class for HomeKit-enabled cameras.
HMCameraStreamAn HMCameraSource that represents a camera video stream.
HMCameraStreamControlA HMCameraControl that manages video streaming from the camera.
HMCameraStreamControlDelegateDelegate object that responds to HMCameraStreamControl start and stop events.
HMCameraStreamControlDelegate_ExtensionsExtension methods to the IHMCameraStreamControlDelegate interface to support all the methods from the HMCameraStreamControlDelegate protocol.
HMCameraStreamStateEnumerates the states of an HMCameraStream.
HMCameraViewA standard UIView for viewing HomeKit-connected video cameras.
HMCameraView+HMCameraViewAppearanceAppearance class for objects of type HMCameraView.
HMCharacteristicA characteristic of a HMService that has a HMCharacteristics.Value.
HMCharacteristicEventAn HMEvent triggered when the HMCharacteristicEvent.Characteristic crosses the HMCharacteristicEvent.TriggerValue.
HMCharacteristicMetadataMetadata of a HMCharacteristic such as the allowable range of the characteristic or the size of a step.
HMCharacteristicMetadataFormatEnumerates the data types that can represent characteristics.
HMCharacteristicMetadataUnitsEnumerates units of measure that might be associated with a HMCharacteristic.
HMCharacteristicPropertiesCommon capabilities of an HMCharacteristic, such as whether it's writable or supports events.
HMCharacteristicThresholdRangeEventAn HMEvent that is triggered when the HMCharacteristicThresholdRange.Characteristic object's value falls within a specified range.
HMCharacteristicTypeEnumerates known types of HMCharacteristic.
HMCharacteristicTypeExtensionsExtension methods to get values for constants and constants for values for a HMCharacteristicType.
HMCharacteristicValueActivationStateEnumerates the possible values of a HMCharacteristic that can be active or inactive.
HMCharacteristicValueAirParticulateEnumerates the particulate sizes supported by HomeKit.
HMCharacteristicValueAirQualityEnumerates air quality values.
HMCharacteristicValueBatteryStatusEnumerates the valid battery status values.
HMCharacteristicValueCarbonDioxideDetectionStatusEnumerates detection values.
HMCharacteristicValueCarbonMonoxideDetectionStatusEnumerates detection values.
HMCharacteristicValueChargingStateEnumerates the state of battery charging.
HMCharacteristicValueConfigurationStateEnumerates the possible values of a HMCharacteristic that can be configured or not.
HMCharacteristicValueContactStateEnumerates whether contact is detected.
HMCharacteristicValueCurrentAirPurifierStateEnumerates the possible values of a HMCharacteristic that describes the states of an air purifier.
HMCharacteristicValueCurrentFanStateEnumerates the possible values of a HMCharacteristic that describes the states of a fan.
HMCharacteristicValueCurrentHeaterCoolerStateEnumerates the possible values of a HMCharacteristic that describes the states of a heat exchanger.
HMCharacteristicValueCurrentHumidifierDehumidifierStateEnumerates the possible values of a HMCharacteristic that describes the states of a humidifier or dehumidifier.
HMCharacteristicValueCurrentSecuritySystemStateEnumerates the states of a security system.
HMCharacteristicValueCurrentSlatStateEnumerates the possible values of a HMCharacteristic that describes the states of an oscillating slat.
HMCharacteristicValueDoorStateEnumerates the states that a door can be in.
HMCharacteristicValueFilterChangeEnumerates the possible values of a HMCharacteristic that describes the states of a filter that must be periodically changed.
HMCharacteristicValueHeatingCoolingEnumerates the states that an indoor climate control unit can be in.
HMCharacteristicValueInputEventEnumerates the possible values of a HMCharacteristic that describes the forms of a button press.
HMCharacteristicValueJammedStatusEnumerates the state of a jammed device.
HMCharacteristicValueLabelNamespaceEnumerates the possible values of a HMCharacteristic that may either be a dot or a numeral.
HMCharacteristicValueLeakStatusEnumerates the values of a device that detects leaks.
HMCharacteristicValueLockMechanismEnumerates values that describe the last known action that was taken on a lock.
HMCharacteristicValueLockMechanismStateEnumerates the states that a lock can be in.
HMCharacteristicValueLockPhysicalControlsStateEnumerates the possible values of a HMCharacteristic that may either be locked or unlocked.
HMCharacteristicValueOccupancyStatusEnumerates values for occupancy.
HMCharacteristicValuePositionStateEnumerates the states of an object that opens and closes.
HMCharacteristicValueProgramModeEnumerates the possible values of a HMCharacteristic that can be scheduled or manually overriden.
HMCharacteristicValueRotationDirectionEnumerates rotation directions.
HMCharacteristicValueSecuritySystemAlarmTypeEnumerates the security system alarm type.
HMCharacteristicValueSlatTypeEnumerates the possible values of a HMCharacteristic that describe a vertical or horizontal slat.
HMCharacteristicValueSmokeDetectionStatusEnumerates the state of a smoke detector.
HMCharacteristicValueStatusFaultEnumerates fault states.
HMCharacteristicValueSwingModeEnumerates the possible values of a HMCharacteristic that describe a swing that can be enabled or disabled.
HMCharacteristicValueTamperedStatusEnumerates the states of a device that detected tampering.
HMCharacteristicValueTargetAirPurifierStateEnumerates the possible values of a HMCharacteristic of an air purifier.
HMCharacteristicValueTargetFanStateEnumerates the possible states of a HMCharacteristic of a fan.
HMCharacteristicValueTargetHeaterCoolerStateEnumerates the possible states of a HMCharacteristic of a heater / cooler.
HMCharacteristicValueTargetHumidifierDehumidifierStateEnumerates the possible states of a HMCharacteristic of a humidifier or dehumidifier.
HMCharacteristicValueTargetSecuritySystemStateEnumerates the status of a security system.
HMCharacteristicValueTemperatureUnitEnumerates two common temperature measurement systems.
HMCharacteristicValueUsageStateEnumerates the possible states of a HMCharacteristic of a device that can be in use or out of use.
HMCharacteristicValueValveTypeEnumerates the known types of valve.
HMCharacteristicWriteActionAn HMAction that sets a value in a HMCharacteristic.
HMDurationEventA HMEvent that occurs over a time interval.
HMErrorEnumerates possible failures in Home Kit operations.
HMErrorsHolds the constant HMErrors.HMErrorDomain.
HMEventHolds data relating to a HomeKit event.
HMEventTriggerAssociates one or HMEvent objects with a NSPredicate that, if true, triggers a scene change.
HMEventTriggerActivationStateEnumerates the possible states of a HMEventTrigger including reasons why it might not be enabled.
HMHomeAn object representing a single residence. The highest level "container" in Home Kit.
HMHomeAccessControlDescribes the administrative level of a user.
HMHomeAccessoryEventArgsProvides data for the HMHomeAccessoryEventArgs.DidAddAccessory, HMHomeAccessoryEventArgs.DidRemoveAccessory and HMHomeAccessoryEventArgs.DidUnblockAccessory events.
HMHomeActionSetEventArgsProvides data for the HMHomeActionSetEventArgs.DidAddActionSet, HMHomeActionSetEventArgs.DidRemoveActionSet, HMHomeActionSetEventArgs.DidUpdateActionsForActionSet and HMHomeActionSetEventArgs.DidUpdateNameForActionSet events.
HMHomeDelegateDelegate object for HMHome objects, providing methods that can be overridden to react to events relating to additions, subtractions, and updates of various Home Kit objects.
HMHomeDelegate_ExtensionsExtension methods to the IHMHomeDelegate interface to support all the methods from the HMHomeDelegate protocol.
HMHomeErrorAccessoryEventArgsProvides data for the HMHomeErrorAccessoryEventArgs.DidEncounterError event.
HMHomeHubStateEnumerates the possible states of the HomeKit hub.
HMHomeHubStateEventArgsProvides data for the HMHomeHubStateEventArgs.DidUpdateHomeHubState event.
HMHomeManagerCollection of HMHome objects.
HMHomeManagerDelegateDelegate object for HMHomeManager objects, provides methods that can be overridden to react to HMHomes being added, removed, or set as the primary home.
HMHomeManagerDelegate_ExtensionsExtension methods to the IHMHomeManagerDelegate interface to support all the methods from the HMHomeManagerDelegate protocol.
HMHomeManagerEventArgsProvides data for the HMHomeManagerEventArgs.DidAddHome and HMHomeManagerEventArgs.DidRemoveHome events.
HMHomeRoomAccessoryEventArgsProvides data for the HMHomeRoomAccessoryEventArgs.DidUpdateRoom event.
HMHomeRoomEventArgsProvides data for the HMHomeRoomEventArgs.DidAddRoom, HMHomeRoomEventArgs.DidRemoveRoom and HMHomeRoomEventArgs.DidUpdateNameForRoom events.
HMHomeRoomZoneEventArgsProvides data for the HMHomeRoomZoneEventArgs.DidAddRoomToZone and HMHomeRoomZoneEventArgs.DidRemoveRoomFromZone events.
HMHomeServiceGroupEventArgsProvides data for the HMHomeServiceGroupEventArgs.DidAddServiceGroup, HMHomeServiceGroupEventArgs.DidRemoveServiceGroup and HMHomeServiceGroupEventArgs.DidUpdateNameForServiceGroup events.
HMHomeServiceServiceGroupEventArgsProvides data for the HMHomeServiceServiceGroupEventArgs.DidAddService and HMHomeServiceServiceGroupEventArgs.DidRemoveService events.
HMHomeTriggerEventArgsProvides data for the HMHomeTriggerEventArgs.DidAddTrigger, HMHomeTriggerEventArgs.DidRemoveTrigger, HMHomeTriggerEventArgs.DidUpdateNameForTrigger and HMHomeTriggerEventArgs.DidUpdateTrigger events.
HMHomeUserEventArgsProvides data for the HMHomeUserEventArgs.DidAddUser and HMHomeUserEventArgs.DidRemoveUser events.
HMHomeZoneEventArgsProvides data for the HMHomeZoneEventArgs.DidAddZone, HMHomeZoneEventArgs.DidRemoveZone and HMHomeZoneEventArgs.DidUpdateNameForZone events.
HMLocationEventA HMEvent relating to a geographical region.
HMMutableCalendarEventA HMCalendarEvent whose values can be modified after initialization.
HMMutableCharacteristicEventA HMCharacteristicEvent whose values can be modified after initialization.
HMMutableCharacteristicThresholdRangeEventA HMCharacteristicThresholdRangeEvent whose values can be modified after initialization.
HMMutableDurationEventA HMDurationEvent whose values can be modified after initialization.
HMMutableLocationEventA HMLocationEvent whose values can be modified after initialization.
HMMutablePresenceEventA HMPresenceEvent whose values can be modified after initialization.
HMMutableSignificantTimeEventA HMSignificantTimeEvent whose values can be modified after initialization.
HMNumberRangeRepresents a range from HMNumberRange.Min to HMNumberRange.MaxValue.
HMPresenceEventAn HMEvent that represents a change in the physical presence or absence of users.
HMPresenceEventTypeEnumerates the type of change in presence that the HMPresenceEvent represents.
HMPresenceEventUserTypeEnumerates the types of users whose presence or absence is associated with a HMPresenceEvent.
HMRoomA room in a HMHome or HMZone.
HMServiceA named set of HMCharacteristics provided by an HMAccessory.
HMServiceGroupA collection of related HMService objects provided by an HMAccessory.
HMServiceTypeEnumerates known types of HMService.
HMServiceTypeExtensionsExtension methods to get values for constants and constants for values for a HMServiceType.
HMSignificantEventEnumerates events such as sunrise and sunset.
HMSignificantEventExtensionsExtension methods to get values for constants and constants for values for a HMSignificantEvent.
HMSignificantTimeEventAn HMTimeEvent that tracks a HMSignificantEvent.
HMTimeEventAn HMEvent that occurs at a specified time.
HMTimerTriggerA HMTrigger that triggers in response to a possibly-recurring timer.
HMTriggerA base class for events (such as timers) that triggers one or HMActionSets.
HMUserClass that represents a person who can control HomeKit devices.
HMZoneA set of HKRooms.
IHMAccessoryBrowserDelegateInterface representing the required methods (if any) of the protocol HMAccessoryBrowserDelegate.
IHMAccessoryDelegateInterface representing the required methods (if any) of the protocol HMAccessoryDelegate.
IHMCameraSnapshotControlDelegateInterface representing the required methods (if any) of the protocol HMCameraSnapshotControlDelegate.
IHMCameraStreamControlDelegateInterface representing the required methods (if any) of the protocol HMCameraStreamControlDelegate.
IHMHomeDelegateInterface representing the required methods (if any) of the protocol HMHomeDelegate.
IHMHomeManagerDelegateInterface representing the required methods (if any) of the protocol HMHomeManagerDelegate.