DHT22/DHT11 humidity/temperature sensor usermod (#1719)
* DHT22/DHT11 humidity/temperature sensor usermod * cleanup - don't report when usermod is auto-disabled since report isn't persistent * track error count; retry once after error occurs * for esp32, use esp32DHT library * fix unreliable ESP32 readings by switching DHT library to https://github.com/alwynallan/DHT_nonblocking * change default pin to Q2; don't burst readings if error occurs Co-authored-by: Aircoookie <dev.aircoookie@gmail.com>
This commit is contained in:
@@ -31,6 +31,10 @@
|
||||
#include "../usermods/usermod_v2_auto_save/usermod_v2_auto_save.h"
|
||||
#endif
|
||||
|
||||
#ifdef USERMOD_DHT
|
||||
#include "../usermods/DHT/usermod_dht.h"
|
||||
#endif
|
||||
|
||||
void registerUsermods()
|
||||
{
|
||||
/*
|
||||
@@ -49,7 +53,6 @@ void registerUsermods()
|
||||
#ifdef USERMOD_SENSORSTOMQTT
|
||||
usermods.add(new UserMod_SensorsToMQTT());
|
||||
#endif
|
||||
|
||||
#ifdef USERMOD_FOUR_LINE_DISLAY
|
||||
usermods.add(new FourLineDisplayUsermod());
|
||||
#endif
|
||||
@@ -59,4 +62,7 @@ void registerUsermods()
|
||||
#ifdef USERMOD_AUTO_SAVE
|
||||
usermods.add(new AutoSaveUsermod());
|
||||
#endif
|
||||
#ifdef USERMOD_DHT
|
||||
usermods.add(new UsermodDHT());
|
||||
#endif
|
||||
}
|
||||
Reference in New Issue
Block a user