Welcome to the Cumulus Support forum.

Latest Cumulus MX release v3.4.6 (build 3070) - 23 March 2020
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014

See the Wiki for downloading either version.

Daily Temp & Daily Rain charts failure

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
RHards
Posts: 4
Joined: Thu 04 Jul 2019 8:16 pm
Weather Station: FIneOffset
Operating System: Raspberry Pi

Daily Temp & Daily Rain charts failure

Post by RHards » Sat 21 Mar 2020 7:43 am

My web page http://www.rhards.co.uk/WeatherMX/trends.htm worked perfectly adequately for my purposes up until a couple of weeks ago.

Daily Temp and Daily Rain charts seemed to get stuck displaying only one days results (6 March IIRC), daily displaying fewer and fewer days records.

Now they're effectively blank (although Daily Temp seems to have some artefact on the left of where the date axis should be).

Running on a Pi Zero W

I'd be very grateful for any helpful pointers.

Thanks,
Richard

freddie
Posts: 590
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2
Operating System: GNU/Linux (Ubuntu 18.04)
Location: Dorrington, Shropshire
Contact:

Re: Daily Temp & Daily Rain charts failure

Post by freddie » Sat 21 Mar 2020 12:51 pm

Very likely a problem in your dayfile.txt. But you should post your MXDiags file here for checking so we can be sure.
Freddie
Image

RHards
Posts: 4
Joined: Thu 04 Jul 2019 8:16 pm
Weather Station: FIneOffset
Operating System: Raspberry Pi

Re: Daily Temp & Daily Rain charts failure

Post by RHards » Sun 22 Mar 2020 8:19 am

Thanks Freddie,

I have 10 TXT files in the MXdiags folder on my Pi, dating back to 14 March. Should I attach all of them or just the most recent?

FWIW, I've not had either Debug logging or Data logging checked in Dashboard options. Should I check them now?

freddie
Posts: 590
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2
Operating System: GNU/Linux (Ubuntu 18.04)
Location: Dorrington, Shropshire
Contact:

Re: Daily Temp & Daily Rain charts failure

Post by freddie » Sun 22 Mar 2020 9:02 am

Start with the most recent and see if it flags any errors. If not then switch on debug, let it run for a while and then post the file.
Freddie
Image

RHards
Posts: 4
Joined: Thu 04 Jul 2019 8:16 pm
Weather Station: FIneOffset
Operating System: Raspberry Pi

Re: Daily Temp & Daily Rain charts failure

Post by RHards » Sun 22 Mar 2020 9:31 am

Here's the most recent.

Out of interest, how come the file size seems to vary as much as it does, if they are generally logging the same things? Most are around 80KB but this, and one (of two) from yesterday are 20KB.
You do not have the required permissions to view the files attached to this post.

freddie
Posts: 590
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2
Operating System: GNU/Linux (Ubuntu 18.04)
Location: Dorrington, Shropshire
Contact:

Re: Daily Temp & Daily Rain charts failure

Post by freddie » Sun 22 Mar 2020 10:40 am

A new file is created each time you restart Cumulus. So the size of the file will depend on the amount of time between restarts.
Freddie
Image

water01
Posts: 1705
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Daily Temp & Daily Rain charts failure

Post by water01 » Sun 22 Mar 2020 10:41 am

Code: Select all

2020-03-22 03:00:05.790 Error uploading /home/pi/CumulusMX/web/moonphasetagT.txttmp to WeatherMX/moonphasetag.php : Can't open that file: No such file or directory
2020-03-22 03:00:32.928 Error uploading web/dailyrain.json to /dailyrain.json : Timed out trying to read data from the socket stream!
Looks like you have an invalid file path in your Extra Web Files are which is causing the failure of the dailyrain.json file.

It should be moonphasetagT.txt without the tmp on the end.

The other possibility is that you have the correct name but there is a zero length file on your server for moonphasetag.php. FTP in CumulusMX seems to have a problem with overwriting zero length files, so delete it from the server with FileZilla or your FTP tool of choice.

Code: Select all

2020-03-22 08:09:17.897 Error uploading realtime.txt to realtime.txt : Timed out trying to read data from the socket stream!


Other files are failing to load because of this error although the interesting thing is this failure is nearly 9 minutes after the moonphase failure. Maybe the failure is because the first failure is leaving an FTP socket open which fails a later upload. I know that Mark Crossley said he had spotted a few problems with the resilience of the FTP and was looking to improve it in a later build.

In the meantime fix the moonphase upload problem and it should fix the other failures.

Plus what Freddie found below (missed that!!).
David
Image

freddie
Posts: 590
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2
Operating System: GNU/Linux (Ubuntu 18.04)
Location: Dorrington, Shropshire
Contact:

Re: Daily Temp & Daily Rain charts failure

Post by freddie » Sun 22 Mar 2020 10:45 am

There is an error showing in the diags file:

Code: Select all

GetRainfallTotals: Error on line 222 of dayfile.txt: Input string was not in the correct format
So whatever day is on line 222 contains an error. This can occur if Cumulus isn't shut down correctly - for example, if there is a power cut.
Freddie
Image

RHards
Posts: 4
Joined: Thu 04 Jul 2019 8:16 pm
Weather Station: FIneOffset
Operating System: Raspberry Pi

Re: Daily Temp & Daily Rain charts failure

Post by RHards » Tue 24 Mar 2020 8:42 am

Thanks David and Freddie,

I think that seems to have fixed the issues.

Intriguingly, the two daily charts seem to have repopulated themselves this morning (earlier, about 2AM, couldn't sleep) there was just an entry in each for yesterday, but now…

If I'm honest, I'm not entirely sure which particular action sorted it out. While I was connected, I took the opportunity to have a bit of a general tidy up. Curiously, the moonphasetag file extensions hadn't been changed by me since I was trying to get it going when I first set it up last July, and it's worked perfectly (other than the moonphase indicator) until 6 March. I'll probably have another go now, I think I'll have a bit of time on my hands!

I edited Dayfile.txt in notepad, so I'm not precisely aware of the line number, but in about the right place was one line with spaces in front of it roughly equal to the total line length of the average other lines. I deleted all the spaces, and that's where we are now. I should have made a note of the date, but I seem to recall it was late in February, rather the 6 March.

Thanks again, and stay healthy everyone,
Richard

freddie
Posts: 590
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2
Operating System: GNU/Linux (Ubuntu 18.04)
Location: Dorrington, Shropshire
Contact:

Re: Daily Temp & Daily Rain charts failure

Post by freddie » Tue 24 Mar 2020 8:51 am

RHards wrote:
Tue 24 Mar 2020 8:42 am
I edited Dayfile.txt in notepad, so I'm not precisely aware of the line number, but in about the right place was one line with spaces in front of it roughly equal to the total line length of the average other lines. I deleted all the spaces, and that's where we are now. I should have made a note of the date, but I seem to recall it was late in February, rather the 6 March.
As an aside, I would download a more feature-rich text editor such as Notepad++ for future editing of Cumulus data files. From your description, it seems as if MX was shut down in an uncontrolled way (i.e. power failure) at some point which resulted in this data file corruption.

Good to hear things are working a bit better now.

Stay safe.
Freddie
Image

sfws
Posts: 601
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Modified Fine Offset
Operating System: Win. 10 PC
Location: The Marches, UK

Re: Daily Temp & Daily Rain charts failure

Post by sfws » Tue 24 Mar 2020 10:42 am

RHards wrote:
Tue 24 Mar 2020 8:42 am
I edited Dayfile.txt in notepad,
Further to Freddie's comment, using standard Microsoft Notepad, or indeed many online editors, may have changed the very first line of your dayfile.txt inserting some invisible (in something like Notepad) characters known as Byte Order Mark (or BOM).
It is also possible that you have Notepad configured not to do this. Because your charts are not attempting to draw a point for that very first day, you cannot be sure if that first line is correct or not. If a BOM has been added then Cumulus (1 or MX) may read the first line as having a corrupted first field (the date), but only when it actually needs to read that line.

You can read up Byte order mark in Wikipedia, but below is how you would define it in PHP if you were to use that script language to check if a BOM was at the start of dayfile.txt

Code: Select all

$utf8bom = "\\xEF\\xBB\\xBF";
A great advantage of Notepad++ and similar editors is that they have a menu where you can choose the encoding. It probably won't cause you any problems, but if you do download an editor designed for code developers it is worth checking the encoding.

Finally, Steve Loft did say https://cumuluswiki.org/a/FAQ#Error_mes ... line....22 don't use Notepad although he did not explain why there. The explanation will be in his posts in some very old Cumulus 1 topics.

Post Reply