X-Git-Url: http://git.home-dn.net/?p=manu%2Farduino-maison.git;a=blobdiff_plain;f=garage%2Fgarage.ino;fp=garage%2Fgarage.ino;h=9a663f574c11b9cc9a322ecdba03aee24632b98b;hp=44f2c49af24054eeefdd24f04e4fdda04c20edaa;hb=4c8b87c67b233c5b9690f3c0f5d0a16259738f84;hpb=479c6a499e7ab2649c78f1197e1af2478f944c83 diff --git a/garage/garage.ino b/garage/garage.ino index 44f2c49..9a663f5 100644 --- a/garage/garage.ino +++ b/garage/garage.ino @@ -100,9 +100,29 @@ void loop() { 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));