# HG changeset patch # User Michiel Broek # Date 1556392020 -7200 # Node ID 326cf2982eeee801c5477c84b528f68634dedaef # Parent ff7f038fae2f9d4f2ef78530741a6afbdd931c02 More relaxed DHT11 readings diff -r ff7f038fae2f -r 326cf2982eee thermferm/devices.c --- a/thermferm/devices.c Sat Apr 27 20:54:20 2019 +0200 +++ b/thermferm/devices.c Sat Apr 27 21:07:00 2019 +0200 @@ -905,13 +905,14 @@ case DEVTYPE_DHT: /* * Make sure we don't read the sensor within 2 seconds. + * But we use 20 seconds interval. */ now = time(NULL); - if ((int)(now - dht11_last) > 2) { + if ((int)(now - dht11_last) > 20) { dht11_pin = device->gpiopin; dht11Read(); dht11_last = now; - } + // } if (device->subdevice == 0) { piLock(LOCK_DEVICES); if (dht11_valid) { @@ -933,6 +934,7 @@ } piUnlock(LOCK_DEVICES); } + } break; case DEVTYPE_GPIO: