KNX: Support for DS18S20 Temperature sensor

This commit is contained in:
ascillato 2018-06-12 14:46:52 -03:00
parent 51d09680aa
commit d80e3a928d
3 changed files with 15 additions and 0 deletions

View File

@ -199,6 +199,11 @@ void Ds18b20Show(boolean json)
#ifdef USE_DOMOTICZ
if (0 == tele_period) DomoticzSensor(DZ_TEMP, temperature);
#endif // USE_DOMOTICZ
#ifdef USE_KNX
if (0 == tele_period) {
KnxSensor(KNX_TEMPERATURE, t);
}
#endif // USE_KNX
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_TEMP, mqtt_data, "DS18B20", temperature, TempUnit());

View File

@ -385,6 +385,11 @@ void Ds18x20Show(boolean json)
domoticz_flag = false;
}
#endif // USE_DOMOTICZ
#ifdef USE_KNX
if ((0 == tele_period) && (0 == i)) {
KnxSensor(KNX_TEMPERATURE, t);
}
#endif // USE_KNX
#ifdef USE_WEBSERVER
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_TEMP, mqtt_data, (1 == ds18x20_sensors) ? ds18x20_types : stemp, temperature, TempUnit());

View File

@ -192,6 +192,11 @@ void Ds18x20Show(boolean json)
DomoticzSensor(DZ_TEMP, temperature);
}
#endif // USE_DOMOTICZ
#ifdef USE_KNX
if ((0 == tele_period) && (1 == dsxflg)) {
KnxSensor(KNX_TEMPERATURE, t);
}
#endif // USE_KNX
#ifdef USE_WEBSERVER
} else {
snprintf_P(stemp, sizeof(stemp), PSTR("%s-%d"), ds18x20_types, i +1);