Rain gauge : input processing ?

Hi everybody !

I follow openenergymonitor since a long time, and I finally have time to play with !
First of all : thanks for this very nice opensource project !

I'm a bit lost in all input processing function. Here is my setting :
* a rain gauge (http://cgi.ebay.fr/ws/eBayISAPI.dll?ViewItem&item=230997558200) connected to an arduino
* the arduino connected to a rPy (with an i2c bus)
* on rPy, there is a python script that read (every K seconds) the amount of rainfall (since last reading) and send it to emoncms

So on emoncms I have an input that receive every K seconds the number of mm of rainfall since last update.
That works fine.

Before to use emoncms, I used rrdtool with the same setting. The rain gauge was configured as ABSOLUTE type in the rrd database with different resolution RRA average storage. Therefore rrdtool automatically computed the average "rain speed" in mm/h (averaged over a min, an hour, a day, etc...).

So I'm trying to do the same with emoncms... and if possible with a timestore database. But I didn't find anything in the documentation (http://www.emoncms.org/site/docs/inputprocessing) and forums that help me.

Maybe I need to change my initial setting (it is possible)...

(I didn't test it in real conditions even with rrdtool)
I think that with such a rain gauge it should be interesting to have in a dashboard:
* the "live" rain strength (mm/h, computed for the last minute)
* the amount of rainfall hour by hour (in mm) == plot of average (for one hour) rain strength (in mm/h)
* the amount of rainfall day by day == plot of average (for one day) rain strength (in mm/day == mm/h *24)

Every help are welcome !
Thanks,

 

enavarro's picture

Re: Rain gauge : input processing ?

I get a bit more deeper into emoncms code and timestore documentation.
I think I get an answer.

=> simply use "Log to feed" :

* every K seconds, the rain gauge gives the number (let's say R) of mm of rainfall
* I can compute the current rainfall speed (in mm/h) : (R * 3600) / K
* I store it in a timestore DB with a resolution of K seconds

Then if I want the amount of rainfall hour by hour for one day , I can just query timestore with start=(day_timecode + 0h) end=(day_timecode + 24h) and npoints=24. I will get 24 points from 0h to 24h, and each point will be the average speed over one hour.

Is it possible, with emoncms dashboard widgets, to get a control of timestore query resolution ?
"rawdata" widget seems to have a default (and constant) resolution setting for D, W, M, Y ?

I notice that if the timestore resolution is higher than the sensor post frequency (let say that you get 3 post of sensor value for each datapoint) only the last post is taken into account. Is it right ?
However It should be possible to store the average of all posted value. Is it planned ?

Also I guess I can use "Power to kWh/d" to store the amount of rainfall per day ?
"Power to kWh/d" actually compute the integral of the input for each day.
I guess it is plan to move such feed to timestore too ?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.