From 7d8eefe9d96b905d86ae8cf1557396fb26d63374 Mon Sep 17 00:00:00 2001 From: Gregg Date: Sun, 21 Jan 2024 22:09:33 -0600 Subject: [PATCH] update --- src/Span.h | 2 +- tools/makeServiceList | 9 ++++++--- tools/test.md | 8 ++++---- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/Span.h b/src/Span.h index 4bb7fb8..f51a303 100644 --- a/src/Span.h +++ b/src/Span.h @@ -425,7 +425,7 @@ namespace Characteristic { CREATE_CHAR(uint8_t,Active,0,0,1,INACTIVE,ACTIVE); // indicates if the Service is active/on CREATE_CHAR(uint32_t,ActiveIdentifier,0,0,255); // numerical Identifier of the InputSource selected in the Home App. CREATE_CHAR(uint8_t,AirQuality,0,0,5,UNKNOWN,EXCELLENT,GOOD,FAIR,INFERIOR,POOR); // a subjective description - CREATE_CHAR(uint8_t,BatteryLevel,0,0,100); // measured as a percentage + CREATE_CHAR(uint8_t,BatteryLevel,100,0,100); // measured as a percentage CREATE_CHAR(int,Brightness,0,0,100); // measured as a percentage CREATE_CHAR(double,CarbonMonoxideLevel,0,0,100); // measured in parts per million (ppm) CREATE_CHAR(double,CarbonMonoxidePeakLevel,0,0,100); // measured in parts per million (ppm) diff --git a/tools/makeServiceList b/tools/makeServiceList index ae1f4f6..647a55c 100755 --- a/tools/makeServiceList +++ b/tools/makeServiceList @@ -34,10 +34,13 @@ BEGIN { default[char]=x[4] min[char]=x[5] max[char]=x[6] - nConstants[char]=n-6 # parse any pre-defined constants - value=0 # default starting value of constants + nConstants[char]=n-6 # parse any pre-defined constants + value=0 # default starting value of constants for(i=0;i Required Identification Information. For each Accessory in a HomeSpan device this must be included as the first Service.
- + @@ -42,7 +42,7 @@ ## BatteryService (96)
Defines a standalone Battery Service.
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 (0) 
Identify (14) :small_blue_diamond:
  • triggers an update when HomeKit wants HomeSpan to run its identification routine for an Accessory
boolPW11
  • RUN_ID (1) 
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"
- + @@ -128,7 +128,7 @@ - +
CharacteristicFormatPermsMinMaxConstants/Defaults
BatteryLevel (68) :small_blue_diamond:
  • measured as a percentage
uint8PR+EV01000
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) 
Name (23)
  • default name of a Service used only during initial pairing
stringPR--"unnamed"
FilterChangeIndication (AC) :small_blue_diamond:
  • indicates state of filter
uint8PR+EV01
  • NO_CHANGE_NEEDED (0) :heavy_check_mark:
  • CHANGE_NEEDED (1) 
Name (23)
  • default name of a Service used only during initial pairing
stringPR--"unnamed"
FilterLifeLevel (AB)
  • measures as a percentage of remaining life
floatPR+EV01000
ResetFilterIndication (AD)
  • triggers and update when the user chooses to reset the FilterChangeIndication from the Home App
uint8PW11
  • RESET_FILTER=1 (0) 
ResetFilterIndication (AD)
  • triggers and update when the user chooses to reset the FilterChangeIndication from the Home App
uint8PW11
  • RESET_FILTER (1) 
## GarageDoorOpener (41) @@ -338,7 +338,7 @@ Active (B0) :small_blue_diamond:uint8PW+PR+EV01 ConfiguredName (E3) stringPW+PR+EV--"unnamed" ActiveIdentifier (E7) uint32PW+PR+EV02550 -RemoteKey (E1) uint8PW415 +RemoteKey (E1) uint8PW415 PowerModeSelection (DF) uint8PW00