# HomeSpan Services and Characteristics HomeSpan implements all [HAP-R2](https://developer.apple.com/support/homekit-accessory-protocol/) Services and Characteristics except for those that involve video or audio streaming, Apple TV, or advanced lock management (i.e. all HAP Services except those that require Characteristics with a TLV8 data type). HomeSpan Services and Characteristics are implemented as C++ Classes with names that exactly match the spelling and capitalization specified by Apple in Sections 8 and Section of HAP-R2, but without any spaces. All HomeSpan Services are defined in HomeSpan's `Service` namespace and all HomeSpan Characteristics are defined in HomeSpan's `Characteristic` namespace. For example, HAP Service 8.7, *Carbon Dioxide Sensor*, and HAP Characteristic 9.16, *Carbon Dioxide Detected*, are respectively defined in HomeSpan as `Service::CarbonDioxideSensor` and `Characteristic::CarbonDioxideDetected`. HomeSpan Service and Characteristics are instantiated with a C++ `new` command. Services do not take any arguments, whereas Characteristics take a single, optional argument that is used to initialize the value of the Characteristic at startup. If this argument is not specified, HomeSpan will apply a reasonable default value based on the Characteristic's type and allowed range. ### Service List | Service | Required Characteristics | Optional Characteristics | | ------- | -------------------- | ------------------- | | AccessoryInformation| FirmwareRevision
Identity
Manufacturer
Model
Name
SerialNumber | HardwareRevision | | AirPurifier | Active
CurrentAirPurifierState
TargetAirPurifierState | Name
RotationSpeed
SwingMode
LockPhysicalControls | | AirQualitySensor | AirQuality | Name
OzoneDensity
NitrogenDioxideDensity
SulphurDioxideDensity
PM25Density
PM10Density
VOCDensity
StatusActive
StatusFault
StatusTampered
StatusLowBattery | | BatteryService | BatteryLevel
ChargingState
StatusLowBattery | Name | | CarbonDioxideSensor | CarbonDioxideDetected | Name
StatusActive
StatusFault
StatusTampered
StatusLowBattery
CarbonDioxideLevel
CarbonDioxidePeakLevel | | CarbonMonoxideSensor | CarbonMonoxideDetected | Name
StatusActive
StatusFault
StatusTampered
StatusLowBattery
CarbonMonoxideLevel
CarbonMonoxidePeakLevel | | ContactSensor | ContactSensorState | Name
StatusActive
StatusFault
StatusTampered
StatusLowBattery | | Door | CurrentPosition |
TargetPosition
PositionState | Name
HoldPosition
ObstructionDetected | | Doorbell | ProgrammableSwitchEvent | Name
Volume
Brightness | | Fan | Active | Name
CurrentFanState
TargetFanState
RotationDirection
RotationSpeed
SwingMode
LockPhysicalControls | | Faucet | Active | StatusFault
Name | | FilterMaintenance | FilterChangeIndication | Name
FilterLifeLevel
ResetFilterIndication | | GarageDoorOpener | CurrentDoorState
TargetDoorState
ObstructionDetected | LockCurrentState
LockTargetState
Name | | HAPProtocolInformation | Version | | | HeaterCooler | Active
CurrentTemperature
CurrentHeaterCoolerState
TargetHeaterCoolerState | Name
RotationSpeed
TemperatureDisplayUnits
SwingMode
CoolingThresholdTemperature
HeatingThresholdTemperature
LockPhysicalControls | | HumidifierDehumidifier | Active
CurrentRelativeHumidity
CurrentHumidifierDehumidifierState
TargetHumidifierDehumidifierState | Name
RelativeHumidityDehumidifierThreshold
RelativeHumidityHumidifierThreshold
RotationSpeed
SwingMode
WaterLevel
LockPhysicalControls | | HumiditySensor | CurrentRelativeHumidity | Name
StatusActive
StatusFault
StatusTampered
StatusLowBattery | | IrrigationSystem | Active
ProgramMode
InUse | RemainingDuration
Name
StatusFault | | LeakSensor | LeakDetected | Name
StatusActive
StatusFault
StatusTampered
StatusLowBattery | | LightBulb | On | Brightness
Hue
Name
Saturation
ColorTemperature | | LightSensor | CurrentAmbientLightLevel | Name
StatusActive
StatusFault
StatusTampered
StatusLowBattery | | LockMechanism | LockCurrentState
LockTargetState | Name | | Microphone | Mute | Name
Volume | | MotionSensor | MotionDetected | Name
StatusActive
StatusFault
StatusTampered
StatusLowBattery | | OccupancySensor | OccupancyDetected | Name
StatusActive
StatusFault
StatusTampered
StatusLowBattery | | Outlet | On
OutletInUse | Name | | SecuritySystem | SecuritySystemCurrentState
SecuritySystemTargetState | Name
SecuritySystemAlarmType
StatusFault
StatusTampered | | ServiceLabel | ServiceLabelNamespace | | | Slat | CurrentSlatState
SlatType | Name
SwingMode
CurrentTiltAngle
TargetTiltAngle | | SmokeSensor | SmokeDetected | Name
StatusActive
StatusFault
StatusTampered
StatusLowBattery | | Speaker | Mute | Name
Volume | | StatelessProgrammableSwitch | ProgrammableSwitchEvent | Name
ServiceLabelIndex | | Switch | On | Name | | TemperatureSensor | CurrentTemperature | Name
StatusActive
StatusFault
StatusTampered
StatusLowBattery | | Thermostat | CurrentHeatingCoolingState
TargetHeatingCoolingState
CurrentTemperature
TargetTemperature
TemperatureDisplayUnits | CoolingThresholdTemperature
CurrentRelativeHumidity
HeatingThresholdTemperature
Name
TargetRelativeHumidity | | Valve | Active
InUse
ValveType | SetDuration
RemainingDuration
IsConfigured
ServiceLabelIndex
StatusFault
Name | | Window | CurrentPosition
TargetPosition
PositionState | Name
HoldPosition
ObstructionDetected | | WindowCovering | CurrentPosition
TargetPosition
PositionState | Name
HoldPosition
CurrentHorizontalTiltAngle
TargetHorizontalTiltAngle
CurrentVerticalTiltAngle
TargetVerticalTiltAngle
ObstructionDetected |