From a258296055fed8b3bcc9d63e7d8a82d18c666294 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Mon, 16 Mar 2020 17:09:15 +0100 Subject: [PATCH] Add Dew Point to Temperature and Humidity sensors Add Dew Point to Temperature and Humidity sensors --- RELEASENOTES.md | 1 + tasmota/CHANGELOG.md | 1 + tasmota/i18n.h | 2 +- tasmota/xsns_58_dht12.ino | 9 ++++++++- tasmota/xsns_65_hdc1080.ino | 7 +++++++ 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 91cdac670..b9d6f43d6 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -105,6 +105,7 @@ The following binary downloads have been compiled with ESP8266/Arduino library c - Add Zigbee features and improvements - Add Zigbee support for Hue emulation by Stefan Hadinger - Add HAss Discovery support for Button and Switch triggers by Federico Leoni (#7901) +- Add Dew Point to Temperature and Humidity sensors - Add optional support for Prometheus using file xsns_91_prometheus.ino (#7216) - Add support for gzipped binaries - Add support for Romanian language translations by Augustin Marti diff --git a/tasmota/CHANGELOG.md b/tasmota/CHANGELOG.md index 0c9f9c958..fafc4c7e6 100644 --- a/tasmota/CHANGELOG.md +++ b/tasmota/CHANGELOG.md @@ -6,6 +6,7 @@ - Add support for HDC1080 Temperature and Humidity sensor by Luis Teixeira (#7888) - Add commands ``SwitchMode 13`` PushOn and ``SwitchMode 14`` PushOnInverted (#7912) - Add Zigbee support for Hue emulation by Stefan Hadinger +- Add Dew Point to Temperature and Humidity sensors ### 8.1.0.10 20200227 diff --git a/tasmota/i18n.h b/tasmota/i18n.h index 580f68d5d..eb1130405 100644 --- a/tasmota/i18n.h +++ b/tasmota/i18n.h @@ -631,7 +631,7 @@ const char S_JSON_DRIVER_INDEX_NVALUE[] PROGMEM = "{\"" D_CMND_DRIVE const char S_JSON_DRIVER_INDEX_SVALUE[] PROGMEM = "{\"" D_CMND_DRIVER "%d\":\"%s\"}"; const char JSON_SNS_TEMP[] PROGMEM = ",\"%s\":{\"" D_JSON_TEMPERATURE "\":%s}"; -const char JSON_SNS_TEMPHUM[] PROGMEM = ",\"%s\":{\"" D_JSON_TEMPERATURE "\":%s,\"" D_JSON_HUMIDITY "\":%s}"; +//const char JSON_SNS_TEMPHUM[] PROGMEM = ",\"%s\":{\"" D_JSON_TEMPERATURE "\":%s,\"" D_JSON_HUMIDITY "\":%s}"; const char JSON_SNS_TEMPHUMDEW[] PROGMEM = ",\"%s\":{\"" D_JSON_TEMPERATURE "\":%s,\"" D_JSON_HUMIDITY "\":%s,\"" D_JSON_DEWPOINT "\":%s}"; const char JSON_SNS_ILLUMINANCE[] PROGMEM = ",\"%s\":{\"" D_JSON_ILLUMINANCE "\":%d}"; diff --git a/tasmota/xsns_58_dht12.ino b/tasmota/xsns_58_dht12.ino index 454f90b00..8e34e14d5 100644 --- a/tasmota/xsns_58_dht12.ino +++ b/tasmota/xsns_58_dht12.ino @@ -86,7 +86,7 @@ void Dht12EverySecond(void) } } } - +/* void Dht12Show(bool json) { if (Dht12.valid) { @@ -116,6 +116,13 @@ void Dht12Show(bool json) } } } +*/ +void Dht12Show(bool json) +{ + if (Dht12.valid) { + TempHumDewShow(json, (0 == tele_period), Dht12.name, Dht12.temperature, Dht12.humidity); + } +} /*********************************************************************************************\ * Interface diff --git a/tasmota/xsns_65_hdc1080.ino b/tasmota/xsns_65_hdc1080.ino index 59f0f75f2..bcba65ec5 100644 --- a/tasmota/xsns_65_hdc1080.ino +++ b/tasmota/xsns_65_hdc1080.ino @@ -272,6 +272,7 @@ void HdcEverySecond(void) { * the MQTT messages, and so on. * */ +/* void HdcShow(bool json) { if (hdc_valid) { char temperature[33]; @@ -301,6 +302,12 @@ void HdcShow(bool json) { } } } +*/ +void HdcShow(bool json) { + if (hdc_valid) { + TempHumDewShow(json, (0 == tele_period), hdc_type_name, hdc_temperature, hdc_humidity); + } +} /*********************************************************************************************\ * Interface