HomeKit Constants

No overview available.

Symbols

Constants

let HMAccessoryCategoryTypeAirConditioner: Stringlet HMAccessoryCategoryTypeAirDehumidifier: Stringlet HMAccessoryCategoryTypeAirHeater: Stringlet HMAccessoryCategoryTypeAirHumidifier: Stringlet HMAccessoryCategoryTypeAirPurifier: String
let HMAccessoryCategoryTypeBridge: String

The category type for Bridge.

let HMAccessoryCategoryTypeDoor: String

The category type for Door.

let HMAccessoryCategoryTypeDoorLock: String

The category type for Door Lock.

let HMAccessoryCategoryTypeFan: String

The category type for Fan.

let HMAccessoryCategoryTypeGarageDoorOpener: String

The category type for Garage Door Opener.

let HMAccessoryCategoryTypeIPCamera: String

The category type for IP Camera.

let HMAccessoryCategoryTypeLightbulb: String

The category type for Lightbulb.

let HMAccessoryCategoryTypeOther: String

The category type for Other.

let HMAccessoryCategoryTypeOutlet: String

The category type for Outlet.

let HMAccessoryCategoryTypeProgrammableSwitch: String

The category type for Programmable Switch.

let HMAccessoryCategoryTypeRangeExtender: String

The category type for Range Extender.

let HMAccessoryCategoryTypeSecuritySystem: String
let HMAccessoryCategoryTypeSensor: String

The category type for Sensor.

let HMAccessoryCategoryTypeSwitch: String

The category type for Switch.

let HMAccessoryCategoryTypeThermostat: String

The category type for Thermostat.

let HMAccessoryCategoryTypeVideoDoorbell: String

The category type for Video Doorbell.

let HMAccessoryCategoryTypeWindow: String

The category type for Window.

let HMAccessoryCategoryTypeWindowCovering: String

The category type for Window Covering.

let HMActionSetTypeHomeArrival: Stringlet HMActionSetTypeHomeDeparture: Stringlet HMActionSetTypeSleep: Stringlet HMActionSetTypeTriggerOwned: Stringlet HMActionSetTypeUserDefined: Stringlet HMActionSetTypeWakeUp: Stringlet HMCharacteristicKeyPath: String
let HMCharacteristicMetadataFormatArray: String

Indicates that the characteristic has array values.

let HMCharacteristicMetadataFormatBool: String

Indicates that the characteristic has boolean values.

let HMCharacteristicMetadataFormatData: String

Indicates that the characteristic has data blob values.

let HMCharacteristicMetadataFormatDictionary: String

Indicates that the characteristic has dictionary values.

let HMCharacteristicMetadataFormatFloat: String

Indicates that the characteristic has float values.

let HMCharacteristicMetadataFormatInt: String

Indicates that the characteristic has int values.

let HMCharacteristicMetadataFormatString: String

Indicates that the characteristic has string values.

let HMCharacteristicMetadataFormatTLV8: String

Indicates that the characteristic has TVL8 values.

let HMCharacteristicMetadataFormatUInt16: String

Indicates that the characteristic has unsigned 16-bit integer values.

let HMCharacteristicMetadataFormatUInt32: String

Indicates that the characteristic has unsigned 32-bit integer values.

let HMCharacteristicMetadataFormatUInt64: String

Indicates that the characteristic has unsigned 64-bit integer values.

let HMCharacteristicMetadataFormatUInt8: String

Indicates that the characteristic has unsigned 8-bit integer values.

let HMCharacteristicMetadataUnitsArcDegree: String

The unit of the characteristic is the degrees of an arc.

let HMCharacteristicMetadataUnitsCelsius: String

The unit of the characteristic is celsius.

let HMCharacteristicMetadataUnitsFahrenheit: String

The unit of the characteristic is fahrenheit.

let HMCharacteristicMetadataUnitsLux: Stringlet HMCharacteristicMetadataUnitsMicrogramsPerCubicMeter: Stringlet HMCharacteristicMetadataUnitsPartsPerMillion: String
let HMCharacteristicMetadataUnitsPercentage: String

The unit of the characteristic is a percentage.

let HMCharacteristicMetadataUnitsSeconds: String

The unit of the characteristic is seconds.

let HMCharacteristicPropertyHidden: String
let HMCharacteristicPropertyReadable: String

The characteristic is readable.

let HMCharacteristicPropertySupportsEventNotification: String

The characteristic supports notifications using the event connection established by the controller. The event connection provides unidirectional communication from the accessory to the controller.

let HMCharacteristicPropertyWritable: String

The characteristic is writable.

let HMCharacteristicTypeActive: String
let HMCharacteristicTypeAdminOnlyAccess: String

Whether the accessory requires admin-only access. The value is a boolean.

let HMCharacteristicTypeAirParticulateDensity: String

The value for the density of air-particulate matter. The value is in units of micrograms/m^2.

let HMCharacteristicTypeAirParticulateSize: String

The value for the size of the air-particulate matter. The value is one of the values defined for the HMCharacteristicValueAirParticulateSize enum.

let HMCharacteristicTypeAirQuality: String

The value for the air quality. The value is one of the values defined for the HMCharacteristicValueAirQuality enum.

let HMCharacteristicTypeAudioFeedback: String

Whether the device has audio feedback. The value is a boolean.

let HMCharacteristicTypeBatteryLevel: String

The value for the battery level. The value is an uint8 value in percent.

let HMCharacteristicTypeBrightness: String

The brightness of the color used by the accessory—typically a light. The value is an int in percent.

let HMCharacteristicTypeCarbonDioxideDetected: String

The value for the carbon dioxide detected. The value is a uint8 value. A value of 0 indicates carbon dioxide levels are normal.

let HMCharacteristicTypeCarbonDioxideLevel: String

The value for the carbon dioxide level. The value is a Float value in units of ppm.

let HMCharacteristicTypeCarbonDioxidePeakLevel: String

The value for carbon the dioxide peak level. The value is a Float value in units of ppm.

let HMCharacteristicTypeCarbonMonoxideDetected: String

Indicates the carbon monoxide detection. The value is a uint8 value. A zero indicates carbon monoxide levels are normal.

let HMCharacteristicTypeCarbonMonoxideLevel: String

The value for the carbon monoxide level. The value is a Float value in units of ppm.

let HMCharacteristicTypeCarbonMonoxidePeakLevel: String

The value for the carbon monoxide peak level. The value is a Float value in units of ppm.

let HMCharacteristicTypeChargingState: String

The value for the charging state. The value is a uint8. A value of 1 indicates charging is in progress.

let HMCharacteristicTypeContactState: String

The contact sensor state. The value is a uint8 value. A value of 0 indicates that contact is detected; a value of 1 indicates no contact is detected.

let HMCharacteristicTypeCoolingThreshold: String

The threshold temperature above which cooling will be active. The value is a float in degrees Celsius.

let HMCharacteristicTypeCurrentAirPurifierState: String
let HMCharacteristicTypeCurrentDoorState: String

The current door state. The value is one of the values defined for HMCharacteristicValueDoorState.

let HMCharacteristicTypeCurrentFanState: Stringlet HMCharacteristicTypeCurrentHeaterCoolerState: String
let HMCharacteristicTypeCurrentHeatingCooling: String

The current heating or cooling mode. The value is one of the values defined for HMCharacteristicValueHeatingCooling.

let HMCharacteristicTypeCurrentHorizontalTilt: String

The value for the current horizontal tilt angle. The value is a Float representing the angle in arc degrees.

let HMCharacteristicTypeCurrentHumidifierDehumidifierState: String
let HMCharacteristicTypeCurrentLightLevel: String

The value for the current light level. The value of the characteristic in units of lux.

let HMCharacteristicTypeCurrentLockMechanismState: String

The current state of the locking mechanism of the accessory. The value is one of the values defined for HMCharacteristicValueLockMechanismState.

let HMCharacteristicTypeCurrentPosition: String

The value for the current position of a door/window. The value is an uint8 value in percent.

let HMCharacteristicTypeCurrentRelativeHumidity: String

The current relative humidity measured by the accessory. The value is a float in percent.

let HMCharacteristicTypeCurrentSecuritySystemState: String

The value for the current security system state. The value is one of the values defined for the HMCharacteristicValueCurrentSecuritySystemState enum.

let HMCharacteristicTypeCurrentSlatState: String
let HMCharacteristicTypeCurrentTemperature: String

The current temperature measured by the accessory. The value is a float in degrees Celsius.

let HMCharacteristicTypeCurrentTilt: String
let HMCharacteristicTypeCurrentVerticalTilt: String

The value for the current vertical tilt angle. The value is a Float representing the angle in arc degrees.

let HMCharacteristicTypeDehumidifierThreshold: Stringlet HMCharacteristicTypeDigitalZoom: Stringlet HMCharacteristicTypeFilterChangeIndication: Stringlet HMCharacteristicTypeFilterLifeLevel: Stringlet HMCharacteristicTypeFilterResetChangeIndication: String
let HMCharacteristicTypeFirmwareVersion: String

The value for the firmware version. The value is a String value describing the firmware version of the accessory.

let HMCharacteristicTypeHardwareVersion: String

The value for the hardware version. The value is a String value describing the hardware version of the accessory.

let HMCharacteristicTypeHeatingThreshold: String

The threshold temperature below which heating will be active. The value is a float in degrees Celsius.

let HMCharacteristicTypeHoldPosition: String

The value for the hold position. The value is a Boolean indicating that the current position should be held/maintained.

let HMCharacteristicTypeHue: String

The hue of the color used by the accessory—typically a light. The value is a float in arc degrees.

let HMCharacteristicTypeHumidifierThreshold: String
let HMCharacteristicTypeIdentify: String

Used to identify the accessory. A write-only characteristic that takes a boolean value.

let HMCharacteristicTypeImageMirroring: Stringlet HMCharacteristicTypeImageRotation: String
let HMCharacteristicTypeInputEvent: String

The value for the programmable switch input event. The value is an int that can change based on the type of programmable switch. A binary programmable switch, with a value of 0 indicates OFF (and 1 indicates ON). For a slider programmable switch, this value indicates the level.

let HMCharacteristicTypeLabelIndex: Stringlet HMCharacteristicTypeLabelNamespace: String
let HMCharacteristicTypeLeakDetected: String

The value for the leak detection. The value is a uint8 value. A value of 0 indicates no leak detected; a value of 1 indicates a leak is detected.

let HMCharacteristicTypeLockManagementAutoSecureTimeout: String

The automatic timeout for a lockable accessory that supports automatic lockout. The value is an unsigned 32-bit integer.

let HMCharacteristicTypeLockManagementControlPoint: String

The control point for lock management. This is a write-only characteristic that takes TLV8 data wrapped in an NSData object.

let HMCharacteristicTypeLockMechanismLastKnownAction: String

The last known action of the locking mechanism of the accessory. The value is one of the values defined for HMCharacteristicValueLockMechanism.

let HMCharacteristicTypeLockPhysicalControls: String
let HMCharacteristicTypeLogs: String

Log data for the accessory. The value is TLV8 data wrapped in an NSData object.

let HMCharacteristicTypeManufacturer: String

The manufacturer of the accessory. The value is a string.

let HMCharacteristicTypeModel: String

The model of the accessory. The value is a string.

let HMCharacteristicTypeMotionDetected: String

Whether the accessory has detected motion. The value is a boolean.

let HMCharacteristicTypeMute: String
let HMCharacteristicTypeName: String

The name of the accessory. The value is a string.

let HMCharacteristicTypeNightVision: Stringlet HMCharacteristicTypeNitrogenDioxideDensity: String
let HMCharacteristicTypeObstructionDetected: String

Indicates whether the accessory has detected an obstruction—for example, an automatic garage door opener may have the ability to tell if something is blocking the door. The value is a boolean indicating whether an obstruction was detected.

let HMCharacteristicTypeOccupancyDetected: String

The value for the occupancy detection. The value is a uint8 value. A value of 0 indicates no occupancy detected; a value of 1 indicates occupancy is detected.

let HMCharacteristicTypeOpticalZoom: String
let HMCharacteristicTypeOutletInUse: String

Whether the outlet is in use. The value is a boolean.

let HMCharacteristicTypeOutputState: String

The value for the programmable switch output state. This value is to be used for presentation purposes. A binary programmable switch with value 1 can present a state of ON.

let HMCharacteristicTypeOzoneDensity: Stringlet HMCharacteristicTypePM10Density: Stringlet HMCharacteristicTypePM2_5Density: String
let HMCharacteristicTypePositionState: String

The value for the position state. The value is one of the values defined for the HMCharacteristicValuePositionState enum.

let HMCharacteristicTypePowerState: String

The power state of the accessory. The value is a boolean.

let HMCharacteristicTypeRotationDirection: String

Indicates the fan rotation direction. The value is one of the values defined for HMCharacteristicValueRotationDirection.

let HMCharacteristicTypeRotationSpeed: String

The rotation speed. The value is a float.

let HMCharacteristicTypeSaturation: String

The saturation of the color used by the accessory—typically a light. The value is a float in percent.

let HMCharacteristicTypeSecuritySystemAlarmType: String

The value for the security system alarm type. The value is a uint8, indicating the type of alarm triggered by a security system service. This value is 1 when the alarm type is not known and a value 0 when alarm conditions are cleared.

let HMCharacteristicTypeSelectedStreamConfiguration: String
let HMCharacteristicTypeSerialNumber: String

The serial number of the accessory. The value is a string.

let HMCharacteristicTypeSetupStreamEndpoint: Stringlet HMCharacteristicTypeSlatType: String
let HMCharacteristicTypeSmokeDetected: String

Indicates whether the accessory has detected smoke. The value is a uint8 value. A value of 0 indicates no smoke is detected; a value of 1 indicates that smoke is detected.

let HMCharacteristicTypeSoftwareVersion: String

The software version of the accessory. The value is a String value describing the software version of the accessory.

let HMCharacteristicTypeStatusActive: String

Indicates the status of a service is active. The value is a Boolean.

let HMCharacteristicTypeStatusFault: String

Indicates the status of a service is fault. The value is a uint8 value.

let HMCharacteristicTypeStatusJammed: String

Indicates the status of a service is jammed. The value is a uint8 value. A value of 0 indicates that the service is not jammed; a value of 1 indicates that the service is jammed.

let HMCharacteristicTypeStatusLowBattery: String

Indicates the status of a service is low battery. The value is a uint8 value. A value of 0 indicates battery level is normal; a value of 1 indicates that battery level is low.

let HMCharacteristicTypeStatusTampered: String

Indicates the status of a service is tampered. The value is a uint8 value. A value of 0 indicates no tampering has been detected; a value of 1 indicates that a tampering has been detected.

let HMCharacteristicTypeStreamingStatus: Stringlet HMCharacteristicTypeSulphurDioxideDensity: Stringlet HMCharacteristicTypeSupportedAudioStreamConfiguration: Stringlet HMCharacteristicTypeSupportedRTPConfiguration: Stringlet HMCharacteristicTypeSupportedVideoStreamConfiguration: Stringlet HMCharacteristicTypeSwingMode: Stringlet HMCharacteristicTypeTargetAirPurifierState: String
let HMCharacteristicTypeTargetDoorState: String

The current target door state—doors take time to move between states, so the current target door state may not match the current door state at a given time. The value is one of the values defined for HMCharacteristicValueDoorState.

let HMCharacteristicTypeTargetFanState: Stringlet HMCharacteristicTypeTargetHeaterCoolerState: String
let HMCharacteristicTypeTargetHeatingCooling: String

The target heating or cooling mode. The value is one of the values defined for HMCharacteristicValueHeatingCooling.

let HMCharacteristicTypeTargetHorizontalTilt: String

The target horizontal tilt angle. The value is a float, representing the angle in arc degrees.

let HMCharacteristicTypeTargetHumidifierDehumidifierState: String
let HMCharacteristicTypeTargetLockMechanismState: String

The target state for the locking mechanism of the accessory. The value is one of the values defined for HMCharacteristicValueLockMechanismState.

let HMCharacteristicTypeTargetPosition: String

The target position of a door/window. The value is an uint8 value in percent. For shades/awnings, a value of 0 indicates no shade and a value of 100 indicates most shade. For blinds, a value of 0 indicates most light is allowed in and 100 indicates least light is allowed.

let HMCharacteristicTypeTargetRelativeHumidity: String

The target relative humidity set for the accessory to achieve—for example of a humidifier. The value is a float in percent.

let HMCharacteristicTypeTargetSecuritySystemState: String

The target security system state. The value is one of the values defined for HMCharacteristicValueTargetSecuritySystemState enum.

let HMCharacteristicTypeTargetTemperature: String

The target temperature set for the accessory to achieve—for example on a thermostat. The value is a float in degrees Celsius.

let HMCharacteristicTypeTargetTilt: String
let HMCharacteristicTypeTargetVerticalTilt: String

The target vertical tilt angle. The value is a float, representing the angle in arc degrees.

let HMCharacteristicTypeTemperatureUnits: String

The units of temperature currently active on the accessory. The value is one of the values defined for HMCharacteristicValueTemperatureUnit.

let HMCharacteristicTypeVersion: String

The version of the accessory. The value is a string.

let HMCharacteristicTypeVolatileOrganicCompoundDensity: Stringlet HMCharacteristicTypeVolume: Stringlet HMCharacteristicTypeWaterLevel: Stringlet HMCharacteristicValueKeyPath: String
HMError.Code

Possible error values that can be returned from Home Kit APIs.

HMErrorDomain

The home kit error domain.

let HMServiceTypeAccessoryInformation: String

Service type for accessory information.

let HMServiceTypeAirPurifier: Stringlet HMServiceTypeAirQualitySensor: Stringlet HMServiceTypeBattery: Stringlet HMServiceTypeCameraControl: Stringlet HMServiceTypeCameraRTPStreamManagement: Stringlet HMServiceTypeCarbonDioxideSensor: Stringlet HMServiceTypeCarbonMonoxideSensor: Stringlet HMServiceTypeContactSensor: Stringlet HMServiceTypeDoor: Stringlet HMServiceTypeDoorbell: String
let HMServiceTypeFan: String

Service type for a fan.

let HMServiceTypeFilterMaintenance: String
let HMServiceTypeGarageDoorOpener: String

Service type for a garage door opener.

let HMServiceTypeHeaterCooler: Stringlet HMServiceTypeHumidifierDehumidifier: Stringlet HMServiceTypeHumiditySensor: Stringlet HMServiceTypeLabel: Stringlet HMServiceTypeLeakSensor: Stringlet HMServiceTypeLightSensor: String
let HMServiceTypeLightbulb: String

Service type for a light bulb.

let HMServiceTypeLockManagement: String

Service type for lock management.

let HMServiceTypeLockMechanism: String

Service type for a lock mechanism.

let HMServiceTypeMicrophone: Stringlet HMServiceTypeMotionSensor: Stringlet HMServiceTypeOccupancySensor: String
let HMServiceTypeOutlet: String

Service type for an outlet.

let HMServiceTypeSecuritySystem: Stringlet HMServiceTypeSlats: Stringlet HMServiceTypeSmokeSensor: Stringlet HMServiceTypeSpeaker: Stringlet HMServiceTypeStatefulProgrammableSwitch: Stringlet HMServiceTypeStatelessProgrammableSwitch: String
let HMServiceTypeSwitch: String

Service type for a switch.

let HMServiceTypeTemperatureSensor: String
let HMServiceTypeThermostat: String

Service type for a thermostat.

let HMServiceTypeVentilationFan: Stringlet HMServiceTypeWindow: Stringlet HMServiceTypeWindowCovering: Stringlet HMSignificantEventSunrise: Stringlet HMSignificantEventSunset: String
let HMUserFailedAccessoriesKey: String

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