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=fbe2d7771eba42eaeeb0de39503e960a79a7ad43;hp=4b807d6a1ee3f3f3334b36161725c2ac19d5905b;hb=d02b9cb2c4647b9d4524bd6c36ce732741873892;hpb=db61d93b984bb7d590fed6ca6b6046a73fed77f3 diff --git a/garage/garage.ino b/garage/garage.ino index 4b807d6..fbe2d77 100644 --- a/garage/garage.ino +++ b/garage/garage.ino @@ -27,10 +27,10 @@ WiFiUDP Udp; // GPIO where the DS18B20 is connected to const int oneWireBus = 19; // Setup a oneWire instance to communicate with any OneWire devices -// ROM = 28 31 A7 1D 13 21 1 F6 ROM = 28 15 8E 4B 13 21 1 46 +// ROM = 28 C6 C9 81 E3 6E 3C C ROM = 28 31 A7 1D 13 21 1 F6 ROM = 28 15 8E 4B 13 21 1 46 No more addresses. DeviceAddress sensor_heater_out = {0x28, 0x31, 0xA7, 0x1D, 0x13, 0x21, 0x01, 0xF6}; DeviceAddress sensor_serre = {0x28, 0x15, 0x8E, 0x4B, 0x13, 0x21, 0x01, 0x46}; -//DeviceAddress sensor_heater_in = {0x28, 0x31, 0xA7, 0x1D, 0x13, 0x21, 0x01, 0xF6}; +DeviceAddress sensor_heater_in = {0x28, 0xC6, 0xC9, 0x81, 0xE3, 0x6E, 0x3C ,0x0C}; OneWire oneWire(oneWireBus); // Pass our oneWire reference to Dallas Temperature sensor DallasTemperature sensors(&oneWire); @@ -106,7 +106,7 @@ void loop() { sensors.requestTemperatures(); float serre_tempC = sensors.getTempC(sensor_serre); float heater_out_tempC = sensors.getTempC(sensor_heater_out); - // float heater_in_tempC = sensors.getTempC(sensor_heater_in); + float heater_in_tempC = sensors.getTempC(sensor_heater_in); if(serre_tempC == DEVICE_DISCONNECTED_C) { // Error @@ -120,11 +120,11 @@ void loop() { 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(heater_in_tempC == DEVICE_DISCONNECTED_C) { + // Error + } else { + sendToInfluxDB("temperature,city="+city+",location=heater,direction=in", "value", String(heater_in_tempC)); + } sendToInfluxDB("teleinfo,city="+city+",location="+location, "SINSTS", tinfo_SINSTS); sendToInfluxDB("teleinfo,city="+city+",location="+location, "SINSTS1", tinfo_SINSTS1);