From d0e3427ec742223df6338c70b00fcc745bdfc53d Mon Sep 17 00:00:00 2001 From: jake-b <1012393+jake-b@users.noreply.github.com> Date: Mon, 9 Dec 2024 20:46:13 -0500 Subject: [PATCH] Fix detection for some RadSens hardware versions (#5542) Co-authored-by: Jake-B --- src/detect/ScanI2CTwoWire.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/detect/ScanI2CTwoWire.cpp b/src/detect/ScanI2CTwoWire.cpp index d29e5be8e0..551b87d277 100644 --- a/src/detect/ScanI2CTwoWire.cpp +++ b/src/detect/ScanI2CTwoWire.cpp @@ -425,11 +425,14 @@ void ScanI2CTwoWire::scanPort(I2CPort port, uint8_t *address, uint8_t asize) case CGRADSENS_ADDR: // Register 0x00 of the RadSens sensor contains is product identifier 0x7D + // Undocumented, but some devices return a product identifier of 0x7A registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x00), 1); - if (registerValue == 0x7D) { + if (registerValue == 0x7D || registerValue == 0x7A) { type = CGRADSENS; logFoundDevice("ClimateGuard RadSens", (uint8_t)addr.address); break; + } else { + LOG_DEBUG("Unexpected Device ID for RadSense: addr=0x%x id=0x%x", CGRADSENS_ADDR, registerValue); } break;