Domotiocz + Rain gauge
-
@sundberg84 Using a real pulse counter instead of a 1mm pulse counter seems to work perfectly. Luckily it makes the sketch a bunch easier to implement and read. And there will also be no loss of 0.2 or 0.5 mm rain fall whenever you reset the node while it didn't have a .0 value.
-
@flopp Thank you for the explanation. I think I've got it.
I've added a RAINRATE msg like this
MyMessage rainRateMsg( CHILD_ID_RAIN_LOG, V_RAINRATE );But I don't think domoticz uses it.
@TheoL RAINRATE is implemented according to this page https://github.com/domoticz/domoticz/blob/master/hardware/MySensorsBase.cpp but I don't know how to use it. I know that DZ doesn't work with this example https://www.mysensors.org/build/rain
-
Domoticz just recently changed the method of rain rate calculation. It does not interpret rainrate values sent by sensors but calculates this by the total value coming in.
-
Domoticz just recently changed the method of rain rate calculation. It does not interpret rainrate values sent by sensors but calculates this by the total value coming in.
-
@sundberg84 Using a real pulse counter instead of a 1mm pulse counter seems to work perfectly. Luckily it makes the sketch a bunch easier to implement and read. And there will also be no loss of 0.2 or 0.5 mm rain fall whenever you reset the node while it didn't have a .0 value.
Great to see this project continuing to grow legs!
-
This is great!
1 year - times fly by, but my rainsensor is going strong!I just wanted to celebrate 1 year for my Rainsensor on batteries, reporting every hour (or less when it rains). Still going strong and 81% battery left! Except for some range issues in the beginning you can see its working as it should:
Also It will be my (almost) 1000th post so thank you all for making MySensors such a great community. I just love every minute here!

@sundberg84 said:
I just wanted to celebrate 1 year for my Rainsensor on batteries, reporting every hour (or less when it rains). Still going strong and 81% battery left! Except for some range issues in the beginning you can see its working as it should:
WOW, nice. Would it be possible to see your Battery graph, if you have one?
I am send data every 2h or often when it rains but my battery is draining much quicker than yours. Maybe I will get 1 year out of it, so I am happy anyway.
But I am interested in your graph if the voltage is going down quicker in the beginning. -
-
Maybe a stupid question, but it is possible to replace the SI7021 sensor with a DHT-22 sensor (the code has to be changed offsourse)? And get everything to work with ThresholdUtil? I have all parts, but not the SI7021 sensor to build the rain gauge.
@Hilltan That should really be easy. I've created the threshold util especially for this. You only have to replace the si7021 init part with the DHT22 init part and replace the reading part of the si7021 in the threshold util callback with reading the DHT22 part. Then you're done.
Just give it a try yourself. It's really not that hard.
There's however a reason why I use the si7021 instead of the DHT's. I've had serious troubles with the DHT sensors. Some of them wouldn't report the values to the gateway for a week. After the that the node spontaneously started reporting again. I have a sense bender running for more than a half year flawlessly. So in my opinion the si7021 is superior to the DHT.
-
Maybe a stupid question, but it is possible to replace the SI7021 sensor with a DHT-22 sensor (the code has to be changed offsourse)? And get everything to work with ThresholdUtil? I have all parts, but not the SI7021 sensor to build the rain gauge.
@Hilltan Like @TheoL mentioned, try to avoid the DHT22, especially for battery powered operation. The DHT-22 is (apart from other disadvantages) specified for a working voltage from 3.3-6V. And tend to get unstable at low voltages.
-
-
-
-
Yep, note that the BMP180/BMP085 is described in the https://www.mysensors.org/build/pressure example. BME280 might be a better choice nowadays perhaps.
-
@Hilltan That should really be easy. I've created the threshold util especially for this. You only have to replace the si7021 init part with the DHT22 init part and replace the reading part of the si7021 in the threshold util callback with reading the DHT22 part. Then you're done.
Just give it a try yourself. It's really not that hard.
There's however a reason why I use the si7021 instead of the DHT's. I've had serious troubles with the DHT sensors. Some of them wouldn't report the values to the gateway for a week. After the that the node spontaneously started reporting again. I have a sense bender running for more than a half year flawlessly. So in my opinion the si7021 is superior to the DHT.
How will the numbers affect the Thresholds reading and reporting of the sensor?
registerThresholdedSensor( CHILD_ID_TEMP, 1, TEMPERATURE_SENSOR, 0.5, 30, 20 );
0.5 //What will this do?
30 //What will this do?
20 //That one I assume is how often the value will be sent to the gateway?void updatedTHSensorValue( uint8_t child_id, uint8_t sensor_id, ThreshHoldedSensorType sensor_type, float value ) {
switch ( child_id ) {
case CHILD_ID_TEMP:
Serial.print( "Sending temp " );
Serial.println( value, 1 ); //What will this do?
send( msgTemp.set( value, 1 ) ); //What will this do?
break;I don’t have the SI7021 sensor yet so therefore my questions
And a problem with the DHT sensor is correct me if I am wrong, is that the DHT sensor does not like to be “read” to often. How will I do this? Or maybe the answer to my question is in the registerThresholdedSensor code ;).