Serial.println("DEBUG wifi connected, start temp measure");
sensors.requestTemperatures();
- float tempC = sensors.getTempCByIndex(0);
+ float tempC = sensors.getTempCByIndex(1);
+ float heater_out_tempC = sensors.getTempCByIndex(0);
+ float heater_in_tempC = sensors.getTempCByIndex(2);
- if(tempC == DEVICE_DISCONNECTED_C)
+ if(tempC == DEVICE_DISCONNECTED_C) {
+ // Error
+ } else {
+ sendToInfluxDB("temperature,city="+city+",location=serre_semis", "value", String(tempC));
+ }
+
+ if(heater_out_tempC == DEVICE_DISCONNECTED_C) {
+ // Error
+ } else {
+ sendToInfluxDB("temperature,city="+city+",location=heater,direction=out", "value", String(heater_out_tempC));
+ }
+
+ if(heater_in_tempC == DEVICE_DISCONNECTED_C) {
+ // Error
+ } else {
+ sendToInfluxDB("temperature,city="+city+",location=heater,direction=in", "value", String(heater_in_tempC));
+ }
+
+ if(tempC == DEVICE_DISCONNECTED_C) {
// Error
} else {
sendToInfluxDB("temperature,city="+city+",location=serre_semis", "value", String(tempC));