Quick calculation says mine will.last 357 years. no point buying any spare batteries
Hi there,
I also use this DYI rain gauge and it works
I want to added it to node red to get a telegram push mail, if the rain starts…
Can anybody explain me whats wrong with my node red?
[{"id":"5e0b5527afad8eb1","type":"tab","label":"Test Rain","disabled":false,"info":"","env":[]},{"id":"da06b09aea0d88fc","type":"trigger-state","z":"5e0b5527afad8eb1","name":"Regenfall Heute","server":"818794df.29c548","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"sensor.regenfall_heute","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"targetType":"this_entity","targetValue":"","propertyType":"current_state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"","propertyValue":"new_state.state"}],"inputs":1,"outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","enableInput":true,"x":120,"y":100,"wires":[["3a3f01be2ed45180"],[]]},{"id":"3a3f01be2ed45180","type":"api-current-state","z":"5e0b5527afad8eb1","name":"> 0,1mm Regenfall","server":"818794df.29c548","version":3,"outputs":2,"halt_if":"0,1","halt_if_type":"num","halt_if_compare":"gt","entity_id":"sensor.regenfall_heute","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":350,"y":100,"wires":[["eb78db9f32f526fb"],[]]},{"id":"eb78db9f32f526fb","type":"function","z":"5e0b5527afad8eb1","name":"","func":"msg.payload = {}\nmsg.payload.chatId = 1556242258\nmsg.payload.type = 'message'\nmsg.payload.content = 'Es regnet'\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":680,"y":100,"wires":[["0121d0c22c7e2de9"]]},{"id":"0121d0c22c7e2de9","type":"telegram sender","z":"5e0b5527afad8eb1","name":"","bot":"f5f08046.40345","haserroroutput":false,"outputs":1,"x":860,"y":100,"wires":[[]]},{"id":"818794df.29c548","type":"server","name":"Home Assistant","version":4,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m"},{"id":"f5f08046.40345","type":"telegram bot","botname":"HA_Blackbird_bot","usernames":"","chatids":"","baseapiurl":"","updatemode":"polling","pollinterval":"300","usesocks":false,"sockshost":"","socksport":"6667","socksusername":"anonymous","sockspassword":"","bothost":"","botpath":"","localbotport":"8443","publicbotport":"8443","privatekey":"","certificate":"","useselfsignedcertificate":false,"sslterminated":false,"verboselogging":false}]
I don’t know the exact dimensions but the unit of measurement is 0.45mm per tap
If it were me I’d just watch the contact sensor and report if it opens or closes
I’ve been experimenting with the home assistant side of this because, like others, I’ve been having problems when restarting home assistant.
I’ve discovered that there’s a helper called counter which is able to retain its value when home assistant is restarted and I’m incrementing that using nodered and the trigger node, although I bet you can do it with home assistant automations too.
So far, I am able to restart nodered and not get false triggers and as a bonus you can also decrement that counter if you’re doing some testing.
Did the retain option or the availability not work for you? (Read from here)
I don’t think the counter is made for that purpose but if it works it works…
I tried setting retain in zigbee2mqtt and using the availability template, but it didn’t help. There was another solution I read here which uses an intermediate template sensor and I’m sure would work, but I had already found out about counters, so I tried that first.
I have two automations, one to reset the counter at a designated time and the other just increments the counter when the switch goes from on to off.
I just hope we have some more rain soon so I can test it out properly
My Rain Gauge finally arrived today so instantly I dropped my payed job and started soldering. And I’m not really good at it, but it seems to work.
I took your code and added it to my config. Now I’m pretty sure you have mixed up sensors.yaml and binary_sensors.yaml. Could you confirm? If I swap the two the config validations okays the config. If I don’t and take your suggestions of the yaml files, it errors out (with the an error you experienced first too).
I would try the yaml of the original post, I regularly update it
The part that starts with template: should be in a template.yaml file which you probably have to create. It’s the new way of creating template sensors.
(Inner)Diameter: | 110 | mm |
---|---|---|
surface area: | 9503,317777 | mm2 |
For the calibration you have to take into account the drops that fall on the edge and split. The smaller the surface of the rain gauge, the bigger this effect.
Possibly a bit fussy if taking into account splashes, when the minimum it records is 0.3 mm (ish) On a hot day this could evaporate before recording.
Hi Parrel,
I’m using your code it works great.
Since I’m measuring an “on” /“off” and not the horizontal position, I modified the code so that I add both states.
My gauge only shows off when the tipper is horizontal, if you used on as well it would record 1 count when at rest and not raining. Therefore one tip could possibly record a count of 3, and the next a count of 2.
By the changes that i made to the gauge I measure “on” and “of”.
You are right that by default the horizontal position is measured!
Yes I’ve noticed that if you reverse the circuit board in the housing you can change it to on/off operation rather than on/off/on.
I guess that would mean the sensor doesn’t have to send as many state changes, which might be an advantage. When in on/off/on the sensor has to react quite quickly and may miss tips in heavy rain.
I haven’t seen any reports of that happening though and the aqara is very reliable.
I think on-off is more reliable than off-on-off. With off-on-off and heavy rainfall, the “on” moment is very short.
I have tested a lot and also with a lot of water, the on-off measurements are 100% reliable.
I’ve tested this with on-off-on a lot and it doesn’t miss a tip as well so I wouldn’t say on-off is more reliable.
But I agree that on-off is more efficient, but then you would have to change the way the sensor is build
The only change i made is moving the reed switch to the right. If the bucket is to the right, the switch is on, bucket to the left switch is off.
I must confess that I have not tested off-on-off extensively.
Thanks for the idea, I will try it myself this weekend and maybe change the original post if it’s easy
I made an extra template sensor to add the “on” and “off” status together.
I’m still running this on my test environment to optimize the code…