Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Last rainfall time glitch

Discussion specific to Fine Offset and similar rebadged weather stations
Post Reply
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Last rainfall time glitch

Post by mcrossley »

I just rebooted my Cumulus box, and noticed that it set the last rainfall time to the time of Cumulus restart. As you can see from the logs below the last tip was between 13:40 and 13:50. Cumulus now shows it as 19:56 despite the rain counter total being unchanged from 13:50.

Code: Select all

[cumulus.008]
23/06/2011 13:30:00.069 : Writing today.ini, LastUpdateTime = 23/06/2011 13:30:00 raindaystart = 126 rain counter = 145.5
23/06/2011 13:40:00.142 : Writing today.ini, LastUpdateTime = 23/06/2011 13:40:00 raindaystart = 126 rain counter = 145.800003051758
23/06/2011 13:50:00.144 : Writing today.ini, LastUpdateTime = 23/06/2011 13:50:00 raindaystart = 126 rain counter = 146.100006103516
23/06/2011 14:00:00.147 : Writing today.ini, LastUpdateTime = 23/06/2011 14:00:00 raindaystart = 126 rain counter = 146.100006103516
....
23/06/2011 19:50:00.154 : Writing today.ini, LastUpdateTime = 23/06/2011 19:50:00 raindaystart = 126 rain counter = 146.100006103516
23/06/2011 19:56:21.682 : MainForm can close
23/06/2011 19:56:21.682 : Showing splash screen
23/06/2011 19:56:23.455 : Exit FormCloseQuery
23/06/2011 19:56:23.455 : MainForm.FormClose
23/06/2011 19:56:23.475 : Terminating threads...
23/06/2011 19:56:23.485 : Threads terminated
23/06/2011 19:56:23.505 : Cumulus closing
23/06/2011 19:56:23.665 : Writing cumulus.ini file
23/06/2011 19:56:23.996 : Terminating ftp thread...
23/06/2011 19:56:23.996 : FTP thread terminated

[cumulus.009]
23/06/2011 19:58:50.786 : System Uptime: 1 minute 
23/06/2011 19:58:50.786 : Locale = 2057 ENG: United Kingdom (English (United Kingdom))
23/06/2011 19:58:50.786 : List separator=, Decimal separator=. Date separator=/ Time separator=:
23/06/2011 19:58:50.786 : User = mark
23/06/2011 19:58:50.866 : Reading cumulus.ini file
23/06/2011 19:58:51.097 : Looking for strings file: C:\Program Files\Cumulus\strings.ini
23/06/2011 19:58:51.097 : YTDRain=0.000 Year=0
23/06/2011 19:58:51.097 : PO=0.00 TO=0.00 HO=0 WDO=0 ITO=0.00
23/06/2011 19:58:51.097 : WSM=1.15 WGM=1.25 TM=1.00 HM=1.08 RM=0.33
23/06/2011 19:58:51.097 : TD=4.00 GD=999.00 WD=999.00 HD=10.00 PD=10.00
23/06/2011 19:58:56.444 : Station type: Fine Offset
23/06/2011 19:58:56.444 : COM port = 0
23/06/2011 19:58:56.444 : Short date format: 23/06/2011
23/06/2011 19:58:56.444 : Long date format: 23 June 2011
23/06/2011 19:58:56.444 : Short time format: 19:58
23/06/2011 19:58:56.444 : Long time format: 19:58:56
23/06/2011 19:59:01.431 : 400 web tags initialised
23/06/2011 19:59:01.431 : 19:59:01 EWUSB: Creating EW USB
23/06/2011 19:59:01.722 : Showing main form
23/06/2011 19:59:03.234 : Looking for C:\Program Files\Cumulus\data\today.ini
23/06/2011 19:59:03.234 : Today.ini exists
23/06/2011 19:59:03.234 : Read today file: Date = 23/06/2011, LastUpdateTime = 23/06/2011 19:50:00
23/06/2011 19:59:03.244 : Todayfileraindaystart = 126
23/06/2011 19:59:03.244 : Todayfile is for today
23/06/2011 19:59:03.254 : ReadTodayfile: set notraininit false
23/06/2011 19:59:03.254 : Finding raintoday from logfile C:\Program Files\Cumulus\data\Jun11log.txt
23/06/2011 19:59:03.464 : Setting raintoday from logfile = 6.59999990463257
23/06/2011 19:59:03.464 : Setting uncalibrated raintotal = 146
23/06/2011 19:59:03.464 : Midnight rain found = 126
23/06/2011 19:59:03.474 : Read yesterday file: Date = 23/06/2011 Date now = 23/06/2011
23/06/2011 19:59:03.474 : Yesterday file is valid
23/06/2011 19:59:03.474 : Loading all time records file C:\Program Files\Cumulus\data\alltime.ini
23/06/2011 19:59:03.474 : Set Default Monthly Highs And Lows
23/06/2011 19:59:03.474 : Read month.ini file
23/06/2011 19:59:03.474 : month.ini is for this month
23/06/2011 19:59:03.474 : Set Default Yearly Highs And Lows
23/06/2011 19:59:03.474 : Read Year.ini file
23/06/2011 19:59:03.474 : Year.ini is for this Year
23/06/2011 19:59:03.484 : Getting rain totals, rain season start = 1
23/06/2011 19:59:03.494 : Rainthismonth from dayfile.txt: 52.5999984741211
23/06/2011 19:59:03.494 : Rainthisyear from dayfile.txt: 299.700042724609
23/06/2011 19:59:06.018 : Diary log file = C:\Program Files\Cumulus\data\log.xml
23/06/2011 19:59:07.580 : 19:59:07 EWUSB Form Create
23/06/2011 19:59:20.479 : 19:59:20 EWUSB: Initialising EW USB
23/06/2011 19:59:20.479 : 19:59:20 EWUSB: Looking for station...
23/06/2011 19:59:20.479 : 19:59:20 EWUSB: Found Fine Offset station
23/06/2011 19:59:20.859 : 19:59:20 EWUSB: Get history data
23/06/2011 19:59:20.869 : Request EW data block, addr = 000000 
23/06/2011 19:59:20.879 : EWUSB: EW startup data line 01  55 AA FF FF FF FF FF FF 
23/06/2011 19:59:20.889 : EWUSB: EW startup data line 02  FF FF FF FF FF FF FF FF 
23/06/2011 19:59:20.899 : EWUSB: EW startup data line 03  1E 20 08 23 11 00 00 00 
23/06/2011 19:59:20.910 : EWUSB: EW startup data line 04  81 00 00 B4 02 00 30 2C 
23/06/2011 19:59:20.910 : Request EW data block, addr = 000020 
23/06/2011 19:59:20.930 : EWUSB: EW startup data line 05  CB 27 C9 2D 00 00 00 00 
23/06/2011 19:59:20.930 : EWUSB: Using configured pressure offset: -155.9
23/06/2011 19:59:20.940 : EWUSB: EW startup data line 06  00 00 00 11 06 23 19 58 
23/06/2011 19:59:20.950 : EWUSB: EW startup data line 07  41 23 C8 00 00 00 46 2D 
23/06/2011 19:59:20.960 : EWUSB: EW startup data line 08  2C 01 64 80 C8 00 00 00 
23/06/2011 19:59:20.960 : UseDataLogger set, read current data
23/06/2011 19:59:20.960 : Request EW data block, addr = 002C30 
23/06/2011 19:59:20.980 : EWUSB: EW startup data line 09  03 43 DE 00 43 89 00 C9 
23/06/2011 19:59:20.990 : EWUSB: EW startup data line 10  2D 00 0A 00 02 E7 01 00 
23/06/2011 19:59:21.000 : EWUSB: EW startup data line 11  1E 34 D3 00 32 66 00 4A 
23/06/2011 19:59:21.000 : EWUSB: EW startup data line 12  2E 0E 18 00 04 0C 19 00 
23/06/2011 19:59:21.010 : Request EW data block, addr = 002C20 
23/06/2011 19:59:21.030 : EWUSB: EW startup data line 13  1E 43 DE 00 42 8A 00 C9 
23/06/2011 19:59:21.040 : EWUSB: EW startup data line 14  2D 00 0E 00 08 E7 01 00 
23/06/2011 19:59:21.040 : EWUSB: Data: 1E 43 DE 00 42 8A 00 C9 2D 00 0E 00 08 E7 01 00 
23/06/2011 19:59:21.040 : EWUSB: EW startup data line 15  03 43 DE 00 43 89 00 C9 
23/06/2011 19:59:21.050 : EWUSB: EW startup data line 16  2D 00 0A 00 02 E7 01 00 
23/06/2011 19:59:21.050 : EWUSB: interval = 30
23/06/2011 19:59:21.050 : EWUSB: timestamp = 23/06/2011 19:56:20
23/06/2011 19:59:21.050 : EWUSB: Lastupdatetime = 23/06/2011 19:50:00
23/06/2011 19:59:21.050 : 19:59:21 EWUSB: Processing history data
23/06/2011 19:59:21.050 : EWUSB: Number of entries = 1
23/06/2011 19:59:21.050 : EWUSB: First history data timestamp = 23/06/2011 19:56:20
23/06/2011 19:59:21.050 : EWUSB: Today file last updated = 23/06/2011 19:50:00
23/06/2011 19:59:21.050 : EWUSB: Todayfile matches start of history data
23/06/2011 19:59:21.050 : EWUSB: LastUpdateTime = 23/06/2011 19:50:00
23/06/2011 19:59:21.050 : EWUSB: Earliest timestamp = 23/06/2011 19:56:20
23/06/2011 19:59:21.050 : EWUSB: Setting raindaystart from todayfile = 126
23/06/2011 19:59:21.050 : EWUSB: Raindaystart = 126
23/06/2011 19:59:21.050 : 19:59:21 EWUSB: Processing history data for = 23/06/2011 19:56:20
23/06/2011 19:59:22.782 : Writing today.ini, LastUpdateTime = 23/06/2011 19:56:20 raindaystart = 126 rain counter = 146.100006103516
23/06/2011 19:59:22.782 : Creating WU URL #1
23/06/2011 19:59:22.782 : http://weatherstation.wunderground.com/weatherstation/updateweatherstation.php?ID=ICHESHIR25&PASSWORD=******&dateutc=2011-06-23+18:56:20&winddir=314&windspeedmph=3.1&windgustmph=3.9&windspdmph_avg2m=3.1&winddir_avg2m=314&humidity=71&tempf=56.8&rainin=0.00&dailyrainin=0.26&baromin=30.01&dewptf=47.5&softwaretype=Cumulus%20v1.9.1&action=updateraw
23/06/2011 19:59:22.782 : 19:59:22 EWUSB: End processing history data
23/06/2011 19:59:22.782 : 19:59:22 EWUSB: Switch to normal running
23/06/2011 19:59:23.193 : Wunderground archive entries = 1
23/06/2011 19:59:23.193 : Uploading Wunderground archive #1
23/06/2011 19:59:23.193 : EWUSB: Closing Please Wait form
23/06/2011 19:59:23.193 : PleaseWaitForm.Close executed
23/06/2011 19:59:25.246 : Wunderground archive upload complete
23/06/2011 20:00:00.196 : Writing today.ini, LastUpdateTime = 23/06/2011 20:00:00 raindaystart = 126 rain counter = 146.100006103516
....
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Last rainfall time glitch

Post by steve »

It seems to do that every time it starts up (for Fine Offset stations). Odd that no-one else has noticed before.
Steve
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Last rainfall time glitch

Post by steve »

It's a rounding problem (as you might have guessed). I use a difference of 0.001 to determine whether the value has changed, which I thought would cover all situations, but at start up, because of the way it determines the rain counter, the difference can be greater than that. I'm currently getting just over 0.03. I'll have to make it a bit more clever and take into account the units and any multiplier.
Steve
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Last rainfall time glitch

Post by mcrossley »

I thought it would be, think I've said it before; you need integer maths :lol:
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Last rainfall time glitch

Post by steve »

Well, yes, and the first versions of Cumulus used integers. Then these people came along wanting to use inches and all kinds of weird units that I wasn't using, so the easiest thing to do was to switch to floats. And I'm effectively already using integers for this comparison anyway. And why hasn't this forum got a tongue-out smiley? :lol:
Steve
User avatar
GraemeT
Posts: 312
Joined: Wed 21 Oct 2009 11:19 am
Weather Station: La Crosse WS-2355 & WS-2306
Operating System: Windoze 7, 10, 11
Location: Bayswater, Australia
Contact:

Re: Last rainfall time glitch

Post by GraemeT »

I've had a similar occurrence 3 times and, strangely a registration of 0.1mm was added to the total rainfall for the day - odd as the LaCrosse bucket is 0.518mm.
As it was only a couple of times and I couldn't reliably repeat the event, I put it down to noise or some other external effect. It hasn't happened since (3 weeks ago), so I don't have any more information.

Cheers,
Cheers,
Graeme.
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Last rainfall time glitch

Post by steve »

GraemeT wrote:strangely a registration of 0.1mm was added to the total rainfall for the day
That could well be another symptom of the same issue, Graeme.
Steve
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Last rainfall time glitch

Post by steve »

Mark, I've just noticed that you're using a rain multiplier of 0.33, so a tip is 0.1 mm. It looks like the problem is where it calculates the current rain counter:

23/06/2011 19:59:03.464 : Setting uncalibrated raintotal = 146

It's lost a whole tip, rather than it being a rounding problem; your counter should be 146.1. I think the bug is probably in my handling of the multiplier in the start up code.

Graeme, are you using a rain multiplier?
Steve
User avatar
GraemeT
Posts: 312
Joined: Wed 21 Oct 2009 11:19 am
Weather Station: La Crosse WS-2355 & WS-2306
Operating System: Windoze 7, 10, 11
Location: Bayswater, Australia
Contact:

Re: Last rainfall time glitch

Post by GraemeT »

No Steve, all multiplier settings are defaults (1.00).
Cheers,
Graeme.
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Last rainfall time glitch

Post by mcrossley »

steve wrote:Mark, I've just noticed that you're using a rain multiplier of 0.33, so a tip is 0.1 mm. It looks like the problem is where it calculates the current rain counter:

23/06/2011 19:59:03.464 : Setting uncalibrated raintotal = 146

It's lost a whole tip, rather than it being a rounding problem; your counter should be 146.1. I think the bug is probably in my handling of the multiplier in the start up code.
Ah, I thought that was the tip counter as it comes from the station - before the multiplier is applied?
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Last rainfall time glitch

Post by steve »

mcrossley wrote:Ah, I thought that was the tip counter as it comes from the station - before the multiplier is applied?
Sorry, yes, you're right. It's the rain counter converted to mm assuming 0.3 mm per tip. Your counter was 01E7, which is 146.1 mm before adjustment. So it's not a whole tip that got lost (and then added back again), it's a third of a tip. At the moment, I don't know whether it's a bug in my calculations or an effect of 'unapplying' the multiplier. The code in this area has become far too complicated for its own good.
Steve
Post Reply