diff --git a/docs/ServiceList.md b/docs/ServiceList.md index 2fd83d0..69b9aea 100644 --- a/docs/ServiceList.md +++ b/docs/ServiceList.md @@ -31,11 +31,12 @@ The pre-defined constant expressions for enumerated Characteristics are in names +## Mandatory Services ### AccessoryInformation (3E) - Required Identification Information. For each Accessory in a HomeSpan device this must be included as the first Service.
+ Required Identification Information. For each Accessory in a HomeSpan device this must be included as the first Service.
- + @@ -43,8 +44,52 @@ The pre-defined constant expressions for enumerated Characteristics are in names
CharacteristicFormatPermsMinMaxConstants/Defaults
Identify (14) :small_blue_diamond:
  • triggers an update when HomeKit wants HomeSpan to run its identification routine for an Accessory
boolPW11
  • RUN_ID (1) 
Name (23)
  • default name of a Service used only during initial pairing
stringPR--"unnamed"
Name (23)
  • default name of a Service used only during initial pairing
stringPR--"unnamed"
FirmwareRevision (52)
  • must be in form x[.y[.z]] - informational only
stringPR+EV--"1.0.0"
Manufacturer (20)
  • any string - informational only
stringPR--"HomeSpan"
Model (21)
  • any string - informational only
stringPR--"HomeSpan-ESP32"
HardwareRevision (53)
  • must be in form x[.y[.z]] - informational only
stringPR--"1.0.0"
+## Lights, Power, and Switches +### BatteryService (96) + Defines a standalone Battery Service.
+ + + + + +
CharacteristicFormatPermsMinMaxConstants/Defaults
BatteryLevel (68) :small_blue_diamond:
  • measured as a percentage
uint8PR+EV0100100
ChargingState (8F) :small_blue_diamond:
  • indicates state of battery charging
uint8PR+EV02
  • NOT_CHARGING (0) :heavy_check_mark:
  • CHARGING (1) 
  • NOT_CHARGEABLE (2) 
StatusLowBattery (79) :small_blue_diamond:
  • indicates state of battery
uint8PR+EV01
  • NOT_LOW_BATTERY (0) :heavy_check_mark:
  • LOW_BATTERY (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
+ +### LightBulb (43) + Defines any type of Light.
+ + + + + + + +
CharacteristicFormatPermsMinMaxConstants/Defaults
On (25) :small_blue_diamond:
  • indicates if the Service is active/on
boolPR+PW+EV01
  • OFF (0) :heavy_check_mark:
  • ON (1) 
Brightness (8)
  • measured as a percentage
intPR+PW+EV01000
Hue (13)
  • color (in degrees) from red (0) to green (120) to blue (240) and back to red (360)
floatPR+PW+EV03600
Saturation (2F)
  • color saturation, measured as a percentage
floatPR+PW+EV01000
ColorTemperature (CE)
  • measured in inverse megaKelvin (= 1,000,000 / Kelvin)
uint32PR+PW+EV140500200
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
+ +### Outlet (47) + Defines an controllable Outlet used to power any light or appliance.
+ + + + +
CharacteristicFormatPermsMinMaxConstants/Defaults
On (25) :small_blue_diamond:
  • indicates if the Service is active/on
boolPR+PW+EV01
  • OFF (0) :heavy_check_mark:
  • ON (1) 
OutletInUse (26) :small_blue_diamond:
  • indicates if an appliance or light is plugged into the outlet, regardless of whether on or off
boolPR+EV01
  • NOT_IN_USE (0) :heavy_check_mark:
  • IN_USE (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
+ +### StatelessProgrammableSwitch (89) + Defines a "Stateless" Programmable Switch that can be used to trigger actions in the Home App.
+ + + +
CharacteristicFormatPermsMinMaxConstants/Defaults
ProgrammableSwitchEvent (73) :small_blue_diamond:
  • specifies type of button press
uint8PR+EV+NV02
  • SINGLE_PRESS (0) :heavy_check_mark:
  • DOUBLE_PRESS (1) 
  • LONG_PRESS (2) 
ServiceLabelIndex (CB)
  • numerical index used to distinguish multiple copies of the same Service within an Accessory
uint8PR12551
+ +### Switch (49) + Defines a generic Switch.
+ + + +
CharacteristicFormatPermsMinMaxConstants/Defaults
On (25) :small_blue_diamond:
  • indicates if the Service is active/on
boolPR+PW+EV01
  • OFF (0) :heavy_check_mark:
  • ON (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+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
+ Defines a basic Air Purifier with an optional fan. Optional Linked Services: FilterMaintenance, AirQualitySensor, Fan, and Slat
@@ -55,87 +100,8 @@ The pre-defined constant expressions for enumerated Characteristics are in names
CharacteristicFormatPermsMinMaxConstants/Defaults
Active (B0) :small_blue_diamond:
  • indicates if the Service is active/on
uint8PW+PR+EV01
  • INACTIVE (0) :heavy_check_mark:
  • ACTIVE (1) 
CurrentAirPurifierState (A9) :small_blue_diamond:
  • indicates current state of air purification
uint8PR+EV02
  • INACTIVE (0) 
  • IDLE (1) :heavy_check_mark:
  • PURIFYING (2) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
-### AirQualitySensor (8D) - Defines an Air Quality Sensor.
- - - - - - - - - - - - - -
CharacteristicFormatPermsMinMaxConstants/Defaults
AirQuality (95) :small_blue_diamond:
  • a subjective description
uint8PR+EV05
  • UNKNOWN (0) :heavy_check_mark:
  • EXCELLENT (1) 
  • GOOD (2) 
  • FAIR (3) 
  • INFERIOR (4) 
  • POOR (5) 
OzoneDensity (C3)
  • measured in µg/m3
floatPR+EV010000
NitrogenDioxideDensity (C4)
  • measured in µg/m3
floatPR+EV010000
SulphurDioxideDensity (C5)
  • measured in µg/m3
floatPR+EV010000
PM25Density (C6)
  • 2.5-micron particulate density, measured in µg/m3
floatPR+EV010000
PM10Density (C7)
  • 10-micron particulate density, measured in µg/m3
floatPR+EV010000
VOCDensity (C8)
  • measured in µg/m3
floatPR+EV010000
StatusActive (75)
  • indicates whether the Service is properly functioning
boolPR+EV01
  • NOT_FUNCTIONING (0) 
  • FUNCTIONING (1) :heavy_check_mark:
StatusFault (77)
  • indicates whether the Service has a fault
uint8PR+EV01
  • NO_FAULT (0) :heavy_check_mark:
  • FAULT (1) 
StatusTampered (7A)
  • indicates whether the Service has been tampered with
uint8PR+EV01
  • NOT_TAMPERED (0) :heavy_check_mark:
  • TAMPERED (1) 
StatusLowBattery (79)
  • indicates state of battery
uint8PR+EV01
  • NOT_LOW_BATTERY (0) :heavy_check_mark:
  • LOW_BATTERY (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
- -### BatteryService (96) - Defines a standalone Battery Service.
- - - - - -
CharacteristicFormatPermsMinMaxConstants/Defaults
BatteryLevel (68) :small_blue_diamond:
  • measured as a percentage
uint8PR+EV0100100
ChargingState (8F) :small_blue_diamond:
  • indicates state of battery charging
uint8PR+EV02
  • NOT_CHARGING (0) :heavy_check_mark:
  • CHARGING (1) 
  • NOT_CHARGEABLE (2) 
StatusLowBattery (79) :small_blue_diamond:
  • indicates state of battery
uint8PR+EV01
  • NOT_LOW_BATTERY (0) :heavy_check_mark:
  • LOW_BATTERY (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
- -### CarbonDioxideSensor (97) - Defines a Carbon Dioxide Sensor.
- - - - - - - - - -
CharacteristicFormatPermsMinMaxConstants/Defaults
CarbonDioxideDetected (92) :small_blue_diamond:
  • indicates if abnormal level is detected
uint8PR+EV01
  • NORMAL (0) :heavy_check_mark:
  • ABNORMAL (1) 
CarbonDioxideLevel (93)
  • measured on parts per million (ppm)
floatPR+EV01000000
CarbonDioxidePeakLevel (94)
  • measured in parts per million (ppm)
floatPR+EV01000000
StatusActive (75)
  • indicates whether the Service is properly functioning
boolPR+EV01
  • NOT_FUNCTIONING (0) 
  • FUNCTIONING (1) :heavy_check_mark:
StatusFault (77)
  • indicates whether the Service has a fault
uint8PR+EV01
  • NO_FAULT (0) :heavy_check_mark:
  • FAULT (1) 
StatusTampered (7A)
  • indicates whether the Service has been tampered with
uint8PR+EV01
  • NOT_TAMPERED (0) :heavy_check_mark:
  • TAMPERED (1) 
StatusLowBattery (79)
  • indicates state of battery
uint8PR+EV01
  • NOT_LOW_BATTERY (0) :heavy_check_mark:
  • LOW_BATTERY (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
- -### CarbonMonoxideSensor (7F) - Defines a Carbon Monoxide Sensor.
- - - - - - - - - -
CharacteristicFormatPermsMinMaxConstants/Defaults
CarbonMonoxideDetected (69) :small_blue_diamond:
  • indicates if abnormal level is detected
uint8PR+EV01
  • NORMAL (0) :heavy_check_mark:
  • ABNORMAL (1) 
CarbonMonoxideLevel (90)
  • measured in parts per million (ppm)
floatPR+EV01000
CarbonMonoxidePeakLevel (91)
  • measured in parts per million (ppm)
floatPR+EV01000
StatusActive (75)
  • indicates whether the Service is properly functioning
boolPR+EV01
  • NOT_FUNCTIONING (0) 
  • FUNCTIONING (1) :heavy_check_mark:
StatusFault (77)
  • indicates whether the Service has a fault
uint8PR+EV01
  • NO_FAULT (0) :heavy_check_mark:
  • FAULT (1) 
StatusTampered (7A)
  • indicates whether the Service has been tampered with
uint8PR+EV01
  • NOT_TAMPERED (0) :heavy_check_mark:
  • TAMPERED (1) 
StatusLowBattery (79)
  • indicates state of battery
uint8PR+EV01
  • NOT_LOW_BATTERY (0) :heavy_check_mark:
  • LOW_BATTERY (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
- -### ContactSensor (80) - Defines a Contact Sensor.
- - - - - - - -
CharacteristicFormatPermsMinMaxConstants/Defaults
ContactSensorState (6A) :small_blue_diamond:
  • indictates if contact is detected (i.e. closed)
uint8PR+EV01
  • DETECTED (0) 
  • NOT_DETECTED (1) :heavy_check_mark:
StatusActive (75)
  • indicates whether the Service is properly functioning
boolPR+EV01
  • NOT_FUNCTIONING (0) 
  • FUNCTIONING (1) :heavy_check_mark:
StatusFault (77)
  • indicates whether the Service has a fault
uint8PR+EV01
  • NO_FAULT (0) :heavy_check_mark:
  • FAULT (1) 
StatusTampered (7A)
  • indicates whether the Service has been tampered with
uint8PR+EV01
  • NOT_TAMPERED (0) :heavy_check_mark:
  • TAMPERED (1) 
StatusLowBattery (79)
  • indicates state of battery
uint8PR+EV01
  • NOT_LOW_BATTERY (0) :heavy_check_mark:
  • LOW_BATTERY (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
- -### Door (81) - Defines a motorized Door.
- - - - - -
CharacteristicFormatPermsMinMaxConstants/Defaults
CurrentPosition (6D) :small_blue_diamond:
  • current position (as a percentage) from fully closed (0) to full open (100)
uint8PR+EV01000
TargetPosition (7C) :small_blue_diamond:
  • indicates target position (as a percentage) from fully closed (0) to full open (100)
uint8PW+PR+EV01000
ObstructionDetected (24)
  • indicates if obstruction is detected
boolPR+EV01
  • NOT_DETECTED (0) :heavy_check_mark:
  • DETECTED (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
- -### Doorbell (121) - Defines a Doorbell. Can be used on a standalone basis or in conjunction with a LockMechanism Service.
- - - -
CharacteristicFormatPermsMinMaxConstants/Defaults
ProgrammableSwitchEvent (73) :small_blue_diamond:
  • specifies type of button press
uint8PR+EV+NV02
  • SINGLE_PRESS (0) :heavy_check_mark:
  • DOUBLE_PRESS (1) 
  • LONG_PRESS (2) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
- ### Fan (B7) - Defines a Fan. Can be used in conjunction with a LightBulb Service to create a Lighted Ceiling Fan.
+ Defines a Fan. Can be used in conjunction with a LightBulb Service to create a Lighted Ceiling Fan.
@@ -147,16 +113,8 @@ The pre-defined constant expressions for enumerated Characteristics are in names
CharacteristicFormatPermsMinMaxConstants/Defaults
Active (B0) :small_blue_diamond:
  • indicates if the Service is active/on
uint8PW+PR+EV01
  • INACTIVE (0) :heavy_check_mark:
  • ACTIVE (1) 
CurrentFanState (AF)
  • indicates current state of a fan
uint8PR+EV02
  • INACTIVE (0) 
  • IDLE (1) :heavy_check_mark:
  • BLOWING (2) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
-### Faucet (D7) - Defines the master control for a multi-Valve appliance. Linked Services: Valve (at least one required), and HeaterCooler (optional).
- - - - -
CharacteristicFormatPermsMinMaxConstants/Defaults
Active (B0) :small_blue_diamond:
  • indicates if the Service is active/on
uint8PW+PR+EV01
  • INACTIVE (0) :heavy_check_mark:
  • ACTIVE (1) 
StatusFault (77)
  • indicates whether the Service has a fault
uint8PR+EV01
  • NO_FAULT (0) :heavy_check_mark:
  • FAULT (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
- ### FilterMaintenance (BA) - Defines a Filter Maintainence check.
+ Defines a Filter Maintainence check.
@@ -164,20 +122,8 @@ The pre-defined constant expressions for enumerated Characteristics are in names
CharacteristicFormatPermsMinMaxConstants/Defaults
FilterChangeIndication (AC) :small_blue_diamond:
  • indicates state of filter
uint8PR+EV01
  • NO_CHANGE_NEEDED (0) :heavy_check_mark:
  • CHANGE_NEEDED (1) 
FilterLifeLevel (AB)
  • measures as a percentage of remaining life
floatPR+EV01000
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
-### GarageDoorOpener (41) - Defines a motorized Garage Door Opener.
- - - - - - - - -
CharacteristicFormatPermsMinMaxConstants/Defaults
CurrentDoorState (E) :small_blue_diamond:
  • indicates current state of a door
uint8PR+EV04
  • OPEN (0) 
  • CLOSED (1) :heavy_check_mark:
  • OPENING (2) 
  • CLOSING (3) 
  • STOPPED (4) 
TargetDoorState (32) :small_blue_diamond:
  • indicates desired state of door
uint8PW+PR+EV01
  • OPEN (0) 
  • CLOSED (1) :heavy_check_mark:
ObstructionDetected (24) :small_blue_diamond:
  • indicates if obstruction is detected
boolPR+EV01
  • NOT_DETECTED (0) :heavy_check_mark:
  • DETECTED (1) 
LockCurrentState (1D)
  • indicates state of a lock
uint8PR+EV03
  • UNLOCKED (0) :heavy_check_mark:
  • LOCKED (1) 
  • JAMMED (2) 
  • UNKNOWN (3) 
LockTargetState (1E)
  • indicates desired state of lock
uint8PW+PR+EV01
  • UNLOCK (0) :heavy_check_mark:
  • LOCK (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
Version (37) :small_blue_diamond:
  • unused
stringPR--"1.0.0"
- ### 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.
+ Defines a standalone Heater, Cooler, or combined Heater/Cooler. Can be used with a separate Fan Service and/or Slat Service to extend functionality.
@@ -193,7 +139,7 @@ The pre-defined constant expressions for enumerated Characteristics are in names
CharacteristicFormatPermsMinMaxConstants/Defaults
Active (B0) :small_blue_diamond:
  • indicates if the Service is active/on
uint8PW+PR+EV01
  • INACTIVE (0) :heavy_check_mark:
  • ACTIVE (1) 
CurrentTemperature (11) :small_blue_diamond:
  • current temperature measured in Celsius
floatPR+EV01000
### 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.
+ Defines a Humidifer, Dehumidifier, or combined Humidifer/Dehumidifier. Can be used with a separate Fan Service and/or Slat Service to extend functionality.
@@ -208,131 +154,8 @@ The pre-defined constant expressions for enumerated Characteristics are in names
CharacteristicFormatPermsMinMaxConstants/Defaults
Active (B0) :small_blue_diamond:
  • indicates if the Service is active/on
uint8PW+PR+EV01
  • INACTIVE (0) :heavy_check_mark:
  • ACTIVE (1) 
CurrentRelativeHumidity (10) :small_blue_diamond:
  • current humidity measured as a percentage
floatPR+EV01000
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
-### HumiditySensor (82) - Defines a Humidity Sensor.
- - - - - - - -
CharacteristicFormatPermsMinMaxConstants/Defaults
CurrentRelativeHumidity (10) :small_blue_diamond:
  • current humidity measured as a percentage
floatPR+EV01000
StatusActive (75)
  • indicates whether the Service is properly functioning
boolPR+EV01
  • NOT_FUNCTIONING (0) 
  • FUNCTIONING (1) :heavy_check_mark:
StatusFault (77)
  • indicates whether the Service has a fault
uint8PR+EV01
  • NO_FAULT (0) :heavy_check_mark:
  • FAULT (1) 
StatusTampered (7A)
  • indicates whether the Service has been tampered with
uint8PR+EV01
  • NOT_TAMPERED (0) :heavy_check_mark:
  • TAMPERED (1) 
StatusLowBattery (79)
  • indicates state of battery
uint8PR+EV01
  • NOT_LOW_BATTERY (0) :heavy_check_mark:
  • LOW_BATTERY (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
- -### InputSource (D9) - Defines an Input Source for a TV. Use only as a Linked Service for the Television Service.
- - - - - - -
CharacteristicFormatPermsMinMaxConstants/Defaults
Identifier (E6) :small_blue_diamond:
  • numerical Identifer of the InputSource.
uint32PR02550
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
IsConfigured (D6)
  • indicates if a predefined Service has been configured
uint8PR+EV01
  • NOT_CONFIGURED (0) :heavy_check_mark:
  • CONFIGURED (1) 
CurrentVisibilityState (135)
  • current visibility of the Service, as selectable on the Settings Page of the Home App
uint8PR+EV01
  • VISIBLE (0) :heavy_check_mark:
  • NOT_VISIBLE (1) 
TargetVisibilityState (134)
  • indicates desired visibility of the Service, as selectable on the Settings Page of the Home App
uint8PW+PR+EV01
  • VISIBLE (0) :heavy_check_mark:
  • NOT_VISIBLE (1) 
- -### IrrigationSystem (CF) - Defines an Irrigation System. Linked Services: Valve Service (at least one required).
- - - - - - - -
CharacteristicFormatPermsMinMaxConstants/Defaults
Active (B0) :small_blue_diamond:
  • indicates if the Service is active/on
uint8PW+PR+EV01
  • INACTIVE (0) :heavy_check_mark:
  • ACTIVE (1) 
ProgramMode (D1) :small_blue_diamond:
  • indicates if pre-scheduled program is running
uint8PR+EV02
  • NONE (0) :heavy_check_mark:
  • SCHEDULED (1) 
  • SCHEDULE_OVERRIDEN (2) 
InUse (D2) :small_blue_diamond:
  • if Service is set to active, this indictes whether it is currently in use
uint8PR+EV01
  • NOT_IN_USE (0) :heavy_check_mark:
  • IN_USE (1) 
RemainingDuration (D4)
  • duration (in seconds) remaining for Service to be active/on
uint32PR+EV0360060
StatusFault (77)
  • indicates whether the Service has a fault
uint8PR+EV01
  • NO_FAULT (0) :heavy_check_mark:
  • FAULT (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
- -### LeakSensor (83) - Defines a Leak Sensor.
- - - - - - - -
CharacteristicFormatPermsMinMaxConstants/Defaults
LeakDetected (70) :small_blue_diamond:
  • indictates if a leak is detected
uint8PR+EV01
  • NOT_DETECTED (0) :heavy_check_mark:
  • DETECTED (1) 
StatusActive (75)
  • indicates whether the Service is properly functioning
boolPR+EV01
  • NOT_FUNCTIONING (0) 
  • FUNCTIONING (1) :heavy_check_mark:
StatusFault (77)
  • indicates whether the Service has a fault
uint8PR+EV01
  • NO_FAULT (0) :heavy_check_mark:
  • FAULT (1) 
StatusTampered (7A)
  • indicates whether the Service has been tampered with
uint8PR+EV01
  • NOT_TAMPERED (0) :heavy_check_mark:
  • TAMPERED (1) 
StatusLowBattery (79)
  • indicates state of battery
uint8PR+EV01
  • NOT_LOW_BATTERY (0) :heavy_check_mark:
  • LOW_BATTERY (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
- -### LightBulb (43) - Defines any type of Light.
- - - - - - - -
CharacteristicFormatPermsMinMaxConstants/Defaults
On (25) :small_blue_diamond:
  • indicates if the Service is active/on
boolPR+PW+EV01
  • OFF (0) :heavy_check_mark:
  • ON (1) 
Brightness (8)
  • measured as a percentage
intPR+PW+EV01000
Hue (13)
  • color (in degrees) from red (0) to green (120) to blue (240) and back to red (360)
floatPR+PW+EV03600
Saturation (2F)
  • color saturation, measured as a percentage
floatPR+PW+EV01000
ColorTemperature (CE)
  • measured in inverse megaKelvin (= 1,000,000 / Kelvin)
uint32PR+PW+EV140500200
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
- -### LightSensor (84) - Defines a Light Sensor.
- - - - - - - -
CharacteristicFormatPermsMinMaxConstants/Defaults
CurrentAmbientLightLevel (6B) :small_blue_diamond:
  • measured in Lux (lumens/m2
floatPR+EV0.00011000001
StatusActive (75)
  • indicates whether the Service is properly functioning
boolPR+EV01
  • NOT_FUNCTIONING (0) 
  • FUNCTIONING (1) :heavy_check_mark:
StatusFault (77)
  • indicates whether the Service has a fault
uint8PR+EV01
  • NO_FAULT (0) :heavy_check_mark:
  • FAULT (1) 
StatusTampered (7A)
  • indicates whether the Service has been tampered with
uint8PR+EV01
  • NOT_TAMPERED (0) :heavy_check_mark:
  • TAMPERED (1) 
StatusLowBattery (79)
  • indicates state of battery
uint8PR+EV01
  • NOT_LOW_BATTERY (0) :heavy_check_mark:
  • LOW_BATTERY (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
- -### LockMechanism (45) - Defines an electronic Lock.
- - - - - - - -
CharacteristicFormatPermsMinMaxConstants/Defaults
LockCurrentState (1D) :small_blue_diamond:
  • indicates state of a lock
uint8PR+EV03
  • UNLOCKED (0) :heavy_check_mark:
  • LOCKED (1) 
  • JAMMED (2) 
  • UNKNOWN (3) 
LockTargetState (1E) :small_blue_diamond:
  • indicates desired state of lock
uint8PW+PR+EV01
  • UNLOCK (0) :heavy_check_mark:
  • LOCK (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
Mute (11A) :small_blue_diamond:
  • not used
boolPW+PR+EV01
  • OFF (0) :heavy_check_mark:
  • ON (1) 
Volume (119)
  • unused
uint8PW+PR+EV01000
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
- -### MotionSensor (85) - Defines a Motion Sensor.
- - - - - - - -
CharacteristicFormatPermsMinMaxConstants/Defaults
MotionDetected (22) :small_blue_diamond:
  • indicates if motion is detected
boolPR+EV01
  • NOT_DETECTED (0) :heavy_check_mark:
  • DETECTED (1) 
StatusActive (75)
  • indicates whether the Service is properly functioning
boolPR+EV01
  • NOT_FUNCTIONING (0) 
  • FUNCTIONING (1) :heavy_check_mark:
StatusFault (77)
  • indicates whether the Service has a fault
uint8PR+EV01
  • NO_FAULT (0) :heavy_check_mark:
  • FAULT (1) 
StatusTampered (7A)
  • indicates whether the Service has been tampered with
uint8PR+EV01
  • NOT_TAMPERED (0) :heavy_check_mark:
  • TAMPERED (1) 
StatusLowBattery (79)
  • indicates state of battery
uint8PR+EV01
  • NOT_LOW_BATTERY (0) :heavy_check_mark:
  • LOW_BATTERY (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
- -### OccupancySensor (86) - Defines and Occupancy Sensor.
- - - - - - - -
CharacteristicFormatPermsMinMaxConstants/Defaults
OccupancyDetected (71) :small_blue_diamond:
  • indicates if occupanccy is detected
uint8PR+EV01
  • NOT_DETECTED (0) :heavy_check_mark:
  • DETECTED (1) 
StatusActive (75)
  • indicates whether the Service is properly functioning
boolPR+EV01
  • NOT_FUNCTIONING (0) 
  • FUNCTIONING (1) :heavy_check_mark:
StatusFault (77)
  • indicates whether the Service has a fault
uint8PR+EV01
  • NO_FAULT (0) :heavy_check_mark:
  • FAULT (1) 
StatusTampered (7A)
  • indicates whether the Service has been tampered with
uint8PR+EV01
  • NOT_TAMPERED (0) :heavy_check_mark:
  • TAMPERED (1) 
StatusLowBattery (79)
  • indicates state of battery
uint8PR+EV01
  • NOT_LOW_BATTERY (0) :heavy_check_mark:
  • LOW_BATTERY (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
- -### Outlet (47) - Defines an controllable Outlet used to power any light or appliance.
- - - - -
CharacteristicFormatPermsMinMaxConstants/Defaults
On (25) :small_blue_diamond:
  • indicates if the Service is active/on
boolPR+PW+EV01
  • OFF (0) :heavy_check_mark:
  • ON (1) 
OutletInUse (26) :small_blue_diamond:
  • indicates if an appliance or light is plugged into the outlet, regardless of whether on or off
boolPR+EV01
  • NOT_IN_USE (0) :heavy_check_mark:
  • IN_USE (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
- -### SecuritySystem (7E) - Defines a Security System.
- - - - - - - -
CharacteristicFormatPermsMinMaxConstants/Defaults
SecuritySystemCurrentState (66) :small_blue_diamond:
  • indicates current state of the security system
uint8PR+EV04
  • ARMED_STAY (0) 
  • ARMED_AWAY (1) 
  • ARMED_NIGHT (2) 
  • DISARMED (3) :heavy_check_mark:
  • ALARM_TRIGGERED (4) 
SecuritySystemTargetState (67) :small_blue_diamond:
  • indicates desired state of the security system
uint8PW+PR+EV03
  • ARM_STAY (0) 
  • ARM_AWAY (1) 
  • ARM_NIGHT (2) 
  • DISARM (3) :heavy_check_mark:
SecuritySystemAlarmType (8E)
  • indicates whether alarm was triggered for known reason
uint8PR+EV01
  • KNOWN (0) :heavy_check_mark:
  • UNKNOWN (1) 
StatusFault (77)
  • indicates whether the Service has a fault
uint8PR+EV01
  • NO_FAULT (0) :heavy_check_mark:
  • FAULT (1) 
StatusTampered (7A)
  • indicates whether the Service has been tampered with
uint8PR+EV01
  • NOT_TAMPERED (0) :heavy_check_mark:
  • TAMPERED (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
- -### 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.
- - -
CharacteristicFormatPermsMinMaxConstants/Defaults
ServiceLabelNamespace (CD) :small_blue_diamond:
  • indicates how un-named Services linked together with a ServiceLabel Service should be displayed in the Home App
uint8PR01
  • DOTS (0) 
  • NUMERALS (1) :heavy_check_mark:
- ### Slat (B9) - Defines a motorized ventilation Slat(s).
+ Defines a motorized ventilation Slat(s).
@@ -342,65 +165,8 @@ The pre-defined constant expressions for enumerated Characteristics are in names
CharacteristicFormatPermsMinMaxConstants/Defaults
CurrentSlatState (AA) :small_blue_diamond:
  • indicates current state of slats
uint8PR+EV02
  • FIXED (0) :heavy_check_mark:
  • JAMMED (1) 
  • SWINGING (2) 
SlatType (C0) :small_blue_diamond:
  • indicates the direction of a slat or group of slats
uint8PR01
  • HORIZONTAL (0) :heavy_check_mark:
  • VERTICAL (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
-### SmokeSensor (87) - Defines a Smoke Sensor.
- - - - - - - - - - -
CharacteristicFormatPermsMinMaxConstants/Defaults
SmokeDetected (76) :small_blue_diamond:
  • indicates if smoke is detected
uint8PR+EV01
  • NOT_DETECTED (0) :heavy_check_mark:
  • DETECTED (1) 
StatusActive (75)
  • indicates whether the Service is properly functioning
boolPR+EV01
  • NOT_FUNCTIONING (0) 
  • FUNCTIONING (1) :heavy_check_mark:
StatusFault (77)
  • indicates whether the Service has a fault
uint8PR+EV01
  • NO_FAULT (0) :heavy_check_mark:
  • FAULT (1) 
StatusTampered (7A)
  • indicates whether the Service has been tampered with
uint8PR+EV01
  • NOT_TAMPERED (0) :heavy_check_mark:
  • TAMPERED (1) 
StatusLowBattery (79)
  • indicates state of battery
uint8PR+EV01
  • NOT_LOW_BATTERY (0) :heavy_check_mark:
  • LOW_BATTERY (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
Mute (11A) :small_blue_diamond:
  • not used
boolPW+PR+EV01
  • OFF (0) :heavy_check_mark:
  • ON (1) 
Volume (119)
  • unused
uint8PW+PR+EV01000
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
- -### StatelessProgrammableSwitch (89) - Defines a "Stateless" Programmable Switch that can be used to trigger actions in the Home App.
- - - -
CharacteristicFormatPermsMinMaxConstants/Defaults
ProgrammableSwitchEvent (73) :small_blue_diamond:
  • specifies type of button press
uint8PR+EV+NV02
  • SINGLE_PRESS (0) :heavy_check_mark:
  • DOUBLE_PRESS (1) 
  • LONG_PRESS (2) 
ServiceLabelIndex (CB)
  • numerical index used to distinguish multiple copies of the same Service within an Accessory
uint8PR12551
- -### Switch (49) - Defines a generic Switch.
- - - -
CharacteristicFormatPermsMinMaxConstants/Defaults
On (25) :small_blue_diamond:
  • indicates if the Service is active/on
boolPR+PW+EV01
  • OFF (0) :heavy_check_mark:
  • ON (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
- -### Television (D8) - Defines a TV. Optional Linked Services: InputSource and TelevisionSpeaker.
- - - - - - -
CharacteristicFormatPermsMinMaxConstants/Defaults
Active (B0) :small_blue_diamond:
  • indicates if the Service is active/on
uint8PW+PR+EV01
  • INACTIVE (0) :heavy_check_mark:
  • ACTIVE (1) 
ActiveIdentifier (E7)
  • numerical Identifier of the InputSource selected in the Home App.
uint32PW+PR+EV02550
RemoteKey (E1)
  • triggers an update when the corresponding key is pressed in the Remote Control widget on an iPhone
uint8PW415
  • UP (4) 
  • DOWN (5) 
  • LEFT (6) 
  • RIGHT (7) 
  • CENTER (8) 
  • BACK (9) 
  • PLAY_PAUSE (11) 
  • INFO (15) 
PowerModeSelection (DF)
  • when defined, creates a "View TV Settings" button in the Home App that triggers an update to this Characteristic when pressed
uint8PW00
  • VIEW_SETTINGS (0) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+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.
- - - - -
CharacteristicFormatPermsMinMaxConstants/Defaults
VolumeControlType (E9) :small_blue_diamond:
  • indicates the type of volume control
uint8PR+EV03
  • NONE (0) 
  • RELATIVE (1) 
  • RELATIVE_CURRENT (2) 
  • ABSOLUTE (3) :heavy_check_mark:
VolumeSelector (EA) :small_blue_diamond:
  • triggered by presses to the iPhone's volume up/down buttons when TV is selected in the Remote Control widget
uint8PW01
  • VOLUME_UP (0) 
  • VOLUME_DOWN (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
- -### TemperatureSensor (8A) - Defines a Temperature Sensor.
- - - - - - - -
CharacteristicFormatPermsMinMaxConstants/Defaults
CurrentTemperature (11) :small_blue_diamond:
  • current temperature measured in Celsius
floatPR+EV01000
StatusActive (75)
  • indicates whether the Service is properly functioning
boolPR+EV01
  • NOT_FUNCTIONING (0) 
  • FUNCTIONING (1) :heavy_check_mark:
StatusFault (77)
  • indicates whether the Service has a fault
uint8PR+EV01
  • NO_FAULT (0) :heavy_check_mark:
  • FAULT (1) 
StatusTampered (7A)
  • indicates whether the Service has been tampered with
uint8PR+EV01
  • NOT_TAMPERED (0) :heavy_check_mark:
  • TAMPERED (1) 
StatusLowBattery (79)
  • indicates state of battery
uint8PR+EV01
  • NOT_LOW_BATTERY (0) :heavy_check_mark:
  • LOW_BATTERY (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
- ### Thermostat (4A) - Defines a Thermostat used to control a furnace, air conditioner, or both.
+ Defines a Thermostat used to control a furnace, air conditioner, or both.
@@ -414,8 +180,218 @@ The pre-defined constant expressions for enumerated Characteristics are in names
CharacteristicFormatPermsMinMaxConstants/Defaults
CurrentHeatingCoolingState (F) :small_blue_diamond:
  • indicates whether appliance is currently heating, cooling, or just idle
uint8PR+EV02
  • IDLE (0) :heavy_check_mark:
  • HEATING (1) 
  • COOLING (2) 
TargetHeatingCoolingState (33) :small_blue_diamond:
  • indicates desired state of appliance
uint8PW+PR+EV03
  • OFF (0) :heavy_check_mark:
  • HEAT (1) 
  • COOL (2) 
  • AUTO (3) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
+## Standalone Sensors +### AirQualitySensor (8D) + Defines an Air Quality Sensor.
+ + + + + + + + + + + + + +
CharacteristicFormatPermsMinMaxConstants/Defaults
AirQuality (95) :small_blue_diamond:
  • a subjective description
uint8PR+EV05
  • UNKNOWN (0) :heavy_check_mark:
  • EXCELLENT (1) 
  • GOOD (2) 
  • FAIR (3) 
  • INFERIOR (4) 
  • POOR (5) 
OzoneDensity (C3)
  • measured in µg/m3
floatPR+EV010000
NitrogenDioxideDensity (C4)
  • measured in µg/m3
floatPR+EV010000
SulphurDioxideDensity (C5)
  • measured in µg/m3
floatPR+EV010000
PM25Density (C6)
  • 2.5-micron particulate density, measured in µg/m3
floatPR+EV010000
PM10Density (C7)
  • 10-micron particulate density, measured in µg/m3
floatPR+EV010000
VOCDensity (C8)
  • measured in µg/m3
floatPR+EV010000
StatusActive (75)
  • indicates whether the Service is properly functioning
boolPR+EV01
  • NOT_FUNCTIONING (0) 
  • FUNCTIONING (1) :heavy_check_mark:
StatusFault (77)
  • indicates whether the Service has a fault
uint8PR+EV01
  • NO_FAULT (0) :heavy_check_mark:
  • FAULT (1) 
StatusTampered (7A)
  • indicates whether the Service has been tampered with
uint8PR+EV01
  • NOT_TAMPERED (0) :heavy_check_mark:
  • TAMPERED (1) 
StatusLowBattery (79)
  • indicates state of battery
uint8PR+EV01
  • NOT_LOW_BATTERY (0) :heavy_check_mark:
  • LOW_BATTERY (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
+ +### CarbonDioxideSensor (97) + Defines a Carbon Dioxide Sensor.
+ + + + + + + + + +
CharacteristicFormatPermsMinMaxConstants/Defaults
CarbonDioxideDetected (92) :small_blue_diamond:
  • indicates if abnormal level is detected
uint8PR+EV01
  • NORMAL (0) :heavy_check_mark:
  • ABNORMAL (1) 
CarbonDioxideLevel (93)
  • measured on parts per million (ppm)
floatPR+EV01000000
CarbonDioxidePeakLevel (94)
  • measured in parts per million (ppm)
floatPR+EV01000000
StatusActive (75)
  • indicates whether the Service is properly functioning
boolPR+EV01
  • NOT_FUNCTIONING (0) 
  • FUNCTIONING (1) :heavy_check_mark:
StatusFault (77)
  • indicates whether the Service has a fault
uint8PR+EV01
  • NO_FAULT (0) :heavy_check_mark:
  • FAULT (1) 
StatusTampered (7A)
  • indicates whether the Service has been tampered with
uint8PR+EV01
  • NOT_TAMPERED (0) :heavy_check_mark:
  • TAMPERED (1) 
StatusLowBattery (79)
  • indicates state of battery
uint8PR+EV01
  • NOT_LOW_BATTERY (0) :heavy_check_mark:
  • LOW_BATTERY (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
+ +### CarbonMonoxideSensor (7F) + Defines a Carbon Monoxide Sensor.
+ + + + + + + + + +
CharacteristicFormatPermsMinMaxConstants/Defaults
CarbonMonoxideDetected (69) :small_blue_diamond:
  • indicates if abnormal level is detected
uint8PR+EV01
  • NORMAL (0) :heavy_check_mark:
  • ABNORMAL (1) 
CarbonMonoxideLevel (90)
  • measured in parts per million (ppm)
floatPR+EV01000
CarbonMonoxidePeakLevel (91)
  • measured in parts per million (ppm)
floatPR+EV01000
StatusActive (75)
  • indicates whether the Service is properly functioning
boolPR+EV01
  • NOT_FUNCTIONING (0) 
  • FUNCTIONING (1) :heavy_check_mark:
StatusFault (77)
  • indicates whether the Service has a fault
uint8PR+EV01
  • NO_FAULT (0) :heavy_check_mark:
  • FAULT (1) 
StatusTampered (7A)
  • indicates whether the Service has been tampered with
uint8PR+EV01
  • NOT_TAMPERED (0) :heavy_check_mark:
  • TAMPERED (1) 
StatusLowBattery (79)
  • indicates state of battery
uint8PR+EV01
  • NOT_LOW_BATTERY (0) :heavy_check_mark:
  • LOW_BATTERY (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
+ +### ContactSensor (80) + Defines a Contact Sensor.
+ + + + + + + +
CharacteristicFormatPermsMinMaxConstants/Defaults
ContactSensorState (6A) :small_blue_diamond:
  • indictates if contact is detected (i.e. closed)
uint8PR+EV01
  • DETECTED (0) 
  • NOT_DETECTED (1) :heavy_check_mark:
StatusActive (75)
  • indicates whether the Service is properly functioning
boolPR+EV01
  • NOT_FUNCTIONING (0) 
  • FUNCTIONING (1) :heavy_check_mark:
StatusFault (77)
  • indicates whether the Service has a fault
uint8PR+EV01
  • NO_FAULT (0) :heavy_check_mark:
  • FAULT (1) 
StatusTampered (7A)
  • indicates whether the Service has been tampered with
uint8PR+EV01
  • NOT_TAMPERED (0) :heavy_check_mark:
  • TAMPERED (1) 
StatusLowBattery (79)
  • indicates state of battery
uint8PR+EV01
  • NOT_LOW_BATTERY (0) :heavy_check_mark:
  • LOW_BATTERY (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
+ +### HumiditySensor (82) + Defines a Humidity Sensor.
+ + + + + + + +
CharacteristicFormatPermsMinMaxConstants/Defaults
CurrentRelativeHumidity (10) :small_blue_diamond:
  • current humidity measured as a percentage
floatPR+EV01000
StatusActive (75)
  • indicates whether the Service is properly functioning
boolPR+EV01
  • NOT_FUNCTIONING (0) 
  • FUNCTIONING (1) :heavy_check_mark:
StatusFault (77)
  • indicates whether the Service has a fault
uint8PR+EV01
  • NO_FAULT (0) :heavy_check_mark:
  • FAULT (1) 
StatusTampered (7A)
  • indicates whether the Service has been tampered with
uint8PR+EV01
  • NOT_TAMPERED (0) :heavy_check_mark:
  • TAMPERED (1) 
StatusLowBattery (79)
  • indicates state of battery
uint8PR+EV01
  • NOT_LOW_BATTERY (0) :heavy_check_mark:
  • LOW_BATTERY (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
+ +### LeakSensor (83) + Defines a Leak Sensor.
+ + + + + + + +
CharacteristicFormatPermsMinMaxConstants/Defaults
LeakDetected (70) :small_blue_diamond:
  • indictates if a leak is detected
uint8PR+EV01
  • NOT_DETECTED (0) :heavy_check_mark:
  • DETECTED (1) 
StatusActive (75)
  • indicates whether the Service is properly functioning
boolPR+EV01
  • NOT_FUNCTIONING (0) 
  • FUNCTIONING (1) :heavy_check_mark:
StatusFault (77)
  • indicates whether the Service has a fault
uint8PR+EV01
  • NO_FAULT (0) :heavy_check_mark:
  • FAULT (1) 
StatusTampered (7A)
  • indicates whether the Service has been tampered with
uint8PR+EV01
  • NOT_TAMPERED (0) :heavy_check_mark:
  • TAMPERED (1) 
StatusLowBattery (79)
  • indicates state of battery
uint8PR+EV01
  • NOT_LOW_BATTERY (0) :heavy_check_mark:
  • LOW_BATTERY (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
+ +### LightSensor (84) + Defines a Light Sensor.
+ + + + + + + +
CharacteristicFormatPermsMinMaxConstants/Defaults
CurrentAmbientLightLevel (6B) :small_blue_diamond:
  • measured in Lux (lumens/m2
floatPR+EV0.00011000001
StatusActive (75)
  • indicates whether the Service is properly functioning
boolPR+EV01
  • NOT_FUNCTIONING (0) 
  • FUNCTIONING (1) :heavy_check_mark:
StatusFault (77)
  • indicates whether the Service has a fault
uint8PR+EV01
  • NO_FAULT (0) :heavy_check_mark:
  • FAULT (1) 
StatusTampered (7A)
  • indicates whether the Service has been tampered with
uint8PR+EV01
  • NOT_TAMPERED (0) :heavy_check_mark:
  • TAMPERED (1) 
StatusLowBattery (79)
  • indicates state of battery
uint8PR+EV01
  • NOT_LOW_BATTERY (0) :heavy_check_mark:
  • LOW_BATTERY (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
+ +### MotionSensor (85) + Defines a Motion Sensor.
+ + + + + + + +
CharacteristicFormatPermsMinMaxConstants/Defaults
MotionDetected (22) :small_blue_diamond:
  • indicates if motion is detected
boolPR+EV01
  • NOT_DETECTED (0) :heavy_check_mark:
  • DETECTED (1) 
StatusActive (75)
  • indicates whether the Service is properly functioning
boolPR+EV01
  • NOT_FUNCTIONING (0) 
  • FUNCTIONING (1) :heavy_check_mark:
StatusFault (77)
  • indicates whether the Service has a fault
uint8PR+EV01
  • NO_FAULT (0) :heavy_check_mark:
  • FAULT (1) 
StatusTampered (7A)
  • indicates whether the Service has been tampered with
uint8PR+EV01
  • NOT_TAMPERED (0) :heavy_check_mark:
  • TAMPERED (1) 
StatusLowBattery (79)
  • indicates state of battery
uint8PR+EV01
  • NOT_LOW_BATTERY (0) :heavy_check_mark:
  • LOW_BATTERY (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
+ +### OccupancySensor (86) + Defines and Occupancy Sensor.
+ + + + + + + +
CharacteristicFormatPermsMinMaxConstants/Defaults
OccupancyDetected (71) :small_blue_diamond:
  • indicates if occupanccy is detected
uint8PR+EV01
  • NOT_DETECTED (0) :heavy_check_mark:
  • DETECTED (1) 
StatusActive (75)
  • indicates whether the Service is properly functioning
boolPR+EV01
  • NOT_FUNCTIONING (0) 
  • FUNCTIONING (1) :heavy_check_mark:
StatusFault (77)
  • indicates whether the Service has a fault
uint8PR+EV01
  • NO_FAULT (0) :heavy_check_mark:
  • FAULT (1) 
StatusTampered (7A)
  • indicates whether the Service has been tampered with
uint8PR+EV01
  • NOT_TAMPERED (0) :heavy_check_mark:
  • TAMPERED (1) 
StatusLowBattery (79)
  • indicates state of battery
uint8PR+EV01
  • NOT_LOW_BATTERY (0) :heavy_check_mark:
  • LOW_BATTERY (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
+ +### SmokeSensor (87) + Defines a Smoke Sensor.
+ + + + + + + +
CharacteristicFormatPermsMinMaxConstants/Defaults
SmokeDetected (76) :small_blue_diamond:
  • indicates if smoke is detected
uint8PR+EV01
  • NOT_DETECTED (0) :heavy_check_mark:
  • DETECTED (1) 
StatusActive (75)
  • indicates whether the Service is properly functioning
boolPR+EV01
  • NOT_FUNCTIONING (0) 
  • FUNCTIONING (1) :heavy_check_mark:
StatusFault (77)
  • indicates whether the Service has a fault
uint8PR+EV01
  • NO_FAULT (0) :heavy_check_mark:
  • FAULT (1) 
StatusTampered (7A)
  • indicates whether the Service has been tampered with
uint8PR+EV01
  • NOT_TAMPERED (0) :heavy_check_mark:
  • TAMPERED (1) 
StatusLowBattery (79)
  • indicates state of battery
uint8PR+EV01
  • NOT_LOW_BATTERY (0) :heavy_check_mark:
  • LOW_BATTERY (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
+ +### TemperatureSensor (8A) + Defines a Temperature Sensor.
+ + + + + + + +
CharacteristicFormatPermsMinMaxConstants/Defaults
CurrentTemperature (11) :small_blue_diamond:
  • current temperature measured in Celsius
floatPR+EV01000
StatusActive (75)
  • indicates whether the Service is properly functioning
boolPR+EV01
  • NOT_FUNCTIONING (0) 
  • FUNCTIONING (1) :heavy_check_mark:
StatusFault (77)
  • indicates whether the Service has a fault
uint8PR+EV01
  • NO_FAULT (0) :heavy_check_mark:
  • FAULT (1) 
StatusTampered (7A)
  • indicates whether the Service has been tampered with
uint8PR+EV01
  • NOT_TAMPERED (0) :heavy_check_mark:
  • TAMPERED (1) 
StatusLowBattery (79)
  • indicates state of battery
uint8PR+EV01
  • NOT_LOW_BATTERY (0) :heavy_check_mark:
  • LOW_BATTERY (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
+ +## Doors, Locks, and Windows +### Door (81) + Defines a motorized Door.
+ + + + + +
CharacteristicFormatPermsMinMaxConstants/Defaults
CurrentPosition (6D) :small_blue_diamond:
  • current position (as a percentage) from fully closed (0) to full open (100)
uint8PR+EV01000
TargetPosition (7C) :small_blue_diamond:
  • indicates target position (as a percentage) from fully closed (0) to full open (100)
uint8PW+PR+EV01000
ObstructionDetected (24)
  • indicates if obstruction is detected
boolPR+EV01
  • NOT_DETECTED (0) :heavy_check_mark:
  • DETECTED (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
+ +### Doorbell (121) + Defines a Doorbell. Can be used on a standalone basis or in conjunction with a LockMechanism Service.
+ + + +
CharacteristicFormatPermsMinMaxConstants/Defaults
ProgrammableSwitchEvent (73) :small_blue_diamond:
  • specifies type of button press
uint8PR+EV+NV02
  • SINGLE_PRESS (0) :heavy_check_mark:
  • DOUBLE_PRESS (1) 
  • LONG_PRESS (2) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
+ +### GarageDoorOpener (41) + Defines a motorized Garage Door Opener.
+ + + + + + + +
CharacteristicFormatPermsMinMaxConstants/Defaults
CurrentDoorState (E) :small_blue_diamond:
  • indicates current state of a door
uint8PR+EV04
  • OPEN (0) 
  • CLOSED (1) :heavy_check_mark:
  • OPENING (2) 
  • CLOSING (3) 
  • STOPPED (4) 
TargetDoorState (32) :small_blue_diamond:
  • indicates desired state of door
uint8PW+PR+EV01
  • OPEN (0) 
  • CLOSED (1) :heavy_check_mark:
ObstructionDetected (24) :small_blue_diamond:
  • indicates if obstruction is detected
boolPR+EV01
  • NOT_DETECTED (0) :heavy_check_mark:
  • DETECTED (1) 
LockCurrentState (1D)
  • indicates state of a lock
uint8PR+EV03
  • UNLOCKED (0) :heavy_check_mark:
  • LOCKED (1) 
  • JAMMED (2) 
  • UNKNOWN (3) 
LockTargetState (1E)
  • indicates desired state of lock
uint8PW+PR+EV01
  • UNLOCK (0) :heavy_check_mark:
  • LOCK (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
+ +### LockMechanism (45) + Defines an electronic Lock.
+ + + + +
CharacteristicFormatPermsMinMaxConstants/Defaults
LockCurrentState (1D) :small_blue_diamond:
  • indicates state of a lock
uint8PR+EV03
  • UNLOCKED (0) :heavy_check_mark:
  • LOCKED (1) 
  • JAMMED (2) 
  • UNKNOWN (3) 
LockTargetState (1E) :small_blue_diamond:
  • indicates desired state of lock
uint8PW+PR+EV01
  • UNLOCK (0) :heavy_check_mark:
  • LOCK (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
+ +### Window (8B) + Defines a motorized Window.
+ + + + + +
CharacteristicFormatPermsMinMaxConstants/Defaults
CurrentPosition (6D) :small_blue_diamond:
  • current position (as a percentage) from fully closed (0) to full open (100)
uint8PR+EV01000
TargetPosition (7C) :small_blue_diamond:
  • indicates target position (as a percentage) from fully closed (0) to full open (100)
uint8PW+PR+EV01000
ObstructionDetected (24)
  • indicates if obstruction is detected
boolPR+EV01
  • NOT_DETECTED (0) :heavy_check_mark:
  • DETECTED (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
+ +### WindowCovering (8C) + Defines a motorized Window Shade, Screen, Awning, etc.
+ + + + + + + + + +
CharacteristicFormatPermsMinMaxConstants/Defaults
TargetPosition (7C) :small_blue_diamond:
  • indicates target position (as a percentage) from fully closed (0) to full open (100)
uint8PW+PR+EV01000
CurrentPosition (6D) :small_blue_diamond:
  • current position (as a percentage) from fully closed (0) to full open (100)
uint8PR+EV01000
CurrentHorizontalTiltAngle (6C)
  • current angle (in degrees) of slats from fully up (-90) to fully open (0) to fully down (90)
intPR+EV-90900
TargetHorizontalTiltAngle (7B)
  • indicates desired angle (in degrees) of slats from fully up (-90) to fully open (0) to fully down (90)
intPW+PR+EV-90900
CurrentVerticalTiltAngle (6E)
  • current angle (in degrees) of slats from fully left (-90) to fully open (0) to fully right (90)
intPR+EV-90900
TargetVerticalTiltAngle (7D)
  • indicates desired angle (in degrees) of slats from fully left (-90) to fully open (0) to fully right (90)
intPW+PR+EV-90900
ObstructionDetected (24)
  • indicates if obstruction is detected
boolPR+EV01
  • NOT_DETECTED (0) :heavy_check_mark:
  • DETECTED (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+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).
+ + + + +
CharacteristicFormatPermsMinMaxConstants/Defaults
Active (B0) :small_blue_diamond:
  • indicates if the Service is active/on
uint8PW+PR+EV01
  • INACTIVE (0) :heavy_check_mark:
  • ACTIVE (1) 
StatusFault (77)
  • indicates whether the Service has a fault
uint8PR+EV01
  • NO_FAULT (0) :heavy_check_mark:
  • FAULT (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
+ +### IrrigationSystem (CF) + Defines an Irrigation System. Linked Services: Valve Service (at least one required).
+ + + + + + + +
CharacteristicFormatPermsMinMaxConstants/Defaults
Active (B0) :small_blue_diamond:
  • indicates if the Service is active/on
uint8PW+PR+EV01
  • INACTIVE (0) :heavy_check_mark:
  • ACTIVE (1) 
ProgramMode (D1) :small_blue_diamond:
  • indicates if pre-scheduled program is running
uint8PR+EV02
  • NONE (0) :heavy_check_mark:
  • SCHEDULED (1) 
  • SCHEDULE_OVERRIDEN (2) 
InUse (D2) :small_blue_diamond:
  • if Service is set to active, this indictes whether it is currently in use
uint8PR+EV01
  • NOT_IN_USE (0) :heavy_check_mark:
  • IN_USE (1) 
RemainingDuration (D4)
  • duration (in seconds) remaining for Service to be active/on
uint32PR+EV0360060
StatusFault (77)
  • indicates whether the Service has a fault
uint8PR+EV01
  • NO_FAULT (0) :heavy_check_mark:
  • FAULT (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+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.
+ Defines an electronic Valve. Can be used standalone or as a Linked Service in conjunction with the Faucet and IrrigationSystem Services.
@@ -428,25 +404,58 @@ The pre-defined constant expressions for enumerated Characteristics are in names
CharacteristicFormatPermsMinMaxConstants/Defaults
Active (B0) :small_blue_diamond:
  • indicates if the Service is active/on
uint8PW+PR+EV01
  • INACTIVE (0) :heavy_check_mark:
  • ACTIVE (1) 
InUse (D2) :small_blue_diamond:
  • if Service is set to active, this indictes whether it is currently in use
uint8PR+EV01
  • NOT_IN_USE (0) :heavy_check_mark:
  • IN_USE (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
-### Window (8B) - Defines a motorized Window.
+## Security Systems +### SecuritySystem (7E) + Defines a Security System. Often combined with MotionSensor and ContactSensor Services.
- - - + + + + +
CharacteristicFormatPermsMinMaxConstants/Defaults
CurrentPosition (6D) :small_blue_diamond:
  • current position (as a percentage) from fully closed (0) to full open (100)
uint8PR+EV01000
TargetPosition (7C) :small_blue_diamond:
  • indicates target position (as a percentage) from fully closed (0) to full open (100)
uint8PW+PR+EV01000
ObstructionDetected (24)
  • indicates if obstruction is detected
boolPR+EV01
  • NOT_DETECTED (0) :heavy_check_mark:
  • DETECTED (1) 
SecuritySystemCurrentState (66) :small_blue_diamond:
  • indicates current state of the security system
uint8PR+EV04
  • ARMED_STAY (0) 
  • ARMED_AWAY (1) 
  • ARMED_NIGHT (2) 
  • DISARMED (3) :heavy_check_mark:
  • ALARM_TRIGGERED (4) 
SecuritySystemTargetState (67) :small_blue_diamond:
  • indicates desired state of the security system
uint8PW+PR+EV03
  • ARM_STAY (0) 
  • ARM_AWAY (1) 
  • ARM_NIGHT (2) 
  • DISARM (3) :heavy_check_mark:
SecuritySystemAlarmType (8E)
  • indicates whether alarm was triggered for known reason
uint8PR+EV01
  • KNOWN (0) :heavy_check_mark:
  • UNKNOWN (1) 
StatusFault (77)
  • indicates whether the Service has a fault
uint8PR+EV01
  • NO_FAULT (0) :heavy_check_mark:
  • FAULT (1) 
StatusTampered (7A)
  • indicates whether the Service has been tampered with
uint8PR+EV01
  • NOT_TAMPERED (0) :heavy_check_mark:
  • TAMPERED (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
-### WindowCovering (8C) - Defines a motorized Window Shade, Screen, Awning, etc.
+## Televisions +### InputSource (D9) + Defines an Input Source for a TV. Use only as a Linked Service for the Television Service.
- - - - - - - + + + + + +
CharacteristicFormatPermsMinMaxConstants/Defaults
TargetPosition (7C) :small_blue_diamond:
  • indicates target position (as a percentage) from fully closed (0) to full open (100)
uint8PW+PR+EV01000
CurrentPosition (6D) :small_blue_diamond:
  • current position (as a percentage) from fully closed (0) to full open (100)
uint8PR+EV01000
CurrentHorizontalTiltAngle (6C)
  • current angle (in degrees) of slats from fully up (-90) to fully open (0) to fully down (90)
intPR+EV-90900
TargetHorizontalTiltAngle (7B)
  • indicates desired angle (in degrees) of slats from fully up (-90) to fully open (0) to fully down (90)
intPW+PR+EV-90900
CurrentVerticalTiltAngle (6E)
  • current angle (in degrees) of slats from fully left (-90) to fully open (0) to fully right (90)
intPR+EV-90900
TargetVerticalTiltAngle (7D)
  • indicates desired angle (in degrees) of slats from fully left (-90) to fully open (0) to fully right (90)
intPW+PR+EV-90900
ObstructionDetected (24)
  • indicates if obstruction is detected
boolPR+EV01
  • NOT_DETECTED (0) :heavy_check_mark:
  • DETECTED (1) 
Identifier (E6) :small_blue_diamond:
  • numerical Identifer of the InputSource.
uint32PR02550
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
IsConfigured (D6)
  • indicates if a predefined Service has been configured
uint8PR+EV01
  • NOT_CONFIGURED (0) :heavy_check_mark:
  • CONFIGURED (1) 
CurrentVisibilityState (135)
  • current visibility of the Service, as selectable on the Settings Page of the Home App
uint8PR+EV01
  • VISIBLE (0) :heavy_check_mark:
  • NOT_VISIBLE (1) 
TargetVisibilityState (134)
  • indicates desired visibility of the Service, as selectable on the Settings Page of the Home App
uint8PW+PR+EV01
  • VISIBLE (0) :heavy_check_mark:
  • NOT_VISIBLE (1) 
+ +### Television (D8) + Defines a TV. Optional Linked Services: InputSource and TelevisionSpeaker.
+ + + + + + +
CharacteristicFormatPermsMinMaxConstants/Defaults
Active (B0) :small_blue_diamond:
  • indicates if the Service is active/on
uint8PW+PR+EV01
  • INACTIVE (0) :heavy_check_mark:
  • ACTIVE (1) 
ActiveIdentifier (E7)
  • numerical Identifier of the InputSource selected in the Home App.
uint32PW+PR+EV02550
RemoteKey (E1)
  • triggers an update when the corresponding key is pressed in the Remote Control widget on an iPhone
uint8PW415
  • UP (4) 
  • DOWN (5) 
  • LEFT (6) 
  • RIGHT (7) 
  • CENTER (8) 
  • BACK (9) 
  • PLAY_PAUSE (11) 
  • INFO (15) 
PowerModeSelection (DF)
  • when defined, creates a "View TV Settings" button in the Home App that triggers an update to this Characteristic when pressed
uint8PW00
  • VIEW_SETTINGS (0) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+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.
+ + + + +
CharacteristicFormatPermsMinMaxConstants/Defaults
VolumeControlType (E9) :small_blue_diamond:
  • indicates the type of volume control
uint8PR+EV03
  • NONE (0) 
  • RELATIVE (1) 
  • RELATIVE_CURRENT (2) 
  • ABSOLUTE (3) :heavy_check_mark:
VolumeSelector (EA) :small_blue_diamond:
  • triggered by presses to the iPhone's volume up/down buttons when TV is selected in the Remote Control widget
uint8PW01
  • VOLUME_UP (0) 
  • VOLUME_DOWN (1) 
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+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.
+ + + + + + + +
CharacteristicFormatPermsMinMaxConstants/Defaults
ServiceLabelNamespace (CD) :small_blue_diamond:
  • indicates how un-named Services linked together with a ServiceLabel Service should be displayed in the Home App
uint8PR01
  • DOTS (0) 
  • NUMERALS (1) :heavy_check_mark:
Version (37) :small_blue_diamond:
  • unused
stringPR--"1.0.0"
Mute (11A) :small_blue_diamond:
  • not used
boolPW+PR+EV01
  • OFF (0) :heavy_check_mark:
  • ON (1) 
Volume (119)
  • unused
uint8PW+PR+EV01000
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
Mute (11A) :small_blue_diamond:
  • not used
boolPW+PR+EV01
  • OFF (0) :heavy_check_mark:
  • ON (1) 
Volume (119)
  • unused
uint8PW+PR+EV01000
ConfiguredName (E3)
  • a "configurable" Service name - any updates made from within the Home App trigger an update in HomeSpan and vice versa.
stringPW+PR+EV--"unnamed"
diff --git a/src/Span.h b/src/Span.h index d2f9b8a..b73058c 100644 --- a/src/Span.h +++ b/src/Span.h @@ -46,9 +46,13 @@ #define OPT(HAPCHAR) opt.push_back(&hapChars.HAPCHAR) #define OPT_DEP(HAPCHAR) opt.push_back(&hapChars.HAPCHAR) +#define SERVICES_GROUP + namespace Service { - CREATE_SERV(AccessoryInformation,3E) // Required Identification Information. For each Accessory in a HomeSpan device this must be included as the first Service. + SERVICES_GROUP // Mandatory Services + + CREATE_SERV(AccessoryInformation,3E) // Required Identification Information. For each Accessory in a HomeSpan device this must be included as the first Service. REQ(Identify); OPT(Name); OPT(FirmwareRevision); @@ -59,6 +63,47 @@ namespace Service { OPT_DEP(AccessoryFlags); END_SERV + SERVICES_GROUP // Lights, Power, and Switches + + CREATE_SERV(BatteryService,96) // Defines a standalone Battery Service. + REQ(BatteryLevel); + REQ(ChargingState); + REQ(StatusLowBattery); + OPT(ConfiguredName); + OPT_DEP(Name); + END_SERV + + CREATE_SERV(LightBulb,43) // Defines any type of Light. + REQ(On); + OPT(Brightness); + OPT(Hue); + OPT(Saturation); + OPT(ColorTemperature); + OPT(ConfiguredName); + OPT_DEP(Name); + END_SERV + + CREATE_SERV(Outlet,47) // Defines an controllable Outlet used to power any light or appliance. + REQ(On); + REQ(OutletInUse); + OPT(ConfiguredName); + OPT_DEP(Name); + END_SERV + + CREATE_SERV(StatelessProgrammableSwitch,89) // Defines a "Stateless" Programmable Switch that can be used to trigger actions in the Home App. + REQ(ProgrammableSwitchEvent); + OPT(ServiceLabelIndex); + OPT_DEP(Name); + END_SERV + + CREATE_SERV(Switch,49) // Defines a generic Switch. + REQ(On); + OPT(ConfiguredName); + OPT_DEP(Name); + END_SERV + + SERVICES_GROUP // Heating, Ventilation, and Air Conditioning (HVAC) + CREATE_SERV(AirPurifier,BB) // Defines a basic Air Purifier with an optional fan. Optional Linked Services: FilterMaintenance, AirQualitySensor, Fan, and Slat REQ(Active); REQ(CurrentAirPurifierState); @@ -68,8 +113,84 @@ namespace Service { OPT(LockPhysicalControls); OPT(ConfiguredName); OPT_DEP(Name); + END_SERV + + CREATE_SERV(Fan,B7) // Defines a Fan. Can be used in conjunction with a LightBulb Service to create a Lighted Ceiling Fan. + REQ(Active); + OPT(CurrentFanState); + OPT(TargetFanState); + OPT(RotationDirection); + OPT(RotationSpeed); + OPT(SwingMode); + OPT(LockPhysicalControls); + OPT(ConfiguredName); + OPT_DEP(Name); END_SERV + CREATE_SERV(FilterMaintenance,BA) // Defines a Filter Maintainence check. + REQ(FilterChangeIndication); + OPT(FilterLifeLevel); + OPT(ResetFilterIndication); + OPT(ConfiguredName); + OPT_DEP(Name); + END_SERV + + CREATE_SERV(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. + REQ(Active); + REQ(CurrentTemperature); + REQ(CurrentHeaterCoolerState); + REQ(TargetHeaterCoolerState); + OPT(RotationSpeed); + OPT(TemperatureDisplayUnits); + OPT(SwingMode); + OPT(CoolingThresholdTemperature); + OPT(HeatingThresholdTemperature); + OPT(LockPhysicalControls); + OPT(ConfiguredName); + OPT_DEP(Name); + END_SERV + + CREATE_SERV(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. + REQ(Active); + REQ(CurrentRelativeHumidity); + REQ(CurrentHumidifierDehumidifierState); + REQ(TargetHumidifierDehumidifierState); + OPT(RelativeHumidityDehumidifierThreshold); + OPT(RelativeHumidityHumidifierThreshold); + OPT(RotationSpeed); + OPT(SwingMode); + OPT(WaterLevel); + OPT(LockPhysicalControls); + OPT(ConfiguredName); + OPT_DEP(Name); + END_SERV + + CREATE_SERV(Slat,B9) // Defines a motorized ventilation Slat(s). + REQ(CurrentSlatState); + REQ(SlatType); + OPT(SwingMode); + OPT(CurrentTiltAngle); + OPT(TargetTiltAngle); + OPT(ConfiguredName); + OPT_DEP(Name); + END_SERV + + CREATE_SERV(Thermostat,4A) // Defines a Thermostat used to control a furnace, air conditioner, or both. + REQ(CurrentHeatingCoolingState); + REQ(TargetHeatingCoolingState); + REQ(CurrentTemperature); + REQ(TargetTemperature); + REQ(TemperatureDisplayUnits); + OPT(CoolingThresholdTemperature); + OPT(CurrentRelativeHumidity); + OPT(HeatingThresholdTemperature); + OPT(TargetRelativeHumidity); + OPT(ConfiguredName); + OPT_DEP(Name); + END_SERV + + SERVICES_GROUP // Standalone Sensors + CREATE_SERV(AirQualitySensor,8D) // Defines an Air Quality Sensor. REQ(AirQuality); OPT(OzoneDensity); @@ -85,15 +206,7 @@ namespace Service { OPT(ConfiguredName); OPT_DEP(Name); END_SERV - - CREATE_SERV(BatteryService,96) // Defines a standalone Battery Service. - REQ(BatteryLevel); - REQ(ChargingState); - REQ(StatusLowBattery); - OPT(ConfiguredName); - OPT_DEP(Name); - END_SERV - + CREATE_SERV(CarbonDioxideSensor,97) // Defines a Carbon Dioxide Sensor. REQ(CarbonDioxideDetected); OPT(CarbonDioxideLevel); @@ -128,95 +241,6 @@ namespace Service { OPT_DEP(Name); END_SERV - CREATE_SERV(Door,81) // Defines a motorized Door. - REQ(CurrentPosition); - REQ(TargetPosition); - OPT(ObstructionDetected); - OPT(ConfiguredName); - OPT_DEP(Name); - OPT_DEP(PositionState); - OPT_DEP(HoldPosition); - END_SERV - - CREATE_SERV(Doorbell,121) // Defines a Doorbell. Can be used on a standalone basis or in conjunction with a LockMechanism Service. - REQ(ProgrammableSwitchEvent); - OPT_DEP(Volume); - OPT_DEP(Brightness); - OPT(ConfiguredName); - OPT_DEP(Name); - END_SERV - - CREATE_SERV(Fan,B7) // Defines a Fan. Can be used in conjunction with a LightBulb Service to create a Lighted Ceiling Fan. - REQ(Active); - OPT(CurrentFanState); - OPT(TargetFanState); - OPT(RotationDirection); - OPT(RotationSpeed); - OPT(SwingMode); - OPT(LockPhysicalControls); - OPT(ConfiguredName); - OPT_DEP(Name); - END_SERV - - CREATE_SERV(Faucet,D7) // Defines the master control for a multi-Valve appliance. Linked Services: Valve (at least one required), and HeaterCooler (optional). - REQ(Active); - OPT(StatusFault); - OPT(ConfiguredName); - OPT_DEP(Name); - END_SERV - - CREATE_SERV(FilterMaintenance,BA) // Defines a Filter Maintainence check. - REQ(FilterChangeIndication); - OPT(FilterLifeLevel); - OPT(ResetFilterIndication); - OPT(ConfiguredName); - OPT_DEP(Name); - END_SERV - - CREATE_SERV(GarageDoorOpener,41) // Defines a motorized Garage Door Opener. - REQ(CurrentDoorState); - REQ(TargetDoorState); - REQ(ObstructionDetected); - OPT(LockCurrentState); - OPT(LockTargetState); - OPT(ConfiguredName); - OPT_DEP(Name); - END_SERV - - CREATE_SERV_DEP(HAPProtocolInformation,A2) - REQ(Version); - END_SERV - - CREATE_SERV(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. - REQ(Active); - REQ(CurrentTemperature); - REQ(CurrentHeaterCoolerState); - REQ(TargetHeaterCoolerState); - OPT(RotationSpeed); - OPT(TemperatureDisplayUnits); - OPT(SwingMode); - OPT(CoolingThresholdTemperature); - OPT(HeatingThresholdTemperature); - OPT(LockPhysicalControls); - OPT(ConfiguredName); - OPT_DEP(Name); - END_SERV - - CREATE_SERV(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. - REQ(Active); - REQ(CurrentRelativeHumidity); - REQ(CurrentHumidifierDehumidifierState); - REQ(TargetHumidifierDehumidifierState); - OPT(RelativeHumidityDehumidifierThreshold); - OPT(RelativeHumidityHumidifierThreshold); - OPT(RotationSpeed); - OPT(SwingMode); - OPT(WaterLevel); - OPT(LockPhysicalControls); - OPT(ConfiguredName); - OPT_DEP(Name); - END_SERV - CREATE_SERV(HumiditySensor,82) // Defines a Humidity Sensor. REQ(CurrentRelativeHumidity); OPT(StatusActive); @@ -227,24 +251,6 @@ namespace Service { OPT_DEP(Name); END_SERV - CREATE_SERV(InputSource,D9) // Defines an Input Source for a TV. Use only as a Linked Service for the Television Service. - REQ(Identifier); - OPT(ConfiguredName); - OPT(IsConfigured); - OPT(CurrentVisibilityState); - OPT(TargetVisibilityState); - END_SERV - - CREATE_SERV(IrrigationSystem,CF) // Defines an Irrigation System. Linked Services: Valve Service (at least one required). - REQ(Active); - REQ(ProgramMode); - REQ(InUse); - OPT(RemainingDuration); - OPT(StatusFault); - OPT(ConfiguredName); - OPT_DEP(Name); - END_SERV - CREATE_SERV(LeakSensor,83) // Defines a Leak Sensor. REQ(LeakDetected); OPT(StatusActive); @@ -255,16 +261,6 @@ namespace Service { OPT_DEP(Name); END_SERV - CREATE_SERV(LightBulb,43) // Defines any type of Light. - REQ(On); - OPT(Brightness); - OPT(Hue); - OPT(Saturation); - OPT(ColorTemperature); - OPT(ConfiguredName); - OPT_DEP(Name); - END_SERV - CREATE_SERV(LightSensor,84) // Defines a Light Sensor. REQ(CurrentAmbientLightLevel); OPT(StatusActive); @@ -275,20 +271,6 @@ namespace Service { OPT_DEP(Name); END_SERV - CREATE_SERV(LockMechanism,45) // Defines an electronic Lock. - REQ(LockCurrentState); - REQ(LockTargetState); - OPT(ConfiguredName); - OPT_DEP(Name); - END_SERV - - CREATE_SERV_DEP(Microphone,112) - REQ(Mute); - OPT(Volume); - OPT(ConfiguredName); - OPT_DEP(Name); - END_SERV - CREATE_SERV(MotionSensor,85) // Defines a Motion Sensor. REQ(MotionDetected); OPT(StatusActive); @@ -309,37 +291,6 @@ namespace Service { OPT_DEP(Name); END_SERV - CREATE_SERV(Outlet,47) // Defines an controllable Outlet used to power any light or appliance. - REQ(On); - REQ(OutletInUse); - OPT(ConfiguredName); - OPT_DEP(Name); - END_SERV - - CREATE_SERV(SecuritySystem,7E) // Defines a Security System. - REQ(SecuritySystemCurrentState); - REQ(SecuritySystemTargetState); - OPT(SecuritySystemAlarmType); - OPT(StatusFault); - OPT(StatusTampered); - OPT(ConfiguredName); - OPT_DEP(Name); - END_SERV - - CREATE_SERV(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. - REQ(ServiceLabelNamespace); - END_SERV - - CREATE_SERV(Slat,B9) // Defines a motorized ventilation Slat(s). - REQ(CurrentSlatState); - REQ(SlatType); - OPT(SwingMode); - OPT(CurrentTiltAngle); - OPT(TargetTiltAngle); - OPT(ConfiguredName); - OPT_DEP(Name); - END_SERV - CREATE_SERV(SmokeSensor,87) // Defines a Smoke Sensor. REQ(SmokeDetected); OPT(StatusActive); @@ -350,39 +301,6 @@ namespace Service { OPT_DEP(Name); END_SERV - CREATE_SERV_DEP(Speaker,113) - REQ(Mute); - OPT(Volume); - OPT(ConfiguredName); - OPT_DEP(Name); - END_SERV - - CREATE_SERV(StatelessProgrammableSwitch,89) // Defines a "Stateless" Programmable Switch that can be used to trigger actions in the Home App. - REQ(ProgrammableSwitchEvent); - OPT(ServiceLabelIndex); - OPT_DEP(Name); - END_SERV - - CREATE_SERV(Switch,49) // Defines a generic Switch. - REQ(On); - OPT(ConfiguredName); - OPT_DEP(Name); - END_SERV - - CREATE_SERV(Television,D8) // Defines a TV. Optional Linked Services: InputSource and TelevisionSpeaker. - REQ(Active); - OPT(ActiveIdentifier); - OPT(RemoteKey); - OPT(PowerModeSelection); - OPT(ConfiguredName); - END_SERV - - CREATE_SERV(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. - REQ(VolumeControlType); - REQ(VolumeSelector); - OPT(ConfiguredName); - END_SERV - CREATE_SERV(TemperatureSensor,8A) // Defines a Temperature Sensor. REQ(CurrentTemperature); OPT(StatusActive); @@ -390,31 +308,41 @@ namespace Service { OPT(StatusTampered); OPT(StatusLowBattery); OPT(ConfiguredName); + END_SERV + + SERVICES_GROUP // Doors, Locks, and Windows + + CREATE_SERV(Door,81) // Defines a motorized Door. + REQ(CurrentPosition); + REQ(TargetPosition); + OPT(ObstructionDetected); + OPT(ConfiguredName); + OPT_DEP(Name); + OPT_DEP(PositionState); + OPT_DEP(HoldPosition); END_SERV - CREATE_SERV(Thermostat,4A) // Defines a Thermostat used to control a furnace, air conditioner, or both. - REQ(CurrentHeatingCoolingState); - REQ(TargetHeatingCoolingState); - REQ(CurrentTemperature); - REQ(TargetTemperature); - REQ(TemperatureDisplayUnits); - OPT(CoolingThresholdTemperature); - OPT(CurrentRelativeHumidity); - OPT(HeatingThresholdTemperature); - OPT(TargetRelativeHumidity); + CREATE_SERV(Doorbell,121) // Defines a Doorbell. Can be used on a standalone basis or in conjunction with a LockMechanism Service. + REQ(ProgrammableSwitchEvent); + OPT_DEP(Volume); + OPT_DEP(Brightness); OPT(ConfiguredName); OPT_DEP(Name); END_SERV - CREATE_SERV(Valve,D0) // Defines an electronic Valve. Can be used standalone or as a Linked Service in conjunction with the Faucet and IrrigationSystem Services. - REQ(Active); - REQ(InUse); - REQ(ValveType); - OPT(SetDuration); - OPT(RemainingDuration); - OPT(IsConfigured); - OPT(ServiceLabelIndex); - OPT(StatusFault); + CREATE_SERV(GarageDoorOpener,41) // Defines a motorized Garage Door Opener. + REQ(CurrentDoorState); + REQ(TargetDoorState); + REQ(ObstructionDetected); + OPT(LockCurrentState); + OPT(LockTargetState); + OPT(ConfiguredName); + OPT_DEP(Name); + END_SERV + + CREATE_SERV(LockMechanism,45) // Defines an electronic Lock. + REQ(LockCurrentState); + REQ(LockTargetState); OPT(ConfiguredName); OPT_DEP(Name); END_SERV @@ -441,6 +369,100 @@ namespace Service { OPT_DEP(Name); OPT_DEP(PositionState); OPT_DEP(HoldPosition); + END_SERV + + SERVICES_GROUP // Water Systems + + CREATE_SERV(Faucet,D7) // Defines the master control for a multi-Valve appliance. Linked Services: Valve (at least one required), and HeaterCooler (optional). + REQ(Active); + OPT(StatusFault); + OPT(ConfiguredName); + OPT_DEP(Name); + END_SERV + + CREATE_SERV(IrrigationSystem,CF) // Defines an Irrigation System. Linked Services: Valve Service (at least one required). + REQ(Active); + REQ(ProgramMode); + REQ(InUse); + OPT(RemainingDuration); + OPT(StatusFault); + OPT(ConfiguredName); + OPT_DEP(Name); + END_SERV + + CREATE_SERV(Valve,D0) // Defines an electronic Valve. Can be used standalone or as a Linked Service in conjunction with the Faucet and IrrigationSystem Services. + REQ(Active); + REQ(InUse); + REQ(ValveType); + OPT(SetDuration); + OPT(RemainingDuration); + OPT(IsConfigured); + OPT(ServiceLabelIndex); + OPT(StatusFault); + OPT(ConfiguredName); + OPT_DEP(Name); + END_SERV + + SERVICES_GROUP // Security Systems + + CREATE_SERV(SecuritySystem,7E) // Defines a Security System. Often combined with MotionSensor and ContactSensor Services. + REQ(SecuritySystemCurrentState); + REQ(SecuritySystemTargetState); + OPT(SecuritySystemAlarmType); + OPT(StatusFault); + OPT(StatusTampered); + OPT(ConfiguredName); + OPT_DEP(Name); + END_SERV + + SERVICES_GROUP // Televisions + + CREATE_SERV(InputSource,D9) // Defines an Input Source for a TV. Use only as a Linked Service for the Television Service. + REQ(Identifier); + OPT(ConfiguredName); + OPT(IsConfigured); + OPT(CurrentVisibilityState); + OPT(TargetVisibilityState); + END_SERV + + CREATE_SERV(Television,D8) // Defines a TV. Optional Linked Services: InputSource and TelevisionSpeaker. + REQ(Active); + OPT(ActiveIdentifier); + OPT(RemoteKey); + OPT(PowerModeSelection); + OPT(ConfiguredName); + END_SERV + + CREATE_SERV(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. + REQ(VolumeControlType); + REQ(VolumeSelector); + OPT(ConfiguredName); + END_SERV + + SERVICES_GROUP // Miscellaneous + + CREATE_SERV(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. + REQ(ServiceLabelNamespace); + END_SERV + + // Deprecated or unsupported Services + + CREATE_SERV_DEP(HAPProtocolInformation,A2) + REQ(Version); + END_SERV + + CREATE_SERV_DEP(Microphone,112) + REQ(Mute); + OPT(Volume); + OPT(ConfiguredName); + OPT_DEP(Name); + END_SERV + + CREATE_SERV_DEP(Speaker,113) + REQ(Mute); + OPT(Volume); + OPT(ConfiguredName); + OPT_DEP(Name); END_SERV } @@ -511,7 +533,7 @@ namespace Characteristic { CREATE_CHAR(const char *,Model,"HomeSpan-ESP32",0,1); // any string - informational only CREATE_CHAR(boolean,MotionDetected,0,0,1,NOT_DETECTED,DETECTED); // indicates if motion is detected CREATE_CHAR(boolean,Mute,0,0,1,OFF,ON); // not used - CREATE_CHAR(const char *,Name,"unnamed",0,1); // default name of a Service used only during initial pairing + CREATE_CHAR(const char *,Name,"unnamed",0,1); // default name of a Service used only during initial pairing CREATE_CHAR(double,NitrogenDioxideDensity,0,0,1000); // measured in µg/m3 CREATE_CHAR(boolean,ObstructionDetected,0,0,1,NOT_DETECTED,DETECTED); // indicates if obstruction is detected CREATE_CHAR(double,PM25Density,0,0,1000); // 2.5-micron particulate density, measured in µg/m3 diff --git a/tools/makeServiceList b/tools/makeServiceList index ed8f511..4abd69d 100755 --- a/tools/makeServiceList +++ b/tools/makeServiceList @@ -4,6 +4,6 @@ grep -B 1000 "AUTOGENERATED_TEXT" ../docs/ServiceList.md > ServiceList.md ./makeServices ../src/Characteristics.h ../src/Span.h >> ServiceList.md mv ServiceList.md ../docs/ServiceList.md -grep -B 1000 "AUTOGENERATED_TEXT" ../docs/ServiceList_Expanded.md > ServiceList_Expanded.md -./makeServices -vdetailsAtt=" open" ../src/Characteristics.h ../src/Span.h >> ServiceList_Expanded.md -mv ServiceList_Expanded.md ../docs/ServiceList_Expanded.md +#grep -B 1000 "AUTOGENERATED_TEXT" ../docs/ServiceList_Expanded.md > ServiceList_Expanded.md +#./makeServices -vdetailsAtt=" open" ../src/Characteristics.h ../src/Span.h >> ServiceList_Expanded.md +#mv ServiceList_Expanded.md ../docs/ServiceList_Expanded.md diff --git a/tools/makeServices b/tools/makeServices index a51a455..404c882 100755 --- a/tools/makeServices +++ b/tools/makeServices @@ -56,6 +56,11 @@ BEGIN { format[char]=tolower(x[5]) static[char]=x[6] } + + else if(x[1]=="SERVICES_GROUP"){ + group[nServs]=line[2] + } + } END { @@ -63,9 +68,11 @@ END { printf("\n\n"); for(i=0;i\n",desc[s]) + printf("%s
\n",desc[s]) printf("\n") for(j=0;j
CharacteristicFormatPermsMinMaxConstants/Defaults