From 723c343277a2bd23ff2a64a69ef34937eaba5e0a Mon Sep 17 00:00:00 2001 From: Gregg Date: Tue, 16 Apr 2024 22:17:00 -0500 Subject: [PATCH] Added error checking to warn if non-bridge device defines more than 3 Accessories It appears that HomeKit requires devices with more than 3 Accessories to be configured as a bridge. If not, the Home App will ignore any functional Services in the first Accessory and treat it like a bridge regardless. Device with 3 or less Accessories do not require a bridge configuration. --- src/HomeSpan.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/HomeSpan.cpp b/src/HomeSpan.cpp index 7cba72b..38667fa 100644 --- a/src/HomeSpan.cpp +++ b/src/HomeSpan.cpp @@ -1027,6 +1027,9 @@ void Span::processSerialCommand(const char *c){ } LOG0("\nConfigured as Bridge: %s\n",isBridge?"YES":"NO"); + if(!isBridge && Accessories.size()>3) + LOG0("*** WARNING #%d! HomeKit requires the device be configured as a Bridge when more than 3 Accessories are defined ***\n",++nWarnings); + if(hapConfig.configNumber>0) LOG0("Configuration Number: %d\n",hapConfig.configNumber); LOG0("\nDatabase Validation: Warnings=%d, Errors=%d\n",nWarnings,nErrors);