fowsr, FHEM, daily and hourly rain

149 views
Skip to first unread message

thomas...@gmail.com

unread,
Jan 28, 2014, 8:09:53 AM1/28/14
to fo...@googlegroups.com
Hello

I'm using fowsr in connection with FHEM. Generally it works like a charm but fowsr does not offer the daily and hourly rain amount like it does for the other supported protocols. In the source it is stated that those two values are calculated and not received from the weather station (why at all?). But even the calculated values are not accessible via the "-c" option.
I tried to extend the ws3600_format data structure in fowsr.h:

  {"Rtot"         , 13, us,  0.35,0},// Multiply by 0.3 to get mm
  {"R1h"         , WS_RAIN_HOUR, us,  0.35,0},// Multiply by 0.3 to get mm
  {"R24h"         , WS_RAIN_DAY, us,  0.35,0},// Multiply by 0.3 to get mm

WS_RAIN_HOUR is 0x08, WS_RAIN_DAY is 0x0a as defined in the header file.

First line is an original one the two following are my extensions. fowsr delivers two values but they are not plausible:

Rtot 37.1
R1h 2432.1
R24h 22.8

I also tried position 231 as described in the WS memory map (http://www.jim-easterbrook.me.uk/weather/mm/) without success.

Any ideas?

Thomas

Arne-Jørgen Auberg

unread,
Jan 28, 2014, 5:47:59 PM1/28/14
to fo...@googlegroups.com
 
Hi,
 
This is my understanding on how the rain counter works:
 
Every 0.3mm rain causes the rain counter to increment. The "rain" parameter in position 13 in the log file contains the number of counts for the sample period. As an example, if you set the sample rate to 5 minutes, the log file will contain rain counter values for 5 minutes, New periods will count from zero. If you send this parameter directly to WUG it will just give you small values slightly above zero.
 
I think that the processor in the weather station is not able to do any floating point arithmetics, and find that the values displayed on the weather station display are useless. FOWSR is presumably running on a more powerful processor, so more accurate values are possible.
 
Calculating backwards through the log files was my attempt to find a value that is not present in any of the memory read outs, and I do not think that the value exists in the weather station at all. Therefore it has to be calculated.
 
Of course, I may have misunderstood all this, and the rain calculations could also be done much more efficiently. There could also be errors in the implementation. But basically I find it necessary to do these calculations as there are no values in the weather station that can be read directly.

Josch

unread,
Feb 27, 2014, 1:07:04 PM2/27/14
to fo...@googlegroups.com
Hi Thomas,

in case of use with FHEM there is no need for calculating hourly and daily rain because you can do it in FHEM. There are the functions delta-h and delta-d for use with diagrams. It was my intension that fowsr should only deliver the direct measured values with the -c option. All calculations can and should be done in FHEM because this gives more flexibility.

Josch

thomas...@gmail.com

unread,
Apr 7, 2014, 11:04:54 AM4/7/14
to fo...@googlegroups.com
Hello Josch,

thank you for your answer and excuse my late response.
I will give the FHEM-internal calculation a try.

BTW: Every few days a get a glitch in various input parameters (rain total, pressure etc.). E. g. for rain total there is a spike for one minute from 0 to 2.9 or for pressure from 1008 to 1777. It is directly in tha data coming from fowsr (I dump it separately in a file). Is it caused by my PCE-FWS 20 hardware or is it known to be a fowsr problem?

Best regards
Thomas

Josch

unread,
Apr 23, 2014, 11:44:24 AM4/23/14
to fo...@googlegroups.com
Hello Thomas,

I don't have the problem you describe. I've a WS-0101 station and read it every 5 minutes. This station has another problem if using for longer times. When the internal memory is full, the station hangs some times. In this case you can't scroll through the history at the station itself nor read it out via USB. The only solution (known to me) is removing the batteries from the indoor unit for a short while.

Did you try a longer read interval? Maybe there is a conflict between writing data from the sensors into the internal memory and reading it out via usb. 

Best regards.

Josch
Reply all
Reply to author
Forward
0 new messages