Page 1 of 1

Monthly Records show mixed months

Posted: Wed 22 Nov 2017 6:19 pm
by Big Daddy
Hi,
Looking for a bit of help here.

I noticed that when I look at the current months records it is showing records from November and October. I thought at first this was something I had done on my website but it also occurs when I log onto MX locally on my Pi. I hadn't noticed it before, it may have been happening, it may not. Havent changed anything on my Pi to do with MX.

If I look at the month .ini file I see this as an example.

[General]
Date=2017-11-22T17:54:50

[Wind]
Speed=21.1218407382692
SpTime=2017-10-22T13:23:06
Gust=33.55404435
Time=2017-10-05T05:41:57
Windrun=311.022784421101
WindrunTime=2017-10-22T23:59:00

[Temp]
Low=-1.6
LTime=2017-11-06T06:40:06
High=22.3
HTime=2017-10-16T13:09:13
LowMax=8.6
LMTime=2017-11-13T10:41:00
HighMin=12.7
HMTime=2017-10-19T00:00:00
LowRange=3
LowRangeTime=2017-11-21T00:00:00
HighRange=16.4
HighRangeTime=2017-11-06T00:00:00

As you can see, some dates are November and some are October.

Anybody have any ideas where the trouble might be. Let me know if you need any further info. Have attached the full ini file

Many Thanks
Andy

Re: Monthly Records show mixed months

Posted: Wed 22 Nov 2017 6:47 pm
by steve
Could be a bug in MX, or could be that there's an issue with the clock on your Pi. If those records shown as 22 Oct should really be today (22 Nov) then there may be something in the diags files, so if you zip up the MX diags folder and attach it, I'll take a look when I can.

Re: Monthly Records show mixed months

Posted: Wed 22 Nov 2017 9:59 pm
by Big Daddy
Hi Steve,
Thanks for taking a look. I have attached the MXDiag folder. I did take a quick look through and there are a lot of lost outdoor sensor contacts (I will try and sort that at the weekend) and some times when files couldnt be uploaded to my website but I wouldnt have thought that would cause the dates to change.

I checked the dates on the pi and they show todays date.

Let me know if you need anything further.

Thanks
Andy

Re: Monthly Records show mixed months

Posted: Thu 23 Nov 2017 11:42 am
by mcrossley
It looks to me like Cumulus the rollover was not completed on midnight 31 Oct as the clock was changed from 31 Oct 15:17 to 1 Nov 07:17.

This left the October data in the monthly.ini file and until the November records exceed the October values the file will not be updated (Steve?)

Code: Select all

2017-10-31 15:17:17.211 Starting web socket server on port 8002
2017-10-31 15:17:17.256 Number of history entries = 0
2017-10-31 15:17:17.283 Start Timers
2017-10-31 15:17:17.284 Starting 1-minute timer
2017-10-31 15:17:17.286 Attempting realtime FTP connect
2017-10-31 15:17:17.718 Starting Realtime timer, interval = 60 seconds
2017-11-01 07:17:29.702 Rain total count from station = 239
2017-11-01 07:18:00.338 Hour changed:7
2017-11-01 07:18:00.338 Calculating sunrise and sunset times
2017-11-01 07:18:00.339 Sunrise: 06:57:37
2017-11-01 07:18:00.339 Sunset : 16:28:12
2017-11-01 07:18:00.340 Tomorrow sunrise: 06:59:31
2017-11-01 07:18:00.340 Tomorrow sunset : 16:26:18
2

Re: Monthly Records show mixed months

Posted: Thu 23 Nov 2017 4:54 pm
by steve
Yes, the clock apparently jumping like that means the end of day rollover wasn’t done, and hence neither was the end of month rollover, so it just carried on using the same month.ini contents, effectively merging the two months into one.

Re: Monthly Records show mixed months

Posted: Fri 24 Nov 2017 9:52 am
by Big Daddy
Steve / Mark,
Thanks for you analysis.

I am assuming it was coincidental / bad luck that something happened to the clock during this time and that it should correct itself on the next monthly changeover in a few days time. I dont know if there was a power issue or something during this time, unfortunately I was away on holiday when it occurred so this is the only thing I could think off. I have my Pi set up to use NTP servers and generally it behaves itself so I will keep an eye on it and see if it happens again.

I have also resolved the remote sensor lost contact issue. User error I am afraid, needed new batteries in the outdoor transmitter. :bash:

Once again, appreciate your assistance.

Andy

Re: Monthly Records show mixed months

Posted: Fri 24 Nov 2017 10:00 am
by mcrossley
It looks like it happened shortly after Cumulus started, so if it is being auto-started after a reboot... If you are running on a pi and relying on NTP for setting the time, then you should delay the Cumulus startup until after the pi has obtained its time from the network. I have installed a RTC in my pi to avoid this dependency.

Re: Monthly Records show mixed months

Posted: Fri 24 Nov 2017 11:17 pm
by Big Daddy
Thanks Mark,

Cumulus does start automatically so I will look at delaying it and also look a RTC. I think it was very unfortunate that it happened at monthly change over day but I guess this could happen anytime.

Once again, Many thanks to yourself and Steve for continued great support.

Andy