85 KiB
HomeSpan Services and Characteristics
Below is a list of all Services supported by HomeSpan, along with a brief description of each Service. Click on the arrow next to the description of any Service to see a list of all Characteristics supported by the Service, as well as a description of each Characteristic.1
A blue diamond (🔹) next to a Characteristic means it is required for that Service, otherwise it is optional. Information included for each Characteristic is as follows:
- Format - the native format of the Characteristic's value. Note that string means a standard C-string (i.e. char *)
- Perms, where
- PR = Paired Read. This means HomeKit can read the value from HomeSpan2
- PW = Paired Write. This means HomeKit can write the value to HomeSpan, which triggers a call to
update() - EV = Event Notification. This means HomeSpan can push notifications of value changes to HomeKit using
setVal()
- Min / Max - the default minimum and maximum values allowed in HomeKit. For applicable numerical Characteristics, you can change the allowed minimum and maximum values using
setRange() - Constants/Defaults
- for enumerated Characteristics, a list of all allowed values in the form of pre-defined constant expressions and their equivalent numeric values. A check mark next to a constant indicates that it is the default value. If your Accessory does not support certain states of a Characteristic, you can change the allowed values using
setValidValues() - for all other Characteristics, the actual default value that is used if you do not specify one when instantiating the Characteristic
- for enumerated Characteristics, a list of all allowed values in the form of pre-defined constant expressions and their equivalent numeric values. A check mark next to a constant indicates that it is the default value. If your Accessory does not support certain states of a Characteristic, you can change the allowed values using
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 9 of HAP-R2, but without any spaces. HomeSpan Services are defined in HomeSpan's Service namespace. HomeSpan Characteristics are defined in HomeSpan's Characteristic namespace. For example, HomeSpan defines the Carbon Dioxide Sensor Service (HAP Service 8.7) as Service::CarbonDioxideSensor, and the Carbon Dioxide Detected Characteristic (HAP Characteristic 9.16) as Characteristic::CarbonDioxideDetected.
The pre-defined constant expressions for enumerated Characteristics are in namespaces that match the name of the Characteristic. For example, to set the Air Quality Characteristic of an Air Quality Sensor Service, you could use setVal(Characteristic::AirQuality::GOOD) or, equivalently, setVal(2).3
MANDATORY SERVICES
AccessoryInformation (3E)
Required Identification Information. For each Accessory in a HomeSpan device this must be included as the first Service.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
Identify (14) 🔹
| bool | PW | 1 | 1 |
|
Name (23)
| string | PR | - | - | "unnamed" |
FirmwareRevision (52)
| string | PR+EV | - | - | "1.0.0" |
Manufacturer (20)
| string | PR | - | - | "HomeSpan" |
Model (21)
| string | PR | - | - | "HomeSpan-ESP32" |
SerialNumber (30)
| string | PR | - | - | "HS-12345" |
HardwareRevision (53)
| string | PR | - | - | "1.0.0" |
LIGHTS, POWER, AND SWITCHES
BatteryService (96)
Defines a standalone Battery Service.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
BatteryLevel (68) 🔹
| uint8 | PR+EV | 0 | 100 | 100 |
ChargingState (8F) 🔹
| uint8 | PR+EV | 0 | 2 |
|
StatusLowBattery (79) 🔹
| uint8 | PR+EV | 0 | 1 |
|
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
LightBulb (43)
Defines any type of Light.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
On (25) 🔹
| bool | PR+PW+EV | 0 | 1 |
|
Brightness (8)
| int | PR+PW+EV | 0 | 100 | 0 |
Hue (13)
| float | PR+PW+EV | 0 | 360 | 0 |
Saturation (2F)
| float | PR+PW+EV | 0 | 100 | 0 |
ColorTemperature (CE)
| uint32 | PR+PW+EV | 140 | 500 | 200 |
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
Outlet (47)
Defines an controllable Outlet used to power any light or appliance.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
On (25) 🔹
| bool | PR+PW+EV | 0 | 1 |
|
OutletInUse (26) 🔹
| bool | PR+EV | 0 | 1 |
|
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
StatelessProgrammableSwitch (89)
Defines a "Stateless" Programmable Switch that can be used to trigger actions in the Home App.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
ProgrammableSwitchEvent (73) 🔹
| uint8 | PR+EV+NV | 0 | 2 |
|
ServiceLabelIndex (CB)
| uint8 | PR | 1 | 255 | 1 |
Switch (49)
Defines a generic Switch.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
On (25) 🔹
| bool | PR+PW+EV | 0 | 1 |
|
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
HEATING, VENTILATION, AND AIR CONDITIONING (HVAC)
AirPurifier (BB)
Defines a basic Air Purifier with an optional fan. Optional Linked Services: FilterMaintenance, AirQualitySensor, Fan, and Slat
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
Active (B0) 🔹
| uint8 | PW+PR+EV | 0 | 1 |
|
CurrentAirPurifierState (A9) 🔹
| uint8 | PR+EV | 0 | 2 |
|
TargetAirPurifierState (A8) 🔹
| uint8 | PW+PR+EV | 0 | 1 |
|
RotationSpeed (29)
| float | PR+PW+EV | 0 | 100 | 0 |
SwingMode (B6)
| uint8 | PR+EV+PW | 0 | 1 |
|
LockPhysicalControls (A7)
| uint8 | PW+PR+EV | 0 | 1 |
|
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
Fan (B7)
Defines a Fan. Can be used in conjunction with a LightBulb Service to create a Lighted Ceiling Fan.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
Active (B0) 🔹
| uint8 | PW+PR+EV | 0 | 1 |
|
CurrentFanState (AF)
| uint8 | PR+EV | 0 | 2 |
|
TargetFanState (BF)
| uint8 | PW+PR+EV | 0 | 1 |
|
RotationDirection (28)
| int | PR+PW+EV | 0 | 1 |
|
RotationSpeed (29)
| float | PR+PW+EV | 0 | 100 | 0 |
SwingMode (B6)
| uint8 | PR+EV+PW | 0 | 1 |
|
LockPhysicalControls (A7)
| uint8 | PW+PR+EV | 0 | 1 |
|
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
FilterMaintenance (BA)
Defines a Filter Maintainence check.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
FilterChangeIndication (AC) 🔹
| uint8 | PR+EV | 0 | 1 |
|
FilterLifeLevel (AB)
| float | PR+EV | 0 | 100 | 0 |
ResetFilterIndication (AD)
| uint8 | PW | 1 | 1 |
|
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
HeaterCooler (BC)
Defines a standalone Heater, Cooler, or combined Heater/Cooler. Can be used with a separate Fan Service and/or Slat Service to extend functionality.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
Active (B0) 🔹
| uint8 | PW+PR+EV | 0 | 1 |
|
CurrentTemperature (11) 🔹
| float | PR+EV | 0 | 100 | 0 |
CurrentHeaterCoolerState (B1) 🔹
| uint8 | PR+EV | 0 | 3 |
|
TargetHeaterCoolerState (B2) 🔹
| uint8 | PW+PR+EV | 0 | 2 |
|
RotationSpeed (29)
| float | PR+PW+EV | 0 | 100 | 0 |
TemperatureDisplayUnits (36)
| uint8 | PW+PR+EV | 0 | 1 |
|
SwingMode (B6)
| uint8 | PR+EV+PW | 0 | 1 |
|
CoolingThresholdTemperature (D)
| float | PR+PW+EV | 10 | 35 | 10 |
HeatingThresholdTemperature (12)
| float | PR+PW+EV | 0 | 25 | 16 |
LockPhysicalControls (A7)
| uint8 | PW+PR+EV | 0 | 1 |
|
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
HumidifierDehumidifier (BD)
Defines a Humidifer, Dehumidifier, or combined Humidifer/Dehumidifier. Can be used with a separate Fan Service and/or Slat Service to extend functionality.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
Active (B0) 🔹
| uint8 | PW+PR+EV | 0 | 1 |
|
CurrentRelativeHumidity (10) 🔹
| float | PR+EV | 0 | 100 | 0 |
CurrentHumidifierDehumidifierState (B3) 🔹
| uint8 | PR+EV | 0 | 3 |
|
TargetHumidifierDehumidifierState (B4) 🔹
| uint8 | PW+PR+EV | 0 | 2 |
|
RelativeHumidityDehumidifierThreshold (C9)
| float | PR+PW+EV | 0 | 100 | 50 |
RelativeHumidityHumidifierThreshold (CA)
| float | PR+PW+EV | 0 | 100 | 50 |
RotationSpeed (29)
| float | PR+PW+EV | 0 | 100 | 0 |
SwingMode (B6)
| uint8 | PR+EV+PW | 0 | 1 |
|
WaterLevel (B5)
| float | PR+EV | 0 | 100 | 0 |
LockPhysicalControls (A7)
| uint8 | PW+PR+EV | 0 | 1 |
|
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
Slat (B9)
Defines a motorized ventilation Slat(s).
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
CurrentSlatState (AA) 🔹
| uint8 | PR+EV | 0 | 2 |
|
SlatType (C0) 🔹
| uint8 | PR | 0 | 1 |
|
SwingMode (B6)
| uint8 | PR+EV+PW | 0 | 1 |
|
CurrentTiltAngle (C1)
| int | PR+EV | -90 | 90 | 0 |
TargetTiltAngle (C2)
| int | PW+PR+EV | -90 | 90 | 0 |
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
Thermostat (4A)
Defines a Thermostat used to control a furnace, air conditioner, or both.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
CurrentHeatingCoolingState (F) 🔹
| uint8 | PR+EV | 0 | 2 |
|
TargetHeatingCoolingState (33) 🔹
| uint8 | PW+PR+EV | 0 | 3 |
|
CurrentTemperature (11) 🔹
| float | PR+EV | 0 | 100 | 0 |
TargetTemperature (35) 🔹
| float | PW+PR+EV | 10 | 38 | 16 |
TemperatureDisplayUnits (36) 🔹
| uint8 | PW+PR+EV | 0 | 1 |
|
CoolingThresholdTemperature (D)
| float | PR+PW+EV | 10 | 35 | 10 |
CurrentRelativeHumidity (10)
| float | PR+EV | 0 | 100 | 0 |
HeatingThresholdTemperature (12)
| float | PR+PW+EV | 0 | 25 | 16 |
TargetRelativeHumidity (34)
| float | PW+PR+EV | 0 | 100 | 0 |
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
STANDALONE SENSORS
AirQualitySensor (8D)
Defines an Air Quality Sensor.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
AirQuality (95) 🔹
| uint8 | PR+EV | 0 | 5 |
|
OzoneDensity (C3)
| float | PR+EV | 0 | 1000 | 0 |
NitrogenDioxideDensity (C4)
| float | PR+EV | 0 | 1000 | 0 |
SulphurDioxideDensity (C5)
| float | PR+EV | 0 | 1000 | 0 |
PM25Density (C6)
| float | PR+EV | 0 | 1000 | 0 |
PM10Density (C7)
| float | PR+EV | 0 | 1000 | 0 |
VOCDensity (C8)
| float | PR+EV | 0 | 1000 | 0 |
StatusActive (75)
| bool | PR+EV | 0 | 1 |
|
StatusFault (77)
| uint8 | PR+EV | 0 | 1 |
|
StatusTampered (7A)
| uint8 | PR+EV | 0 | 1 |
|
StatusLowBattery (79)
| uint8 | PR+EV | 0 | 1 |
|
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
CarbonDioxideSensor (97)
Defines a Carbon Dioxide Sensor.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
CarbonDioxideDetected (92) 🔹
| uint8 | PR+EV | 0 | 1 |
|
CarbonDioxideLevel (93)
| float | PR+EV | 0 | 100000 | 0 |
CarbonDioxidePeakLevel (94)
| float | PR+EV | 0 | 100000 | 0 |
StatusActive (75)
| bool | PR+EV | 0 | 1 |
|
StatusFault (77)
| uint8 | PR+EV | 0 | 1 |
|
StatusTampered (7A)
| uint8 | PR+EV | 0 | 1 |
|
StatusLowBattery (79)
| uint8 | PR+EV | 0 | 1 |
|
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
CarbonMonoxideSensor (7F)
Defines a Carbon Monoxide Sensor.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
CarbonMonoxideDetected (69) 🔹
| uint8 | PR+EV | 0 | 1 |
|
CarbonMonoxideLevel (90)
| float | PR+EV | 0 | 100 | 0 |
CarbonMonoxidePeakLevel (91)
| float | PR+EV | 0 | 100 | 0 |
StatusActive (75)
| bool | PR+EV | 0 | 1 |
|
StatusFault (77)
| uint8 | PR+EV | 0 | 1 |
|
StatusTampered (7A)
| uint8 | PR+EV | 0 | 1 |
|
StatusLowBattery (79)
| uint8 | PR+EV | 0 | 1 |
|
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
ContactSensor (80)
Defines a Contact Sensor.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
ContactSensorState (6A) 🔹
| uint8 | PR+EV | 0 | 1 |
|
StatusActive (75)
| bool | PR+EV | 0 | 1 |
|
StatusFault (77)
| uint8 | PR+EV | 0 | 1 |
|
StatusTampered (7A)
| uint8 | PR+EV | 0 | 1 |
|
StatusLowBattery (79)
| uint8 | PR+EV | 0 | 1 |
|
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
HumiditySensor (82)
Defines a Humidity Sensor.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
CurrentRelativeHumidity (10) 🔹
| float | PR+EV | 0 | 100 | 0 |
StatusActive (75)
| bool | PR+EV | 0 | 1 |
|
StatusFault (77)
| uint8 | PR+EV | 0 | 1 |
|
StatusTampered (7A)
| uint8 | PR+EV | 0 | 1 |
|
StatusLowBattery (79)
| uint8 | PR+EV | 0 | 1 |
|
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
LeakSensor (83)
Defines a Leak Sensor.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
LeakDetected (70) 🔹
| uint8 | PR+EV | 0 | 1 |
|
StatusActive (75)
| bool | PR+EV | 0 | 1 |
|
StatusFault (77)
| uint8 | PR+EV | 0 | 1 |
|
StatusTampered (7A)
| uint8 | PR+EV | 0 | 1 |
|
StatusLowBattery (79)
| uint8 | PR+EV | 0 | 1 |
|
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
LightSensor (84)
Defines a Light Sensor.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
CurrentAmbientLightLevel (6B) 🔹
| float | PR+EV | 0.0001 | 100000 | 1 |
StatusActive (75)
| bool | PR+EV | 0 | 1 |
|
StatusFault (77)
| uint8 | PR+EV | 0 | 1 |
|
StatusTampered (7A)
| uint8 | PR+EV | 0 | 1 |
|
StatusLowBattery (79)
| uint8 | PR+EV | 0 | 1 |
|
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
MotionSensor (85)
Defines a Motion Sensor.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
MotionDetected (22) 🔹
| bool | PR+EV | 0 | 1 |
|
StatusActive (75)
| bool | PR+EV | 0 | 1 |
|
StatusFault (77)
| uint8 | PR+EV | 0 | 1 |
|
StatusTampered (7A)
| uint8 | PR+EV | 0 | 1 |
|
StatusLowBattery (79)
| uint8 | PR+EV | 0 | 1 |
|
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
OccupancySensor (86)
Defines and Occupancy Sensor.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
OccupancyDetected (71) 🔹
| uint8 | PR+EV | 0 | 1 |
|
StatusActive (75)
| bool | PR+EV | 0 | 1 |
|
StatusFault (77)
| uint8 | PR+EV | 0 | 1 |
|
StatusTampered (7A)
| uint8 | PR+EV | 0 | 1 |
|
StatusLowBattery (79)
| uint8 | PR+EV | 0 | 1 |
|
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
SmokeSensor (87)
Defines a Smoke Sensor.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
SmokeDetected (76) 🔹
| uint8 | PR+EV | 0 | 1 |
|
StatusActive (75)
| bool | PR+EV | 0 | 1 |
|
StatusFault (77)
| uint8 | PR+EV | 0 | 1 |
|
StatusTampered (7A)
| uint8 | PR+EV | 0 | 1 |
|
StatusLowBattery (79)
| uint8 | PR+EV | 0 | 1 |
|
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
TemperatureSensor (8A)
Defines a Temperature Sensor.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
CurrentTemperature (11) 🔹
| float | PR+EV | 0 | 100 | 0 |
StatusActive (75)
| bool | PR+EV | 0 | 1 |
|
StatusFault (77)
| uint8 | PR+EV | 0 | 1 |
|
StatusTampered (7A)
| uint8 | PR+EV | 0 | 1 |
|
StatusLowBattery (79)
| uint8 | PR+EV | 0 | 1 |
|
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
DOORS, LOCKS, AND WINDOWS
Door (81)
Defines a motorized Door.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
CurrentPosition (6D) 🔹
| uint8 | PR+EV | 0 | 100 | 0 |
TargetPosition (7C) 🔹
| uint8 | PW+PR+EV | 0 | 100 | 0 |
ObstructionDetected (24)
| bool | PR+EV | 0 | 1 |
|
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
Doorbell (121)
Defines a Doorbell. Can be used on a standalone basis or in conjunction with a LockMechanism Service.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
ProgrammableSwitchEvent (73) 🔹
| uint8 | PR+EV+NV | 0 | 2 |
|
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
GarageDoorOpener (41)
Defines a motorized Garage Door Opener.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
CurrentDoorState (E) 🔹
| uint8 | PR+EV | 0 | 4 |
|
TargetDoorState (32) 🔹
| uint8 | PW+PR+EV | 0 | 1 |
|
ObstructionDetected (24) 🔹
| bool | PR+EV | 0 | 1 |
|
LockCurrentState (1D)
| uint8 | PR+EV | 0 | 3 |
|
LockTargetState (1E)
| uint8 | PW+PR+EV | 0 | 1 |
|
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
LockMechanism (45)
Defines an electronic Lock.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
LockCurrentState (1D) 🔹
| uint8 | PR+EV | 0 | 3 |
|
LockTargetState (1E) 🔹
| uint8 | PW+PR+EV | 0 | 1 |
|
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
Window (8B)
Defines a motorized Window.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
CurrentPosition (6D) 🔹
| uint8 | PR+EV | 0 | 100 | 0 |
TargetPosition (7C) 🔹
| uint8 | PW+PR+EV | 0 | 100 | 0 |
ObstructionDetected (24)
| bool | PR+EV | 0 | 1 |
|
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
WindowCovering (8C)
Defines a motorized Window Shade, Screen, Awning, etc.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
TargetPosition (7C) 🔹
| uint8 | PW+PR+EV | 0 | 100 | 0 |
CurrentPosition (6D) 🔹
| uint8 | PR+EV | 0 | 100 | 0 |
CurrentHorizontalTiltAngle (6C)
| int | PR+EV | -90 | 90 | 0 |
TargetHorizontalTiltAngle (7B)
| int | PW+PR+EV | -90 | 90 | 0 |
CurrentVerticalTiltAngle (6E)
| int | PR+EV | -90 | 90 | 0 |
TargetVerticalTiltAngle (7D)
| int | PW+PR+EV | -90 | 90 | 0 |
ObstructionDetected (24)
| bool | PR+EV | 0 | 1 |
|
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
WATER SYSTEMS
Faucet (D7)
Defines the master control for a multi-Valve appliance. Linked Services: Valve (at least one required), and HeaterCooler (optional).
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
Active (B0) 🔹
| uint8 | PW+PR+EV | 0 | 1 |
|
StatusFault (77)
| uint8 | PR+EV | 0 | 1 |
|
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
IrrigationSystem (CF)
Defines an Irrigation System. Linked Services: Valve Service (at least one required).
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
Active (B0) 🔹
| uint8 | PW+PR+EV | 0 | 1 |
|
ProgramMode (D1) 🔹
| uint8 | PR+EV | 0 | 2 |
|
InUse (D2) 🔹
| uint8 | PR+EV | 0 | 1 |
|
RemainingDuration (D4)
| uint32 | PR+EV | 0 | 3600 | 60 |
StatusFault (77)
| uint8 | PR+EV | 0 | 1 |
|
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
Valve (D0)
Defines an electronic Valve. Can be used standalone or as a Linked Service in conjunction with the Faucet and IrrigationSystem Services.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
Active (B0) 🔹
| uint8 | PW+PR+EV | 0 | 1 |
|
InUse (D2) 🔹
| uint8 | PR+EV | 0 | 1 |
|
ValveType (D5) 🔹
| uint8 | PR+EV | 0 | 3 |
|
SetDuration (D3)
| uint32 | PW+PR+EV | 0 | 3600 | 60 |
RemainingDuration (D4)
| uint32 | PR+EV | 0 | 3600 | 60 |
IsConfigured (D6)
| uint8 | PR+EV | 0 | 1 |
|
ServiceLabelIndex (CB)
| uint8 | PR | 1 | 255 | 1 |
StatusFault (77)
| uint8 | PR+EV | 0 | 1 |
|
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
SECURITY SYSTEMS
SecuritySystem (7E)
Defines a Security System. Often combined with MotionSensor and ContactSensor Services.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
SecuritySystemCurrentState (66) 🔹
| uint8 | PR+EV | 0 | 4 |
|
SecuritySystemTargetState (67) 🔹
| uint8 | PW+PR+EV | 0 | 3 |
|
SecuritySystemAlarmType (8E)
| uint8 | PR+EV | 0 | 1 |
|
StatusFault (77)
| uint8 | PR+EV | 0 | 1 |
|
StatusTampered (7A)
| uint8 | PR+EV | 0 | 1 |
|
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
TELEVISIONS
InputSource (D9)
Defines an Input Source for a TV. Use only as a Linked Service for the Television Service.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
Identifier (E6) 🔹
| uint32 | PR | 0 | 255 | 0 |
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
IsConfigured (D6)
| uint8 | PR+EV | 0 | 1 |
|
CurrentVisibilityState (135)
| uint8 | PR+EV | 0 | 1 |
|
TargetVisibilityState (134)
| uint8 | PW+PR+EV | 0 | 1 |
|
Television (D8)
Defines a TV. Optional Linked Services: InputSource and TelevisionSpeaker.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
Active (B0) 🔹
| uint8 | PW+PR+EV | 0 | 1 |
|
ActiveIdentifier (E7)
| uint32 | PW+PR+EV | 0 | 255 | 0 |
RemoteKey (E1)
| uint8 | PW | 4 | 15 |
|
PowerModeSelection (DF)
| uint8 | PW | 0 | 0 |
|
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
TelevisionSpeaker (113)
Defines a Television Speaker that can be controlled via the Remote Control widget on an iPhone. Use only as a Linked Service for the Television Service.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
VolumeControlType (E9) 🔹
| uint8 | PR+EV | 0 | 3 |
|
VolumeSelector (EA) 🔹
| uint8 | PW | 0 | 1 |
|
ConfiguredName (E3)
| string | PW+PR+EV | - | - | "unnamed" |
MISCELLANEOUS
ServiceLabel (CC)
Groups together un-named (or un-nameable) Services by Linking them to this Service. When used, those other Services must each include a ServiceLabelIndex Characteristic with a unique value. Rarely needed.
| Characteristic | Format | Perms | Min | Max | Constants/Defaults |
|---|---|---|---|---|---|
ServiceLabelNamespace (CD) 🔹
| uint8 | PR | 0 | 1 |
|
↩️ Back to the Welcome page
-
The hexidecimal numbers in parentheses next to each Service and Characteristic represent the short-form of the Apple's UUID for that Service or Characteristic. These are provided for informational purposes only (you do not need to use them, or even know about them, to create HomeSpan sketches) ↩︎
-
Though rarely needed, you can change the permissions of a Characteristic using
setPerms(),addPerms(), andremovePerms()↩︎ -
Note that a Characteristic's pre-defined constants are inherited by objects that you create from that Characteristic. This means that if you create a pointer to the AirQuality Characteristic using
Characteristic::AirQuality *air = new Characteristic::AirQuality;then later in your code you can either say
air->setVal(Characteristic::AirQuality::GOOD)orair->GOOD. Both will work, but the latter is much easier to type. ↩︎