From 92ece5413f55860946b9f067adc248d94c77a34f Mon Sep 17 00:00:00 2001 From: Gregg Date: Fri, 8 Apr 2022 17:54:50 -0500 Subject: [PATCH] Removed requirement to include HAP Protocol in Accessory Information Service HAP Protocol does not appear to be needed anymore (as of iOS 15?) --- src/HomeSpan.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/HomeSpan.cpp b/src/HomeSpan.cpp index 3343563..a7c67b2 100644 --- a/src/HomeSpan.cpp +++ b/src/HomeSpan.cpp @@ -1448,14 +1448,11 @@ SpanAccessory::SpanAccessory(uint32_t aid){ void SpanAccessory::validate(){ boolean foundInfo=false; - boolean foundProtocol=false; for(int i=0;itype,"3E")) foundInfo=true; - else if(!strcmp(Services[i]->type,"A2")) - foundProtocol=true; - else if(aid==1) // this is an Accessory with aid=1, but it has more than just AccessoryInfo and HAPProtocolInformation. So... + else if(aid==1) // this is an Accessory with aid=1, but it has more than just AccessoryInfo. So... homeSpan.isBridge=false; // ...this is not a bridge device } @@ -1464,12 +1461,7 @@ void SpanAccessory::validate(){ homeSpan.configLog+=" *** ERROR! Required Service for this Accessory not found. ***\n"; homeSpan.nFatalErrors++; } - - if(!foundProtocol && (aid==1 || !homeSpan.isBridge)){ // HAPProtocolInformation must always be present in Accessory if aid=1, and any other Accessory if the device is not a bridge) - homeSpan.configLog+=" \u2718 Service HAPProtocolInformation"; - homeSpan.configLog+=" *** ERROR! Required Service for this Accessory not found. ***\n"; -// homeSpan.nFatalErrors++; - } + } ///////////////////////////////