diff --git a/tools/makeServiceList b/tools/makeServiceList index cdccc48..af81304 100755 --- a/tools/makeServiceList +++ b/tools/makeServiceList @@ -16,15 +16,14 @@ BEGIN { currentService=x[2] services[nServs++]=currentService uuid[currentService]=x[3] - nReqs[currentService]=0 - nOpts[currentService]=0 + nChars[currentService]=0 } - else if(x[1]=="REQ") - reqs[currentService,nReqs[currentService]++]=x[2] - - else if(x[1]=="OPT") - opts[currentService,nOpts[currentService]++]=x[2] + else if(x[1]=="REQ" || x[1]=="OPT"){ + servChars[currentService,nChars[currentService]]=x[2] + servReq[currentService,nChars[currentService]]=(x[1]=="REQ") + nChars[currentService]++ + } else if(x[1]=="CREATE_CHAR"){ char=x[3] @@ -60,17 +59,16 @@ BEGIN { for(i=0;i## %s (%s)\n",s,uuid[s]) - for(j=0;j%s (%s)\n",s,uuid[s]) + printf("\n") + for(j=0;j",servReq[s,j]?"":"",char,servReq[s,j]?"":"") + #for(k=0;k\n") } - for(j=0;j" + print "
%s%s%s
" } } diff --git a/tools/test.md b/tools/test.md index 47d9fef..fdfb169 100644 --- a/tools/test.md +++ b/tools/test.md @@ -1,586 +1,360 @@ -
## AccessoryInformation (3E) - REQ:Identify -false 0 1 - - OPT:FirmwareRevision - OPT:Manufacturer - OPT:Model - OPT:Name - OPT:SerialNumber - OPT:HardwareRevision - OPT:AccessoryFlags -
-
## AirPurifier (BB) - REQ:Active -0 0 1 -INACTIVE -ACIVE - - REQ:CurrentAirPurifierState -1 0 2 -INACTIVE -IDLE -PURIFYING - - REQ:TargetAirPurifierState -1 0 1 -MANUAL -AUTO - - OPT:Name - OPT:RotationSpeed - OPT:SwingMode - OPT:LockPhysicalControls -
-
## AirQualitySensor (8D) - REQ:AirQuality -0 0 5 -UNKNOWN -EXCELLENT -GOOD -FAIR -INFERIOR -POOR - - OPT:Name - OPT:OzoneDensity - OPT:NitrogenDioxideDensity - OPT:SulphurDioxideDensity - OPT:PM25Density - OPT:PM10Density - OPT:VOCDensity - OPT:StatusActive - OPT:StatusFault - OPT:StatusTampered - OPT:StatusLowBattery -
-
## BatteryService (96) - REQ:BatteryLevel -0 0 100 - - REQ:ChargingState -0 0 2 -NOT_CHARGING -CHARGING -NOT_CHARGEABLE - - REQ:StatusLowBattery -0 0 1 -NOT_LOW_BATTERY -LOW_BATTERY - - OPT:Name -
-
## CarbonDioxideSensor (97) - REQ:CarbonDioxideDetected -0 0 1 -NORMAL -ABNORMAL - - OPT:Name - OPT:StatusActive - OPT:StatusFault - OPT:StatusTampered - OPT:StatusLowBattery - OPT:CarbonDioxideLevel - OPT:CarbonDioxidePeakLevel -
-
## CarbonMonoxideSensor (7F) - REQ:CarbonMonoxideDetected -0 0 1 -NORMAL -ABNORMAL - - OPT:Name - OPT:StatusActive - OPT:StatusFault - OPT:StatusTampered - OPT:StatusLowBattery - OPT:CarbonMonoxideLevel - OPT:CarbonMonoxidePeakLevel -
-
## ContactSensor (80) - REQ:ContactSensorState -1 0 1 -DETECTED -NOT_DETECTED - - OPT:Name - OPT:StatusActive - OPT:StatusFault - OPT:StatusTampered - OPT:StatusLowBattery -
-
## Door (81) - REQ:CurrentPosition -0 0 100 - - REQ:TargetPosition -0 0 100 - - REQ:PositionState -2 0 2 -GOING_TO_MINIMUM -GOING_TO_MAXIMUM -STOPPED - - OPT:Name - OPT:HoldPosition - OPT:ObstructionDetected -
-
## Doorbell (121) - REQ:ProgrammableSwitchEvent -0 0 2 -SINGLE_PRESS -DOUBLE_PRESS -LONG_PRESS - - OPT:Name - OPT:Volume - OPT:Brightness -
-
## Fan (B7) - REQ:Active -0 0 1 -INACTIVE -ACIVE - - OPT:Name - OPT:CurrentFanState - OPT:TargetFanState - OPT:RotationDirection - OPT:RotationSpeed - OPT:SwingMode - OPT:LockPhysicalControls -
-
## Faucet (D7) - REQ:Active -0 0 1 -INACTIVE -ACIVE - - OPT:StatusFault - OPT:Name -
-
## FilterMaintenance (BA) - REQ:FilterChangeIndication -0 0 1 -NO_CHANGE_NEEDED -CHANGE_NEEDED - - OPT:Name - OPT:FilterLifeLevel - OPT:ResetFilterIndication -
-
## GarageDoorOpener (41) - REQ:CurrentDoorState -1 0 4 -OPEN -CLOSED -OPENING -CLOSING -STOPPED - - REQ:TargetDoorState -1 0 1 -OPEN -CLOSED - - REQ:ObstructionDetected -false 0 1 - - OPT:LockCurrentState - OPT:LockTargetState - OPT:Name -
-
## HAPProtocolInformation (A2) - REQ:Version - -
-
## HeaterCooler (BC) - REQ:Active -0 0 1 -INACTIVE -ACIVE - - REQ:CurrentTemperature -0 0 100 - - REQ:CurrentHeaterCoolerState -1 0 3 -INACTIVE -IDLE -HEATING -COOLING - - REQ:TargetHeaterCoolerState -0 0 2 -AUTO -HEAT -COOL - - OPT:Name - OPT:RotationSpeed - OPT:TemperatureDisplayUnits - OPT:SwingMode - OPT:CoolingThresholdTemperature - OPT:HeatingThresholdTemperature - OPT:LockPhysicalControls -
-
## HumidifierDehumidifier (BD) - REQ:Active -0 0 1 -INACTIVE -ACIVE - - REQ:CurrentRelativeHumidity -0 0 100 - - REQ:CurrentHumidifierDehumidifierState -1 0 3 -INACTIVE -IDLE -HUMIDIFYING -DEHUMIDIFYING - - REQ:TargetHumidifierDehumidifierState -0 0 2 -AUTO -HUMIDIFY -DEHUMIDIFY - - OPT:Name - OPT:RelativeHumidityDehumidifierThreshold - OPT:RelativeHumidityHumidifierThreshold - OPT:RotationSpeed - OPT:SwingMode - OPT:WaterLevel - OPT:LockPhysicalControls -
-
## HumiditySensor (82) - REQ:CurrentRelativeHumidity -0 0 100 - - OPT:Name - OPT:StatusActive - OPT:StatusFault - OPT:StatusTampered - OPT:StatusLowBattery -
-
## InputSource (D9) - REQ:Identifier -0 0 255 - - OPT:ConfiguredName - OPT:IsConfigured - OPT:CurrentVisibilityState - OPT:TargetVisibilityState -
-
## IrrigationSystem (CF) - REQ:Active -0 0 1 -INACTIVE -ACIVE - - REQ:ProgramMode -0 0 2 -NONE -SCHEDULED -SCHEDULE_OVERRIDEN - - REQ:InUse -0 0 1 -NOT_IN_USE -IN_USE - - OPT:RemainingDuration - OPT:StatusFault -
-
## LeakSensor (83) - REQ:LeakDetected -0 0 1 -NOT_DETECTED -DETECTED - - OPT:Name - OPT:StatusActive - OPT:StatusFault - OPT:StatusTampered - OPT:StatusLowBattery -
-
## LightBulb (43) - REQ:On -false 0 1 - - OPT:Brightness - OPT:Hue - OPT:Name - OPT:Saturation - OPT:ColorTemperature -
-
## LightSensor (84) - REQ:CurrentAmbientLightLevel -1 0.0001 100000 - - OPT:Name - OPT:StatusActive - OPT:StatusFault - OPT:StatusTampered - OPT:StatusLowBattery -
-
## LockMechanism (45) - REQ:LockCurrentState -0 0 3 -UNLOCKED -LOCKED -JAMMED -UNKNOWN - - REQ:LockTargetState -0 0 1 -UNLOCK -LOCK - - OPT:Name -
-
## Microphone (112) - REQ:Mute -false 0 1 -OFF -ON - - OPT:Name - OPT:Volume -
-
## MotionSensor (85) - REQ:MotionDetected -false 0 1 - - OPT:Name - OPT:StatusActive - OPT:StatusFault - OPT:StatusTampered - OPT:StatusLowBattery -
-
## OccupancySensor (86) - REQ:OccupancyDetected -0 0 1 -NOT_DETECTED -DETECTED - - OPT:Name - OPT:StatusActive - OPT:StatusFault - OPT:StatusTampered - OPT:StatusLowBattery -
-
## Outlet (47) - REQ:On -false 0 1 - - REQ:OutletInUse -false 0 1 - - OPT:Name -
-
## SecuritySystem (7E) - REQ:SecuritySystemCurrentState -3 0 4 -ARMED_STAY -ARMED_AWAY -ARMED_NIGHT -DISARMED -ALARM_TRIGGERED - - REQ:SecuritySystemTargetState -3 0 3 -ARM_STAY -ARM_AWAY -ARM_NIGHT -DISARM - - OPT:Name - OPT:SecuritySystemAlarmType - OPT:StatusFault - OPT:StatusTampered -
-
## ServiceLabel (CC) - REQ:ServiceLabelNamespace -1 0 1 -DOTS -NUMERALS - -
-
## Slat (B9) - REQ:CurrentSlatState -0 0 2 -FIXED -JAMMED -SWINGING - - REQ:SlatType -0 0 1 -HORIZONTAL -VERTICAL - - OPT:Name - OPT:SwingMode - OPT:CurrentTiltAngle - OPT:TargetTiltAngle -
-
## SmokeSensor (87) - REQ:SmokeDetected -0 0 1 -NOT_DETECTED -DETECTED - - OPT:Name - OPT:StatusActive - OPT:StatusFault - OPT:StatusTampered - OPT:StatusLowBattery -
-
## Speaker (113) - REQ:Mute -false 0 1 -OFF -ON - - OPT:Name - OPT:Volume -
-
## StatelessProgrammableSwitch (89) - REQ:ProgrammableSwitchEvent -0 0 2 -SINGLE_PRESS -DOUBLE_PRESS -LONG_PRESS - - OPT:Name - OPT:ServiceLabelIndex -
-
## Switch (49) - REQ:On -false 0 1 - - OPT:Name -
-
## Television (D8) - REQ:Active -0 0 1 -INACTIVE -ACIVE - - OPT:ConfiguredName - OPT:ActiveIdentifier - OPT:RemoteKey - OPT:PowerModeSelection -
-
## TelevisionSpeaker (113) - REQ:VolumeControlType -0 0 3 - - REQ:VolumeSelector -0 0 1 - -
-
## TemperatureSensor (8A) - REQ:CurrentTemperature -0 0 100 - - OPT:Name - OPT:StatusActive - OPT:StatusFault - OPT:StatusTampered - OPT:StatusLowBattery -
-
## Thermostat (4A) - REQ:CurrentHeatingCoolingState -0 0 2 -OFF -HEATING -COOLING - - REQ:TargetHeatingCoolingState -0 0 3 -OFF -HEAT -COOL -AUTO - - REQ:CurrentTemperature -0 0 100 - - REQ:TargetTemperature -16 10 38 - - REQ:TemperatureDisplayUnits -0 0 1 -CELSIUS -FAHRENHEIT - - OPT:CoolingThresholdTemperature - OPT:CurrentRelativeHumidity - OPT:HeatingThresholdTemperature - OPT:Name - OPT:TargetRelativeHumidity -
-
## Valve (D0) - REQ:Active -0 0 1 -INACTIVE -ACIVE - - REQ:InUse -0 0 1 -NOT_IN_USE -IN_USE - - REQ:ValveType -0 0 3 - - OPT:SetDuration - OPT:RemainingDuration - OPT:IsConfigured - OPT:ServiceLabelIndex - OPT:StatusFault - OPT:Name -
-
## Window (8B) - REQ:CurrentPosition -0 0 100 - - REQ:TargetPosition -0 0 100 - - REQ:PositionState -2 0 2 -GOING_TO_MINIMUM -GOING_TO_MAXIMUM -STOPPED - - OPT:Name - OPT:HoldPosition - OPT:ObstructionDetected -
-
## WindowCovering (8C) - REQ:TargetPosition -0 0 100 - - REQ:CurrentPosition -0 0 100 - - REQ:PositionState -2 0 2 -GOING_TO_MINIMUM -GOING_TO_MAXIMUM -STOPPED - - OPT:Name - OPT:HoldPosition - OPT:CurrentHorizontalTiltAngle - OPT:TargetHorizontalTiltAngle - OPT:CurrentVerticalTiltAngle - OPT:TargetVerticalTiltAngle - OPT:ObstructionDetected -
+
AccessoryInformation (3E) + + + + + + + + + +
Identify
FirmwareRevision
Manufacturer
Model
Name
SerialNumber
HardwareRevision
AccessoryFlags
+
AirPurifier (BB) + + + + + + + + +
Active
CurrentAirPurifierState
TargetAirPurifierState
Name
RotationSpeed
SwingMode
LockPhysicalControls
+
AirQualitySensor (8D) + + + + + + + + + + + + + +
AirQuality
Name
OzoneDensity
NitrogenDioxideDensity
SulphurDioxideDensity
PM25Density
PM10Density
VOCDensity
StatusActive
StatusFault
StatusTampered
StatusLowBattery
+
BatteryService (96) + + + + + +
BatteryLevel
ChargingState
StatusLowBattery
Name
+
CarbonDioxideSensor (97) + + + + + + + + + +
CarbonDioxideDetected
Name
StatusActive
StatusFault
StatusTampered
StatusLowBattery
CarbonDioxideLevel
CarbonDioxidePeakLevel
+
CarbonMonoxideSensor (7F) + + + + + + + + + +
CarbonMonoxideDetected
Name
StatusActive
StatusFault
StatusTampered
StatusLowBattery
CarbonMonoxideLevel
CarbonMonoxidePeakLevel
+
ContactSensor (80) + + + + + + + +
ContactSensorState
Name
StatusActive
StatusFault
StatusTampered
StatusLowBattery
+
Door (81) + + + + + + + +
CurrentPosition
TargetPosition
PositionState
Name
HoldPosition
ObstructionDetected
+
Doorbell (121) + + + + + +
ProgrammableSwitchEvent
Name
Volume
Brightness
+
Fan (B7) + + + + + + + + + +
Active
Name
CurrentFanState
TargetFanState
RotationDirection
RotationSpeed
SwingMode
LockPhysicalControls
+
Faucet (D7) + + + + +
Active
StatusFault
Name
+
FilterMaintenance (BA) + + + + + +
FilterChangeIndication
Name
FilterLifeLevel
ResetFilterIndication
+
GarageDoorOpener (41) + + + + + + + +
CurrentDoorState
TargetDoorState
ObstructionDetected
LockCurrentState
LockTargetState
Name
+
HAPProtocolInformation (A2) + + +
Version
+
HeaterCooler (BC) + + + + + + + + + + + + +
Active
CurrentTemperature
CurrentHeaterCoolerState
TargetHeaterCoolerState
Name
RotationSpeed
TemperatureDisplayUnits
SwingMode
CoolingThresholdTemperature
HeatingThresholdTemperature
LockPhysicalControls
+
HumidifierDehumidifier (BD) + + + + + + + + + + + + +
Active
CurrentRelativeHumidity
CurrentHumidifierDehumidifierState
TargetHumidifierDehumidifierState
Name
RelativeHumidityDehumidifierThreshold
RelativeHumidityHumidifierThreshold
RotationSpeed
SwingMode
WaterLevel
LockPhysicalControls
+
HumiditySensor (82) + + + + + + + +
CurrentRelativeHumidity
Name
StatusActive
StatusFault
StatusTampered
StatusLowBattery
+
InputSource (D9) + + + + + + +
ConfiguredName
IsConfigured
Identifier
CurrentVisibilityState
TargetVisibilityState
+
IrrigationSystem (CF) + + + + + + +
Active
ProgramMode
InUse
RemainingDuration
StatusFault
+
LeakSensor (83) + + + + + + + +
LeakDetected
Name
StatusActive
StatusFault
StatusTampered
StatusLowBattery
+
LightBulb (43) + + + + + + + +
On
Brightness
Hue
Name
Saturation
ColorTemperature
+
LightSensor (84) + + + + + + + +
CurrentAmbientLightLevel
Name
StatusActive
StatusFault
StatusTampered
StatusLowBattery
+
LockMechanism (45) + + + + +
LockCurrentState
LockTargetState
Name
+
Microphone (112) + + + + +
Mute
Name
Volume
+
MotionSensor (85) + + + + + + + +
MotionDetected
Name
StatusActive
StatusFault
StatusTampered
StatusLowBattery
+
OccupancySensor (86) + + + + + + + +
OccupancyDetected
Name
StatusActive
StatusFault
StatusTampered
StatusLowBattery
+
Outlet (47) + + + + +
On
OutletInUse
Name
+
SecuritySystem (7E) + + + + + + + +
SecuritySystemCurrentState
SecuritySystemTargetState
Name
SecuritySystemAlarmType
StatusFault
StatusTampered
+
ServiceLabel (CC) + + +
ServiceLabelNamespace
+
Slat (B9) + + + + + + + +
CurrentSlatState
SlatType
Name
SwingMode
CurrentTiltAngle
TargetTiltAngle
+
SmokeSensor (87) + + + + + + + +
SmokeDetected
Name
StatusActive
StatusFault
StatusTampered
StatusLowBattery
+
Speaker (113) + + + + +
Mute
Name
Volume
+
StatelessProgrammableSwitch (89) + + + + +
ProgrammableSwitchEvent
Name
ServiceLabelIndex
+
Switch (49) + + + +
On
Name
+
Television (D8) + + + + + + +
Active
ConfiguredName
ActiveIdentifier
RemoteKey
PowerModeSelection
+
TelevisionSpeaker (113) + + + +
VolumeControlType
VolumeSelector
+
TemperatureSensor (8A) + + + + + + + +
CurrentTemperature
Name
StatusActive
StatusFault
StatusTampered
StatusLowBattery
+
Thermostat (4A) + + + + + + + + + + + +
CurrentHeatingCoolingState
TargetHeatingCoolingState
CurrentTemperature
TargetTemperature
TemperatureDisplayUnits
CoolingThresholdTemperature
CurrentRelativeHumidity
HeatingThresholdTemperature
Name
TargetRelativeHumidity
+
Valve (D0) + + + + + + + + + + +
Active
InUse
ValveType
SetDuration
RemainingDuration
IsConfigured
ServiceLabelIndex
StatusFault
Name
+
Window (8B) + + + + + + + +
CurrentPosition
TargetPosition
PositionState
Name
HoldPosition
ObstructionDetected
+
WindowCovering (8C) + + + + + + + + + + + +
TargetPosition
CurrentPosition
PositionState
Name
HoldPosition
CurrentHorizontalTiltAngle
TargetHorizontalTiltAngle
CurrentVerticalTiltAngle
TargetVerticalTiltAngle
ObstructionDetected