Add Dew Point to Temperature and Humidity sensors

Add Dew Point to Temperature and Humidity sensors
This commit is contained in:
Theo Arends 2020-03-16 17:09:15 +01:00
parent 566bc47af4
commit a258296055
5 changed files with 18 additions and 2 deletions

View File

@ -105,6 +105,7 @@ The following binary downloads have been compiled with ESP8266/Arduino library c
- Add Zigbee features and improvements - Add Zigbee features and improvements
- Add Zigbee support for Hue emulation by Stefan Hadinger - Add Zigbee support for Hue emulation by Stefan Hadinger
- Add HAss Discovery support for Button and Switch triggers by Federico Leoni (#7901) - 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 optional support for Prometheus using file xsns_91_prometheus.ino (#7216)
- Add support for gzipped binaries - Add support for gzipped binaries
- Add support for Romanian language translations by Augustin Marti - Add support for Romanian language translations by Augustin Marti

View File

@ -6,6 +6,7 @@
- Add support for HDC1080 Temperature and Humidity sensor by Luis Teixeira (#7888) - Add support for HDC1080 Temperature and Humidity sensor by Luis Teixeira (#7888)
- Add commands ``SwitchMode 13`` PushOn and ``SwitchMode 14`` PushOnInverted (#7912) - Add commands ``SwitchMode 13`` PushOn and ``SwitchMode 14`` PushOnInverted (#7912)
- Add Zigbee support for Hue emulation by Stefan Hadinger - Add Zigbee support for Hue emulation by Stefan Hadinger
- Add Dew Point to Temperature and Humidity sensors
### 8.1.0.10 20200227 ### 8.1.0.10 20200227

View File

@ -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 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_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_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}"; const char JSON_SNS_ILLUMINANCE[] PROGMEM = ",\"%s\":{\"" D_JSON_ILLUMINANCE "\":%d}";

View File

@ -86,7 +86,7 @@ void Dht12EverySecond(void)
} }
} }
} }
/*
void Dht12Show(bool json) void Dht12Show(bool json)
{ {
if (Dht12.valid) { 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 * Interface

View File

@ -272,6 +272,7 @@ void HdcEverySecond(void) {
* the MQTT messages, and so on. * the MQTT messages, and so on.
* *
*/ */
/*
void HdcShow(bool json) { void HdcShow(bool json) {
if (hdc_valid) { if (hdc_valid) {
char temperature[33]; 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 * Interface