Page 1 of 1

Issue with MX Graphs

Posted: Wed 04 Jul 2018 12:08 pm
by Big Daddy
Hi All,
We had a power cut at the weekend and since then the "daily" graphs for rain and temperature have been displaying incorrectly showing a 100 year span. Everything else seems to have survived. This has obviously been caused by the incorrect shutdown of my Raspberry Pi so I am just wondering if anybody has any ided how to sort it out.
rain.png
.

Any help appreciated.

Andy

Re: Issue with MX Graphs

Posted: Wed 04 Jul 2018 12:52 pm
by steve
Looks like some kind of corruption in dayfile.txt - the diags file may have some relevant error messages. Stop MX and open the file in a good text editor and look for anything obviously unusual. Also check that the date formats are all correct.

Re: Issue with MX Graphs

Posted: Wed 04 Jul 2018 5:07 pm
by Big Daddy
Hi Steve,
Many thanks for the quick response and the pointers.

In the dayfile I found entries (in the following order) for 30/6/18, 1/7/18, 31/12/99, 31/12/99, 31/12/99, 2/7/18, 3/7/18)

Also there is an MXdiag file created with this date - 20000101-001741 that contains this.
2000-01-01 00:17:45.399 Start Timers
2000-01-01 00:17:45.399 Starting 1-minute timer
2000-01-01 00:17:45.401 Attempting realtime FTP connect
2000-01-01 00:17:46.121 Starting Realtime timer, interval = 60 seconds
2018-07-02 18:11:41.318 Hour changed:18
2018-07-02 18:11:41.318 Calculating sunrise and sunset times
2018-07-02 18:11:41.319 Sunrise: 04:39:01

So I expect this is what you were referring to.

Question now is how do I correct it. My thoughts were either:

1) Remove the offending 31/12/99 dates from the dayfile

or

2) I backup my data at 3am every Monday, so load all, or some, of the data files back and let them re-read from the station.

Advice on correction would be helpful please.

I need to look elsewhere as well as the Pi has a RTC fitted so unless this was pure file corruption due to the abnormal shutdown or possibly a time issue I dont know.

Thanks
Andy

Re: Issue with MX Graphs

Posted: Wed 04 Jul 2018 5:44 pm
by steve
Yes, looks like your clock went screwy. I can't really advise on which of the two approaches would be best, you could look at the lines with valid dates and assess whether they correctly represent those days, otherwise use your backup (or one the Cumulus backups, which are intended for this purpose) to reload the data from the end of June to date. Note that this data will typically not be as good as 'live' data.

Re: Issue with MX Graphs

Posted: Wed 04 Jul 2018 8:12 pm
by Big Daddy
Thanks Steve,

Took option 1 an removed the lines out of dayfile.txt. Graphs back to normal and all looking good.

Now to work on "did I install the RTC properly and is it working "issue.

Appreciate the help as always.

Andy