Part of an on-going process of learning Python I made a small python3 module that gets the GPS location based precipitation forecast provided by buienradar.nl
Combined with some python mqtt code i now have a MQTT sensor that will notify me if there is significant precipitation in a configurable future.
I plan to use this in my irrigation systems next summer but the uses for this are not limited to thisā¦
I now there are similar solutions, but for me the buienradar.nl predictions have proven to be the most accurateā¦
python module and MQTT example can be found here:
*** feedback on the module is appreciated!
**** next i will try to make a HASS sensor based on this
Initial sensor is working as of yesterday
if i find out how to get the lat & long from the hass config and read a config key from the configuration.yaml i will release something on my github page.
new version!!
better calculations, if f*ckd up the rounding (i rounded before calculating averages).
place the buienradar.py in the custom_components/sensor directory and restart hass.
the new python module (pybuienradar v.0.5) will be loaded automatically.
@Koen: would love to use this, but need a bit more help (Iām new). Installed HA on a Raspberry using the all-in-one installer. Where do I put the buienradar.py file? Donāt have this custom_component directory. Thanks
nice project. even more nice that buienradar also gives data for Germany. (and more i didnt check)
i made the buienradar.py in the custom component dir, but the configuration in the yaml seems to give me trouble.
you have a setting timeframe.
what does it exactly set? the amount of time in advance, or the amount of time it will measure the rain expectation, or ā¦?
i just want to know exactly how to interpret the mm/H
Iām struggling with that too to provide useful data.
For now itās the average rain within the timeframe
āāātime the sensor is updatedā + seconds in timeframe value.""
I.e : Timeframe 600 will give you the average (and total) mm/h within the next 10 minutes after last updating the sensor.
I use the data thatās also visible in the horizontal graph on their website:
i dont see that graph on my pc but i guess it gives the data anyway
right now i have it set to 3600 so if i am correct the value it gives would be the amount off mm i can expect in the next hour.
lets see if it is a bit accurate for this region too
in the near future i will get an rainmeter too, so then i can really compare things
if they are a bit accurate maybe in the future you could expand youre code to give the temp, felt temp and amount of sun also
youre code has a hardcoded 5 min check time.
cant you change that to set the time in the yaml?
I thought about making this an option but opted for this method.
Reasoning behind this was, why would you need to monitor precipitation for homeautomation purposes at another location than home?
If i ever find time to adjust the code that you can add multiple buienradar sensors than this will have to change
@ReneTode; i chose the hardcoded update time because the sourcefile is (only) updated every 5 minutes.