mirror of https://github.com/arendst/Tasmota.git
KNX: Support for DS18S20 Temperature sensor
This commit is contained in:
parent
51d09680aa
commit
d80e3a928d
|
@ -199,6 +199,11 @@ void Ds18b20Show(boolean json)
|
||||||
#ifdef USE_DOMOTICZ
|
#ifdef USE_DOMOTICZ
|
||||||
if (0 == tele_period) DomoticzSensor(DZ_TEMP, temperature);
|
if (0 == tele_period) DomoticzSensor(DZ_TEMP, temperature);
|
||||||
#endif // USE_DOMOTICZ
|
#endif // USE_DOMOTICZ
|
||||||
|
#ifdef USE_KNX
|
||||||
|
if (0 == tele_period) {
|
||||||
|
KnxSensor(KNX_TEMPERATURE, t);
|
||||||
|
}
|
||||||
|
#endif // USE_KNX
|
||||||
#ifdef USE_WEBSERVER
|
#ifdef USE_WEBSERVER
|
||||||
} else {
|
} else {
|
||||||
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_TEMP, mqtt_data, "DS18B20", temperature, TempUnit());
|
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_TEMP, mqtt_data, "DS18B20", temperature, TempUnit());
|
||||||
|
|
|
@ -385,6 +385,11 @@ void Ds18x20Show(boolean json)
|
||||||
domoticz_flag = false;
|
domoticz_flag = false;
|
||||||
}
|
}
|
||||||
#endif // USE_DOMOTICZ
|
#endif // USE_DOMOTICZ
|
||||||
|
#ifdef USE_KNX
|
||||||
|
if ((0 == tele_period) && (0 == i)) {
|
||||||
|
KnxSensor(KNX_TEMPERATURE, t);
|
||||||
|
}
|
||||||
|
#endif // USE_KNX
|
||||||
#ifdef USE_WEBSERVER
|
#ifdef USE_WEBSERVER
|
||||||
} else {
|
} else {
|
||||||
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_TEMP, mqtt_data, (1 == ds18x20_sensors) ? ds18x20_types : stemp, temperature, TempUnit());
|
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_TEMP, mqtt_data, (1 == ds18x20_sensors) ? ds18x20_types : stemp, temperature, TempUnit());
|
||||||
|
|
|
@ -192,6 +192,11 @@ void Ds18x20Show(boolean json)
|
||||||
DomoticzSensor(DZ_TEMP, temperature);
|
DomoticzSensor(DZ_TEMP, temperature);
|
||||||
}
|
}
|
||||||
#endif // USE_DOMOTICZ
|
#endif // USE_DOMOTICZ
|
||||||
|
#ifdef USE_KNX
|
||||||
|
if ((0 == tele_period) && (1 == dsxflg)) {
|
||||||
|
KnxSensor(KNX_TEMPERATURE, t);
|
||||||
|
}
|
||||||
|
#endif // USE_KNX
|
||||||
#ifdef USE_WEBSERVER
|
#ifdef USE_WEBSERVER
|
||||||
} else {
|
} else {
|
||||||
snprintf_P(stemp, sizeof(stemp), PSTR("%s-%d"), ds18x20_types, i +1);
|
snprintf_P(stemp, sizeof(stemp), PSTR("%s-%d"), ds18x20_types, i +1);
|
||||||
|
|
Loading…
Reference in New Issue