Page 2 of 3

Re: Not updating every 60s

Posted: Mon 22 Mar 2021 10:06 pm
by ConligWX
Also Richard

Your noaa reports years. from 2012-2015 dont seem to exist. I cannot load year or months from those dates

Re: Not updating every 60s

Posted: Mon 22 Mar 2021 10:43 pm
by PaulMy
try updating your setpagedata.js file!!!! your using an old file!
Hi Simon,
If it is still showing an old file then presume it is a cache issue.
I had updated this morning after I saw Mark's post:
* setpagedata.js v:0.1.0 d:Mar 2021 a:Neil Thomas
* Last modified: 2021/03/22 14:06:42
Should I be making a settings change as well?

Enjoy,
Paul

Re: Not updating every 60s

Posted: Mon 22 Mar 2021 10:53 pm
by ConligWX
PaulMy wrote: Mon 22 Mar 2021 10:43 pm
try updating your setpagedata.js file!!!! your using an old file!
Hi Simon,
If it is still showing an old file then presume it is a cache issue.
I had updated this morning after I saw Mark's post:
* setpagedata.js v:0.1.0 d:Mar 2021 a:Neil Thomas
* Last modified: 2021/03/22 14:06:42
Should I be making a settings change as well?

Enjoy,
Paul
http://www.komokaweather.com/cumulusmxt ... edata.json is dated "update":"21/03/21 6:30:00 AM", and not updating. is cumulusMX running against this website - http://www.komokaweather.com/cumulusmxtest/ ?

Re: Not updating every 60s

Posted: Mon 22 Mar 2021 10:55 pm
by ConligWX
http://www.komokaweather.com/cumulusmxt ... agedata.js still old file. are you updating the webserver /js/setpagedata.js or the CumulusMX install?

Re: Not updating every 60s

Posted: Mon 22 Mar 2021 10:57 pm
by beteljuice
To see if the data from the JSON is being read every 60s, just <F12> console.
You should get an initial "Data success" message, then it should be repeated every 60s. ;)

Re: Not updating every 60s

Posted: Mon 22 Mar 2021 11:52 pm
by richard_newberry

Re: Not updating every 60s

Posted: Mon 22 Mar 2021 11:52 pm
by richard_newberry
I might use <meta http-equiv="refresh" content="60"> on index.htm its annoying me now.

Re: Not updating every 60s

Posted: Tue 23 Mar 2021 12:08 am
by PaulMy
Hi Simon,
That is my test site for v3.10.3 and I haven't used that since Mark released b3120. Active sites are:
komokaweather.com/cumulusmx
komokaweather.com/cumulusmxwll

@beteljuice An F12 Console shows Data success setpagedata.js:144 on one and setpagedata.js:147 on the other.
Watching them, nothing has changed for about 20 minutes.
A page reload makes them more current, sometimes.

Enjoy,
Paul

Re: Not updating every 60s

Posted: Tue 23 Mar 2021 2:10 am
by beteljuice
@Mark ...

I don't understand 'promises', but you still have references to getPageData() in the setTimeout(s)

I can't get the promise to re-fire - It says it isn't a function. (should it be a new promise ?)

If I remove the 'promise' and make it the function getPageData(), fired in $(document).ready(function() {
Then everything works as expected ...

Question ...
Isn't it false economy to do a page name check ? - what if they make them .php ??

Re: Not updating every 60s

Posted: Tue 23 Mar 2021 8:11 am
by ConligWX
PaulMy wrote: Tue 23 Mar 2021 12:08 am Hi Simon,
That is my test site for v3.10.3 and I haven't used that since Mark released b3120. Active sites are:
komokaweather.com/cumulusmx
komokaweather.com/cumulusmxwll

@beteljuice An F12 Console shows Data success setpagedata.js:144 on one and setpagedata.js:147 on the other.
Watching them, nothing has changed for about 20 minutes.
A page reload makes them more current, sometimes.

Enjoy,
Paul
sounds more like a Apache/PHP cache issue.

however whats your interval set at? your websitedata.json hasnt updated in at least 5 minutes on both folders. 08:15 here yet your json file says "update":"23/03/21 4:05:00 AM", so ten minutes have past and no update.

Re: Not updating every 60s

Posted: Tue 23 Mar 2021 9:34 am
by mcrossley
beteljuice wrote: Tue 23 Mar 2021 2:10 am @Mark ...
I don't understand 'promises', but you still have references to getPageData() in the setTimeout(s)
That is the old script. The script I posted above (also - https://weather.wilmslowastro.com/test/ ... agedata.js), has been fixed. It extracts getPageData() to a separate function again with parameters that is included in the promise.

beteljuice wrote: Tue 23 Mar 2021 2:10 am Question ...
Isn't it false economy to do a page name check ? - what if they make them .php ??
I could argue that then it is no longer the default web site and buyer beware - fiddle and you fix!


Richards page is not updating because it does not have a page name. The href for the index page is just "http://desford-weather.co.uk/" so the test for index.htm fails :(
If you go to Today it does update, and back to Now, then the page href gets populated.

To get around that then the test at line 196 needs to change from...

Code: Select all

		if (pageName == 'index.htm' || pageName == 'today.htm') {
to

Code: Select all

		if (pageName == 'index.htm' || pageName == 'today.htm' || pageName == '') {
On the assumption that only the index.xxx page is ever loaded as the default page.

Re: Not updating every 60s

Posted: Tue 23 Mar 2021 9:53 am
by beteljuice
That is the old script. The script I posted above ...
Doh ...
I saved that in a different place to the one I investigated :oops:

the beteljuice is overtired ;)

Re: Not updating every 60s

Posted: Tue 23 Mar 2021 1:41 pm
by PaulMy
Hi Simon,
what's your interval set at? your websitedata.json hasn't updated in at least 5 minutes on both folders. 08:15 here yet your json file says "update":"23/03/21 4:05:00 AM", so ten minutes have past and no update.
My interval is 5 minutes, and I often check my remote files and that part works great. Then when I go to my page it may display with the most recent update time, but not always, but then won't update until I close it, clear browser cache, and then maybe get a current page again.
I must say the Brian's MXUI template usually shows current updated data.
sounds more like a Apache/PHP cache issue.
I really know nothing about Apache and very little about PHP. I contacted my host GoDaddy last week to see how I could turn of PHP caching but didn't get a good answer, just a link How to clear the LiteSpeed cache manully and with a plugin. Haven't figured that out yet...

Enjoy,
Paul

Re: Not updating every 60s

Posted: Tue 23 Mar 2021 1:44 pm
by mcrossley
Paul, your pages are suffering from the same issue as Richard - because the initial link does not have the page filename.

This version will fix that - and be HTML/PHP agnostic (@beteljuice)

Re: Not updating every 60s

Posted: Tue 23 Mar 2021 2:31 pm
by freddie
mcrossley wrote: Tue 23 Mar 2021 1:44 pmThis version will fix that
Confirmed - see https://www.hosiene.co.uk/weather-mx-test/