Page 1 of 2

NOAA reports

Posted: Sun 16 Jan 2022 11:02 am
by GeoffinTavy
I am having difficulty getting the monthly NOAA reports to display in MX 3.14.1 build 3160. I can generate the reports without problems, upload them to my website after the midnight rollover, but the "Reports" page keeps telling me it can't find the requested report. To confuse me further, the page defaults to the NOAA annual report, and displays that OK when you select the Reports page - just one month at the moment. But when I try to use the drop-down menu to select the monthly report for January 2022 it tells me it can't be found. Also tells me it can't find the Annual report for 2022 either although it is clearly displaying it. I don't have much knowledge of java but noaarpts.js seems to set the report path then display the current annual report while it loads the other reports for the drop down menu. I am probably misunderstanding but it seems to be working up to that point. Where is the NOAA report page looking for its data? Is this where it is failing? Help gratefully received!

Re: NOAA reports

Posted: Sun 16 Jan 2022 12:27 pm
by philpugh
Hi,
You need to edit noaarpts.js to set the report path to point to your folder to where the reports are being copied.

In my case (for example) all the NOAA reports are stored in a folder NOAA which is directly below the main web page folder and the set path line in noaarpts,js is :
let rptPath = 'NOAA/'; // Your path should have a trailing "/", eg. 'Reports/'
Also check that the individual reports have the correct file name format := eg NOAAMOmmyy.txt for monthly reports and NOAAYRyyyy.txt for yearly reports. You should have :

NOAAMO0122.txt and NOAAYR2022.txt so far!

If you have been editing things already I would try flushing your browser cache to ensure the correct version is being used.

Re: NOAA reports

Posted: Sun 16 Jan 2022 1:28 pm
by GeoffinTavy
Thanks Phil.

I've copied the relevant bit of noaarpts.js from a server download:

let rptPath = 'htdocs/Reports/'; // Your path should have a trailing "/", eg. 'Reports/'
let startYear, endYear;
let startMonth, endMonth;

etc etc

so I see this as setting the path to 'Reports' as a subfolder of 'htdocs' which is what my service provider uses as the starting folder for 'index.htm'. I am sending the reports from MX to this folder, I can see the uploads in the directory 'Reports' as NOAAMO0122.txt and NOAAYR2022.txt

Does that clarify what I've done?

Re: NOAA reports

Posted: Sun 16 Jan 2022 1:35 pm
by freddie
You don't need the htdocs bit. htdocs is the "document root' of your webserver, so your entry should be Reports/ which is where your NOAA files are relative to the webserver document root'.

Re: NOAA reports

Posted: Sun 16 Jan 2022 1:52 pm
by GeoffinTavy
Thanks Freddie I'll take that out, I do need it in the upload path though otherwise I get the NOAA reports dumped in a directory above the htdocs root. One thing I've just discovered is that there was a copy of the annual report in the htdocs root, if I delete that then the NOAA page on the website doesn't find anything to load despite it looking to me as if the Reports folder is where the noaarpts.js is pointing.

Re: NOAA reports

Posted: Sun 16 Jan 2022 3:30 pm
by freddie
Yes, definitely needed in the upload path. Talking of which, what is your upload path?

Re: NOAA reports

Posted: Sun 16 Jan 2022 4:33 pm
by GeoffinTavy
htdocs/Reports. The two generated NOAA reports appear in the directory Reports which is in htdocs and that's what I would have expected. Can't seem to point the MX website page to it though.

Re: NOAA reports

Posted: Sun 16 Jan 2022 4:49 pm
by freddie
Did you try :'Reports/' in noaarpts.js?

Re: NOAA reports

Posted: Sun 16 Jan 2022 5:16 pm
by GeoffinTavy
Yes I did, in fact that's where I started. Then tried adding htdocs which as you said I didn't need. I feel sure this is something quite simple I've done or not done!

Re: NOAA reports

Posted: Mon 17 Jan 2022 9:29 am
by mcrossley
It all works for me, so it looks like you fixed it.
Did you force a reload of the page - Ctrl-F5 - each time you edited the js file?

Re: NOAA reports

Posted: Mon 17 Jan 2022 10:05 am
by GeoffinTavy
No I didn't Mark. I see this morning the files were uploaded to Reports at a few seconds after midnight, but my website page just doesn't see them so I can't see beyond a pathing issue somewhere. When I find time later today I may reload my CMX 3160 and modify menu.js to work with my website as usual, see if anything changes.
When you say it works fine for you do you mean that looking at my website you can see the NOAA reports? Or is it your website that works fine?

Re: NOAA reports

Posted: Mon 17 Jan 2022 10:09 am
by mcrossley
Opps sorry ignore that - I had click the link to Phil's web site above.

What is the link to your site?

Re: NOAA reports

Posted: Mon 17 Jan 2022 10:17 am
by GeoffinTavy
tavyweather.info, I set it up in 2016 to keep my kids in the Midlands up to date with how our garden is progressing as well as what the weather is like. The CMX webpages are in 'Weather detail'.

Re: NOAA reports

Posted: Mon 17 Jan 2022 10:31 am
by philpugh
Geoff,

The reports page is looking as if it is working correctly from here!

It is pointing to a caching issue with your browser - try connecting with a different browser or completely erase your history (the first is less of a hassle!)

Re: NOAA reports

Posted: Mon 17 Jan 2022 10:34 am
by philpugh
Geoff

Your garden look amazing - a lot of time invested there I think!