change outdoor sensoresp0 to less send sensitive light

master
interfisch 2 years ago
parent 53c04c0077
commit f9103ecdc8

@ -34,7 +34,8 @@ build_flags =
-D dataBMP180_pressure_minchange=0.5
-D SENSOR_TCS34725
-D dataTCS34725_lux_minchange=10
-D dataTCS34725_lux_minchange=500
-D dataTCS34725_lux_senddelaymax=1000*60*1
-D dataTCS34725_colortemp_minchange=100
-D SENSOR_HS1101
@ -43,7 +44,7 @@ build_flags =
-D SENSOR_ML8511
-D ML8511PIN=A0
-D dataML8511_minchange=0.05
-D dataML8511_minchange=0.2
-D SENSOR_ANEMOMETER
-D ANEMOMETERPIN=D6 #Light Blue thicker cable (in distribution box)
@ -71,7 +72,7 @@ build_flags =
-D SENSOR_DHT22
-D DHTPIN=D7
-D dataDHT22_temperature_minchange=0.2
-D dataDHT22_humidity_minchange=1.0
-D dataDHT22_humidity_minchange=2.0
-D SENSOR_BMP180
-D dataBMP180_temperature_minchange=0.2

@ -358,6 +358,9 @@ void setup() {
#ifdef dataTCS34725_lux_minchange
dataTCS34725_lux.minchange=dataTCS34725_lux_minchange;
#endif
#ifdef dataTCS34725_lux_senddelaymax
dataTCS34725_lux.senddelaymax=dataTCS34725_lux_senddelaymax;
#endif
#ifdef dataTCS34725_colortemp_minchange
dataTCS34725_colortemp.minchange=dataTCS34725_colortemp_minchange;
#endif
@ -912,9 +915,13 @@ void loop_TCS34725_colortemp()
Homie.getLogger() << "colortemp tcs " << ": " << value_colortemp << endl;
if (tcs.lux>=TCS34725_MINLUXFORCT) {
sensorNode.setProperty("colortemp").send(String(value_colortemp));
if (value_colortemp > 1) {
sensorNode.setProperty("colortemp").send(String(value_colortemp));
}else{
Homie.getLogger() << "didn't send tcs ct because value is too low" << endl;
}
}else{
Homie.getLogger() << "didn't send tcs because light too low: " << tcs.lux << "lux" << endl;
Homie.getLogger() << "didn't send tcs ct because light too low: " << tcs.lux << "lux" << endl;
}
d.lastsentvalue=value_colortemp;

Loading…
Cancel
Save