change outdoor sensoresp0 to less send sensitive light

This commit is contained in:
interfisch 2020-11-01 13:14:38 +01:00
parent 53c04c0077
commit f9103ecdc8
2 changed files with 13 additions and 5 deletions

View File

@ -34,7 +34,8 @@ build_flags =
-D dataBMP180_pressure_minchange=0.5 -D dataBMP180_pressure_minchange=0.5
-D SENSOR_TCS34725 -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 dataTCS34725_colortemp_minchange=100
-D SENSOR_HS1101 -D SENSOR_HS1101
@ -43,7 +44,7 @@ build_flags =
-D SENSOR_ML8511 -D SENSOR_ML8511
-D ML8511PIN=A0 -D ML8511PIN=A0
-D dataML8511_minchange=0.05 -D dataML8511_minchange=0.2
-D SENSOR_ANEMOMETER -D SENSOR_ANEMOMETER
-D ANEMOMETERPIN=D6 #Light Blue thicker cable (in distribution box) -D ANEMOMETERPIN=D6 #Light Blue thicker cable (in distribution box)
@ -71,7 +72,7 @@ build_flags =
-D SENSOR_DHT22 -D SENSOR_DHT22
-D DHTPIN=D7 -D DHTPIN=D7
-D dataDHT22_temperature_minchange=0.2 -D dataDHT22_temperature_minchange=0.2
-D dataDHT22_humidity_minchange=1.0 -D dataDHT22_humidity_minchange=2.0
-D SENSOR_BMP180 -D SENSOR_BMP180
-D dataBMP180_temperature_minchange=0.2 -D dataBMP180_temperature_minchange=0.2

View File

@ -358,6 +358,9 @@ void setup() {
#ifdef dataTCS34725_lux_minchange #ifdef dataTCS34725_lux_minchange
dataTCS34725_lux.minchange=dataTCS34725_lux_minchange; dataTCS34725_lux.minchange=dataTCS34725_lux_minchange;
#endif #endif
#ifdef dataTCS34725_lux_senddelaymax
dataTCS34725_lux.senddelaymax=dataTCS34725_lux_senddelaymax;
#endif
#ifdef dataTCS34725_colortemp_minchange #ifdef dataTCS34725_colortemp_minchange
dataTCS34725_colortemp.minchange=dataTCS34725_colortemp_minchange; dataTCS34725_colortemp.minchange=dataTCS34725_colortemp_minchange;
#endif #endif
@ -912,9 +915,13 @@ void loop_TCS34725_colortemp()
Homie.getLogger() << "colortemp tcs " << ": " << value_colortemp << endl; Homie.getLogger() << "colortemp tcs " << ": " << value_colortemp << endl;
if (tcs.lux>=TCS34725_MINLUXFORCT) { 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{ }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; d.lastsentvalue=value_colortemp;