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

Recent historical data problem

Topics about the Beta trials up to Build 3043, the last build by Cumulus's founder Steve Loft. It was by this time way out of Beta but Steve wanted to keep it that way until he made a decision on his and Cumulus's future.

Moderator: mcrossley

User avatar
logjam
Posts: 172
Joined: Fri 30 Nov 2012 8:01 pm
Weather Station: Homemade station on Raspberry Pi
Operating System: Raspbian on Raspberry Pi
Location: North Lincolnshire, UK
Contact:

Recent historical data problem

Post by logjam »

I'd not seen any problems with the 'recent historical data' figures until this morning when I had to restart CumulusMX. I then noticed that although the times and figures were correct from midnight onwards, the figures before midnight were just repeats of the midnight value.

I checked the logger data, and everything is ok there, but the 'Recent' tags (including <RecentTS>), before midnight, just return the midnight value. I'm only using values for the last 24 hours so I don't know if values later than 24 hours are affected.
Last edited by logjam on Sat 01 Aug 2015 12:36 pm, edited 1 time in total.
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: Recent historical data problem

Post by steve »

This was just a 'quick' restart, yes, so no logger data involved from overnight? It sounds like a bug in pre-loading the recent data list from the log files. I'll check the code - could you attach the diags file from the restart, please?
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: Recent historical data problem

Post by steve »

I've just realised what the date is. For some reason, it's not going back into the previous month's log when pre-loading the recent data list, that shouldn't be too hard to fix.
Steve
User avatar
logjam
Posts: 172
Joined: Fri 30 Nov 2012 8:01 pm
Weather Station: Homemade station on Raspberry Pi
Operating System: Raspbian on Raspberry Pi
Location: North Lincolnshire, UK
Contact:

Re: Recent historical data problem

Post by logjam »

I'm regularly backing up the data from the Pi to my laptop so in this instance I checked the logger data by starting Cumulus 1 on the laptop and letting it read the data. (Lazy - I know!) I then just looked at the graphs to see if the data was showing over the past 24 hours. If I had thought to look at the actual files instead I might have realised that the data before and after midnight were on a different month files! :oops:

Do you still need the diag file?
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: Recent historical data problem

Post by steve »

Yes, please, because having looked at the code it's not obvious what the problem is. I've just restarted mine, and it's loaded data from last month. It seems to be doing the correct thing, so perhaps there's a problem in your July log.
Steve
User avatar
logjam
Posts: 172
Joined: Fri 30 Nov 2012 8:01 pm
Weather Station: Homemade station on Raspberry Pi
Operating System: Raspbian on Raspberry Pi
Location: North Lincolnshire, UK
Contact:

Re: Recent historical data problem

Post by logjam »

I've zipped them all up. I restarted Cumulus a second time today before I wrote this thread in case it hadn't read the log correctly. It made no difference, but that explains the additional file today.

EDIT: I'm using several historical tags, but as an example if I use <#RecentOutsideTemp h=X>, where X are the numbers 24 to 1, I get these figures generated after processing. (as of 16:45 today)

13.2, 13.2, 13.2, 13.2, 13.2, 13.2, 13.2, 13.2, 12.7, 12.5, 11.6, 11.0, 10.9, 11.1, 11.8, 13.1, 15.3, 16.7, 18.6, 20.0, 19.6, 19.9, 20.7, 21.3
You do not have the required permissions to view the files attached to this post.
Last edited by logjam on Sat 01 Aug 2015 3:48 pm, edited 1 time in total.
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: Recent historical data problem

Post by steve »

2015-08-01 12:29:26.870 Error at line 35154 of data/Jul15log.txt : Constraint
2015-08-01 12:29:26.871 Please edit the file to correct the error
2015-08-01 12:29:30.133 Error at line 674 of data/Aug15log.txt : Constraint
2015-08-01 12:29:30.134 Please edit the file to correct the error

The 'constraint' error occurs when adding items to the recent data database and usually means a duplicate timestamp in the log file. This probably isn't indicative of a real problem, it's just a side effect of the way the Fine Offset logger doesn't timestamp entries. I'll see if I can persuade the database to not complain about duplicate timestamps.
Steve
User avatar
logjam
Posts: 172
Joined: Fri 30 Nov 2012 8:01 pm
Weather Station: Homemade station on Raspberry Pi
Operating System: Raspbian on Raspberry Pi
Location: North Lincolnshire, UK
Contact:

Re: Recent historical data problem

Post by logjam »

As you predicted there were duplicate entries at those points. I stopped CumulusMX and removed the duplicates, and restarted. Of course the program then found further duplicates and complained about them too. :D It is hard to spot any duplicates by eye. I'll await developments!

I imagine my immediate problem will be ironed out at midnight tonight as the last of the errors move off the part of the array I'm using - until I re-start the program again, of course.
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: Recent historical data problem

Post by steve »

I think you're using a 1-minute logger interval, and so, with a Fine Offset station, you are likely to get a duplicate timestamp pretty much every time you restart Cumulus.
Steve
User avatar
logjam
Posts: 172
Joined: Fri 30 Nov 2012 8:01 pm
Weather Station: Homemade station on Raspberry Pi
Operating System: Raspbian on Raspberry Pi
Location: North Lincolnshire, UK
Contact:

Recent historical data problem

Post by logjam »

I must admit that logging every minute is not really necessary. Once every 2 or 3 minutes would be just as effective. I'll change that before I next restart.
User avatar
logjam
Posts: 172
Joined: Fri 30 Nov 2012 8:01 pm
Weather Station: Homemade station on Raspberry Pi
Operating System: Raspbian on Raspberry Pi
Location: North Lincolnshire, UK
Contact:

Re: Recent historical data problem

Post by logjam »

I just upgraded to 3027. Unfortunately upon restart not only has it 'forgotten' everything before midnight, but also everything after it as well. :cry:

In anticipation, I've included the relevant diag file.

btw I did increase the logging interval to 2 minutes using 'setlogger'. EDIT: (Having said that, I notice it is still logging every minute :?: )
You do not have the required permissions to view the files attached to this post.
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: Recent historical data problem

Post by steve »

logjam wrote:I just upgraded to 3027. Unfortunately upon restart not only has it 'forgotten' everything before midnight, but also everything after it as well.
Changing from 'Insert' to 'InsertOrReplace' doesn't seem to have had the effect that the documentation promised it would have:

2015-08-05 16:32:07.037 Error at line 748 of data/Aug15log.txt : Constraint

Can you have a look at that line and confirm that it has the same timestamp as a previous entry? Most likely the one immediately before it.
btw I did increase the logging interval to 2 minutes using 'setlogger'. EDIT: (Having said that, I notice it is still logging every minute :?: )
It's logging every two minutes:

16:32:08 Read logger entry for 05/08/2015 16:31:07 address 66B0: 02 25 19 01 37 D1 00 76 27 25 36 00 08 D2 0E 00
16:32:08 Read logger entry for 05/08/2015 16:29:07 address 66A0: 02 25 1A 01 37 D1 00 76 27 11 1B 00 0A D2 0E 00
16:32:08 Read logger entry for 05/08/2015 16:27:07 address 6690: 02 25 1A 01 37 D1 00 75 27 18 25 00 0A D2 0E 00
16:32:08 Read logger entry for 05/08/2015 16:25:07 address 6680: 02 25 1B 01 37 D1 00 76 27 18 29 00 0C D2 0E 00

You have Cumulus set to log every minute, but that's nothing to do with the station logger, or what the SetLogger utility does.
Steve
User avatar
logjam
Posts: 172
Joined: Fri 30 Nov 2012 8:01 pm
Weather Station: Homemade station on Raspberry Pi
Operating System: Raspbian on Raspberry Pi
Location: North Lincolnshire, UK
Contact:

Re: Recent historical data problem

Post by logjam »

Yes line 748 and 747 have identical time stamps.
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: Recent historical data problem

Post by steve »

I'll change it to ignore that error.
Steve
User avatar
logjam
Posts: 172
Joined: Fri 30 Nov 2012 8:01 pm
Weather Station: Homemade station on Raspberry Pi
Operating System: Raspbian on Raspberry Pi
Location: North Lincolnshire, UK
Contact:

Re: Recent historical data problem

Post by logjam »

I'll look out for that change.

Yes, now I've worked it through, I can see that the console logger interval only determines the rate at which data is placed into its memory, and it will only be apparent to Cumulus for the period when it 'catches up' after a restart. It is Cumulus' own log interval which would need changing. :oops:

I'll keep it at 1 min for now at least, since that will ensure a supply of duplicate time stamps, to check the effect of any changes you might make!
Locked