From f81e0eb2e468caffabd9a54d77c2ad642ae04f23 Mon Sep 17 00:00:00 2001 From: Theo Arends Date: Mon, 9 Jul 2018 12:24:24 +0200 Subject: [PATCH] Change SHT1x sensor detection Change SHT1x sensor initialization from pre-teleperiod to once during restart to fix I2C interference --- sonoff/_releasenotes.ino | 1 + sonoff/xsns_07_sht1x.ino | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sonoff/_releasenotes.ino b/sonoff/_releasenotes.ino index 4ce79838b..4595b8ab3 100644 --- a/sonoff/_releasenotes.ino +++ b/sonoff/_releasenotes.ino @@ -1,4 +1,5 @@ /* 6.1.0a + * Change SHT1x sensor initialization from pre-teleperiod to once during restart to fix I2C interference * Add wifi and mqtt status led blinkyblinky to be disabled by SetOption31 1. Does not work when LedPower is On (deliberate) (#871, #2230, #3114, #3155) * Add experimental (untested) TM1638 switch support (#2226) * Add support for APDS9960 proximity sensor (#3051) diff --git a/sonoff/xsns_07_sht1x.ino b/sonoff/xsns_07_sht1x.ino index 98837471b..be86b3c21 100644 --- a/sonoff/xsns_07_sht1x.ino +++ b/sonoff/xsns_07_sht1x.ino @@ -231,7 +231,8 @@ boolean Xsns07(byte function) if (i2c_flg) { switch (function) { - case FUNC_PREP_BEFORE_TELEPERIOD: +// case FUNC_PREP_BEFORE_TELEPERIOD: // As this is not a real I2C device it may interfere with other sensors + case FUNC_INIT: // Move detection to restart only removing interference ShtDetect(); break; case FUNC_JSON_APPEND: