I have 3d printed a simple rain gauge, who is connected to one ESP8266 with ESP Easy Mega.
This simply cont every time the rain gauge shift the position. (for now i simply count the shift at the end i transform this in mm/m2 of rain)
This is my situation: For send this data to wu (weather underground) every 5 minutes i need:
- Total, thi is not a problem I think the Total value in Generic - Pulse counter RGC do this hob)rg60min - [rain inches over the past hour)] -- the accumulated rainfall in the past 60 min
Total - [rain inches so far today in local time]
- rg60min, this is the problem, I use the formula (see below) but this is not correct in my opinion, in my formula i reset the counter every hour, i need a costant value of rainfall in the past 60 min.
Code: Select all
Rule 1
on Clock#Time=All,00:00
TaskValueSet 1,1,0
TaskValueSet 1,2,0
TaskValueSet 2,1,0
TaskValueSet 2,2,0
endon
on Clock#Time=All,**:00 do
TaskValueSet 2,1,0
endon
on RGC#Count do
TaskValueSet 2,1,[RG#prec]+[RGC#Count]
TaskValueSet 2,2,0
TaskValueSet 2,2,[RG#rg60min]
Publish %sysname%/RG/Count,[RG#rg60min]
Publish %sysname%/RG/Total,[RGC#Total]
endon
