<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 8.0.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HomeKit",
  "identifier" : "/documentation/HomeKit/HMError",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "HomeKit"
    ],
    "preciseIdentifier" : "s:SC11HMErrorCodeLeV"
  },
  "title" : "HMError"
}
-->

# HMError

An error HomeKit returns.

```
struct HMError
```

## Topics

### Obtaining error information

[`HMErrorDomain`](/documentation/HomeKit/HMErrorDomain)

A string that identifies the HomeKit error domain.

### Detecting accessory errors

[`accessoryIsBlocked`](/documentation/HomeKit/HMError/accessoryIsBlocked)

An error indicating a blocked accessory.

[`accessoryIsBusy`](/documentation/HomeKit/HMError/accessoryIsBusy)

An error indicating the accessory is busy.

[`accessoryIsSuspended`](/documentation/HomeKit/HMError/accessoryIsSuspended)

The accessory is suspended.

[`accessoryNotReachable`](/documentation/HomeKit/HMError/accessoryNotReachable)

An error indicating the accessory is not reachable over the network.

[`accessoryOutOfCompliance`](/documentation/HomeKit/HMError/accessoryOutOfCompliance)

An error indicating the accessory is out of compliance.

[`accessoryOutOfResources`](/documentation/HomeKit/HMError/accessoryOutOfResources)

An error indicating the accessory is out of resources.

[`accessoryPoweredOff`](/documentation/HomeKit/HMError/accessoryPoweredOff)

An error indicating the accessory is off.

[`accessoryResponseError`](/documentation/HomeKit/HMError/accessoryResponseError)

An error with the accessory’s response.

[`addAccessoryFailed`](/documentation/HomeKit/HMError/addAccessoryFailed)

A failed attempt to add an accessory.

[`incompatibleAccessory`](/documentation/HomeKit/HMError/incompatibleAccessory)

The accessory is incompatible.

### Detecting action set errors

[`actionInAnotherActionSet`](/documentation/HomeKit/HMError/actionInAnotherActionSet)

An attempt to add an action that exists in one action set to another action set.

[`actionSetExecutionFailed`](/documentation/HomeKit/HMError/actionSetExecutionFailed)

An attempt to execute the action set failed.

[`actionSetExecutionInProgress`](/documentation/HomeKit/HMError/actionSetExecutionInProgress)

An error indicating the execution of the action set is in progress.

[`actionSetExecutionPartialSuccess`](/documentation/HomeKit/HMError/actionSetExecutionPartialSuccess)

An attempt to execute the action set was only partially successful.

[`cannotRemoveBuiltinActionSet`](/documentation/HomeKit/HMError/cannotRemoveBuiltinActionSet)

An error indicating the built-in action set cannot be removed.

[`noActionsInActionSet`](/documentation/HomeKit/HMError/noActionsInActionSet)

An attempt to execute an action set with no actions.

[`noRegisteredActionSets`](/documentation/HomeKit/HMError/noRegisteredActionSets)

An attempt to activate a trigger with no action sets.

### Detecting association errors

[`invalidAssociatedServiceType`](/documentation/HomeKit/HMError/invalidAssociatedServiceType)

An error indicating an invalid service type.

[`objectAlreadyAssociatedToHome`](/documentation/HomeKit/HMError/objectAlreadyAssociatedToHome)

An attempt to associate an object with a home when it’s already associated with that home.

[`objectAssociatedToAnotherHome`](/documentation/HomeKit/HMError/objectAssociatedToAnotherHome)

An attempt to associate an object with a home when it’s already associated with another home.

[`objectNotAssociatedToAnyHome`](/documentation/HomeKit/HMError/objectNotAssociatedToAnyHome)

An attempt to perform an operation on an object that is not associated to any home.

### Detecting authorization errors

[`invalidOrMissingAuthorizationData`](/documentation/HomeKit/HMError/invalidOrMissingAuthorizationData)

An error indicating the authorization data is invalid or missing.

[`locationForHomeDisabled`](/documentation/HomeKit/HMError/locationForHomeDisabled)

An error indicating the home’s location is disabled.

[`homeAccessNotAuthorized`](/documentation/HomeKit/HMError/homeAccessNotAuthorized)

An error indicating access to the home is not authorized.

[`insufficientPrivileges`](/documentation/HomeKit/HMError/insufficientPrivileges)

An error indicating insufficient privileges for the operation.

[`messageAuthenticationFailed`](/documentation/HomeKit/HMError/messageAuthenticationFailed)

A message authentication failure.

[`notAuthorizedForLocationServices`](/documentation/HomeKit/HMError/notAuthorizedForLocationServices)

An error indicating location services are not authorized.

[`notAuthorizedForMicrophoneAccess`](/documentation/HomeKit/HMError/notAuthorizedForMicrophoneAccess)

An error indicating microphone access is not authorized.

[`notSignedIntoiCloud`](/documentation/HomeKit/HMError/notSignedIntoiCloud)

An error indicating the user is not signed into iCloud.

[`ownershipFailure`](/documentation/HomeKit/HMError/ownershipFailure)

The ownership code did not match.

[`securityFailure`](/documentation/HomeKit/HMError/securityFailure)

A security failure.

### Detecting bridge errors

[`bridgedAccessoryNotReachable`](/documentation/HomeKit/HMError/bridgedAccessoryNotReachable)

An error indicating the bridged accessory cannot be reached.

[`cannotRemoveNonBridgeAccessory`](/documentation/HomeKit/HMError/cannotRemoveNonBridgeAccessory)

An attempt to remove a bridged accessory.

[`cannotUnblockNonBridgeAccessory`](/documentation/HomeKit/HMError/cannotUnblockNonBridgeAccessory)

An error indicating a non-bridge accessory cannot be unblocked.

### Detecting characteristic errors

[`readOnlyCharacteristic`](/documentation/HomeKit/HMError/readOnlyCharacteristic)

An attempt to modify a read-only value.

[`writeOnlyCharacteristic`](/documentation/HomeKit/HMError/writeOnlyCharacteristic)

An attempt to read from a write-only characteristic.

### Detecting collision errors

[`homeWithSimilarNameExists`](/documentation/HomeKit/HMError/homeWithSimilarNameExists)

An attempt to assign a home the same name as an existing home.

[`objectWithSimilarNameExists`](/documentation/HomeKit/HMError/objectWithSimilarNameExists)

An object with a similar name already exists.

[`objectWithSimilarNameExistsInHome`](/documentation/HomeKit/HMError/objectWithSimilarNameExistsInHome)

An attempt to give the name of one object to another object in the home.

[`renameWithSimilarName`](/documentation/HomeKit/HMError/renameWithSimilarName)

An attempt to rename an object with its current name.

### Detecting communication errors

[`accessDenied`](/documentation/HomeKit/HMError/accessDenied)

An error indicating the current user doesn’t have privileges to perform the operation.

[`accessoryCommunicationFailure`](/documentation/HomeKit/HMError/accessoryCommunicationFailure)

The accessory failed to communicate.

[`accessoryPairingFailed`](/documentation/HomeKit/HMError/accessoryPairingFailed)

An attempt to pair with the accessory has failed.

[`accessorySentInvalidResponse`](/documentation/HomeKit/HMError/accessorySentInvalidResponse)

An error indicating the accessory sent an invalid response.

[`clientRequestError`](/documentation/HomeKit/HMError/clientRequestError)

An error with the client request.

[`communicationFailure`](/documentation/HomeKit/HMError/communicationFailure)

A communication failure.

[`dataResetFailure`](/documentation/HomeKit/HMError/dataResetFailure)

An attempt to reset the data failed.

[`timedOutWaitingForAccessory`](/documentation/HomeKit/HMError/timedOutWaitingForAccessory)

An accessory did not respond timely.

[`partialCommunicationFailure`](/documentation/HomeKit/HMError/partialCommunicationFailure)

### Detecting device and discovery errors

[`deviceLocked`](/documentation/HomeKit/HMError/deviceLocked)

An error indicating the device is locked.

[`accessoryDiscoveryFailed`](/documentation/HomeKit/HMError/accessoryDiscoveryFailed)

An error indicating that accessory discovery failed.

### Detecting general errors

[`alreadyExists`](/documentation/HomeKit/HMError/alreadyExists)

An error indicating the container already contains the object you are trying to add.

[`genericError`](/documentation/HomeKit/HMError/genericError)

An error that does not have a more specific error code.

[`incompatibleHomeHub`](/documentation/HomeKit/HMError/incompatibleHomeHub)

No compatible home hub found.

[`invalidClass`](/documentation/HomeKit/HMError/invalidClass)

An attempt to use an abstract base class in an operation instead of a concrete subclass.

[`notFound`](/documentation/HomeKit/HMError/notFound)

An error indicating the object was not found in the container.

[`notificationAlreadyEnabled`](/documentation/HomeKit/HMError/notificationAlreadyEnabled)

An error indicating the notification is already enabled.

[`notificationNotSupported`](/documentation/HomeKit/HMError/notificationNotSupported)

An attempt to register for notifications from an accessory that does not support notifications.

[`operationNotSupported`](/documentation/HomeKit/HMError/operationNotSupported)

An attempt to use an unsupported operation.

[`unexpectedError`](/documentation/HomeKit/HMError/unexpectedError)

An unexpected error.

[`missingEntitlement`](/documentation/HomeKit/HMError/missingEntitlement)

An error indicating a required entitlement is not available.

[`referToUserManual`](/documentation/HomeKit/HMError/referToUserManual)

An error described in the device’s user manual.

### Detecting home and room errors

[`maximumAccessoriesOfTypeInHome`](/documentation/HomeKit/HMError/maximumAccessoriesOfTypeInHome)

The home already has the maximum number of accessories of the given type.

[`roomForHomeCannotBeInZone`](/documentation/HomeKit/HMError/roomForHomeCannotBeInZone)

An attempt to add the room that represents the entire home to a zone.

[`roomForHomeCannotBeUpdated`](/documentation/HomeKit/HMError/roomForHomeCannotBeUpdated)

An attempt to change the room that represents the entire home.

### Detecting hub errors

[`noHomeHub`](/documentation/HomeKit/HMError/noHomeHub)

An error indicating no home hub found.

[`noCompatibleHomeHub`](/documentation/HomeKit/HMError/noCompatibleHomeHub)

An error indicating no compatible home hub found.

[`incompatibleHomeHub`](/documentation/HomeKit/HMError/Code/incompatibleHomeHub)

An error indicating an incompatible home hub.

### Detecting limit errors

[`cannotActivateTriggerTooFarInFuture`](/documentation/HomeKit/HMError/cannotActivateTriggerTooFarInFuture)

An error indicating the trigger cannot be activated because it is set too far in the future.

[`dateMustBeOnSpecifiedBoundaries`](/documentation/HomeKit/HMError/dateMustBeOnSpecifiedBoundaries)

An error indicating the date is not on the specified boundaries.

[`fireDateInPast`](/documentation/HomeKit/HMError/fireDateInPast)

An attempt to activate a timer trigger with a date in the past.

[`invalidMessageSize`](/documentation/HomeKit/HMError/invalidMessageSize)

An error indicating an invalid message size.

[`maximumObjectLimitReached`](/documentation/HomeKit/HMError/maximumObjectLimitReached)

An error indicating the maximum object count has been reached.

[`recurrenceTooLarge`](/documentation/HomeKit/HMError/recurrenceTooLarge)

An attempt to use a recurrence period that is too large.

[`recurrenceTooSmall`](/documentation/HomeKit/HMError/recurrenceTooSmall)

An error indicating the recurrence interval is too short.

[`recurrenceMustBeOnSpecifiedBoundaries`](/documentation/HomeKit/HMError/recurrenceMustBeOnSpecifiedBoundaries)

An error indicating the recurrence rule is not on the specified boundaries.

### Detecting network errors

[`enterpriseNetworkNotSupported`](/documentation/HomeKit/HMError/enterpriseNetworkNotSupported)

An enterprise network doesn’t support this accessory.

[`failedToJoinNetwork`](/documentation/HomeKit/HMError/failedToJoinNetwork)

The accessory failed to join the network.

[`incompatibleNetwork`](/documentation/HomeKit/HMError/incompatibleNetwork)

An error indicating an incompatible network.

[`networkUnavailable`](/documentation/HomeKit/HMError/networkUnavailable)

An error indicating the network is unavailable.

[`wiFiCredentialGenerationFailed`](/documentation/HomeKit/HMError/wiFiCredentialGenerationFailed)

WiFi credential generation failed.

### Detecting operation errors

[`operationCancelled`](/documentation/HomeKit/HMError/operationCancelled)

An error indicating the user canceled the operation.

[`operationInProgress`](/documentation/HomeKit/HMError/operationInProgress)

An error indicating the operation is already in progress.

[`operationTimedOut`](/documentation/HomeKit/HMError/operationTimedOut)

An error indicating the operation timed out.

### Detecting parameter errors

[`invalidParameter`](/documentation/HomeKit/HMError/invalidParameter)

An error indicating the object is invalid for the given operation.

[`missingParameter`](/documentation/HomeKit/HMError/missingParameter)

An error indicating a missing parameter.

[`nilParameter`](/documentation/HomeKit/HMError/nilParameter)

An error indicating that nil was passed for an operation that does not accept nil.

[`unconfiguredParameter`](/documentation/HomeKit/HMError/unconfiguredParameter)

An error indicating an unconfigured parameter.

### Detecting read and write errors

[`readWriteFailure`](/documentation/HomeKit/HMError/readWriteFailure)

An error indicating a failed read/write operation.

[`readWritePartialSuccess`](/documentation/HomeKit/HMError/readWritePartialSuccess)

An error indicating a partially successful read/write operation.

### Detecting synchronization errors

[`cloudDataSyncInProgress`](/documentation/HomeKit/HMError/cloudDataSyncInProgress)

An error indicating a data synchronization operation is in progress.

[`keychainSyncNotEnabled`](/documentation/HomeKit/HMError/keychainSyncNotEnabled)

An error indicating Keychain syncing is not enabled for the user.

### Detecting user errors

[`userDeclinedAddingUser`](/documentation/HomeKit/HMError/userDeclinedAddingUser)

An error indicating the user canceled the add user operation.

[`userDeclinedRemovingUser`](/documentation/HomeKit/HMError/userDeclinedRemovingUser)

An error indicating the user canceled the remove user operation.

[`userDeclinedInvite`](/documentation/HomeKit/HMError/userDeclinedInvite)

An error indicating the user declined the invitation.

[`userIDNotEmailAddress`](/documentation/HomeKit/HMError/userIDNotEmailAddress)

An error indicating the user’s ID is not a valid email address.

[`userManagementFailed`](/documentation/HomeKit/HMError/userManagementFailed)

A user management error not covered by the other errors.

### Detecting value errors

[`invalidDataFormatSpecified`](/documentation/HomeKit/HMError/invalidDataFormatSpecified)

An error indicating an invalid data format was specified.

[`invalidValueType`](/documentation/HomeKit/HMError/invalidValueType)

An attempt to use an invalid value type.

[`nameContainsProhibitedCharacters`](/documentation/HomeKit/HMError/nameContainsProhibitedCharacters)

An attempt to name an object with prohibited characters.

[`nameDoesNotEndWithValidCharacters`](/documentation/HomeKit/HMError/nameDoesNotEndWithValidCharacters)

An error indicating the provided name has invalid characters at the end.

[`nameDoesNotStartWithValidCharacters`](/documentation/HomeKit/HMError/nameDoesNotStartWithValidCharacters)

An attempt to start the name of an object with invalid characters.

[`stringLongerThanMaximum`](/documentation/HomeKit/HMError/stringLongerThanMaximum)

An attempt to use a string longer than the maximum allowed.

[`stringShorterThanMinimum`](/documentation/HomeKit/HMError/stringShorterThanMinimum)

An attempt to use a string shorter than the required minimum.

[`valueHigherThanMaximum`](/documentation/HomeKit/HMError/valueHigherThanMaximum)

An attempt to use a numeric value higher than the specified maximum value.

[`valueLowerThanMinimum`](/documentation/HomeKit/HMError/valueLowerThanMinimum)

An attempt to use a numeric value lower than the specified minimum value.

### Comparing errors

### Enumerating errors

[`Code`](/documentation/HomeKit/HMError/Code)

Possible error values that can be returned from HomeKit APIs.

## Relationships

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`Equatable`](/documentation/Swift/Equatable)

[`Error`](/documentation/Swift/Error)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

[`CustomNSError`](/documentation/Foundation/CustomNSError)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)