Page 1 of 2

Graphs on the website will not be updated ... ?

Posted: Tue 12 May 2015 7:46 pm
by willyweather
Hi all,

don't know, whether this has been already reported and whether I did something wrong, but wanted to post it anyway:

CumulusMX build 3024 running on RasPi 2 with latest mono 4.01 and German locale

Intenet Explorer running Windows 8.1 PC and Windows 7 PC (tested on at least 2 PCs)

description of the issue seen:

When I open the CumulusMX Web Page say at 09:00 o'clock and go directly to the Trends page and look at the e.g. temperature chart everything looks normal.

Then I let the PC alone ...

When I look again at the temperature page say at e.g. 11:00 o'clock, the Chart Shows the same as at 09:00. This is ok, no update happened in the meantime.


After that I update the pages (both the main page and the trends / temperature page) but this does not change anything in the Chart !!!! -> this is the issue!
(However, it says "updated at 11:00)

The other Charts like e.g. pressure will be updated, however.

This frozen state can only be solved by closing the browser...

any ideas?

Wilfried

p.s.: I am missing the small picture of the moon, but I think this is already on the wish list (?)


if you want to try yourself: www.dillings.de/cumulusmxwebtest

Re: Graphs on the website will not be updated ... ?

Posted: Wed 13 May 2015 7:04 am
by steve
It updates correctly for me in Chrome, but not in IE11, so it looks like a caching issue with IE. I think this has been seen before, and there is a setting in IE to stop it happening.

Re: Graphs on the website will not be updated ... ?

Posted: Wed 13 May 2015 8:05 am
by steve
There's a solution towards the end of this thread - https://cumulus.hosiene.co.uk/viewtopic.php?f=27&t=13085

But it looks like a better solution would be to disable caching on the Ajax calls in cumuluscharts.js, by adding "cache: false" to them, e.g.:

Code: Select all

$.ajax({
        url: 'tempdata.json',
        dataType: 'json',
        cache: false,
        success: function (resp) {
            chart.hideLoading();
            chart.series[0].setData(resp.temp);
            chart.series[1].setData(resp.dew);
            chart.series[2].setData(resp.apptemp);
            chart.series[3].setData(resp.wchill);
            chart.series[4].setData(resp.intemp);
        }
    });

Re: Graphs on the website will not be updated ... ?

Posted: Wed 13 May 2015 7:52 pm
by willyweather
Hi Steve,

I took the solution of disabling the caching of the Ajax calls in cumuluscharts.js and this worked perfectly. :)
(Tested in IE11 and Firefox up to now, Safari on iPad and iPhone to follow)

If this is working as expected, I will remove my old Cumulus 1.9.4 website and use the new CumulusMX as my active website ..

Thanks a lot for your help ! :)

Wilfried

-> topic closed :D

p.s.: Will you include this change in one of the following beta releases or do I have to take care of that myself?

Re: Graphs on the website will not be updated ... ?

Posted: Thu 14 May 2015 6:26 am
by steve
willyweather wrote:p.s.: Will you include this change in one of the following beta releases or do I have to take care of that myself?
I've changed the file to include this setting.

Re: Graphs on the website will not be updated ... ?

Posted: Thu 14 May 2015 2:34 pm
by willyweather
Thanks a lot ! :)

I don't know whether my today's experience is connected to that change or is something else:

when I open "Trends", then it may take a significant amount of time (5..10secs?), until the graph for e.g. temperature is loaded and displayed.
....OK, it's only a bit slow ... :o

But if I select the different graphs one after the other then it may happen randomly (i.e. for humidity or wind direction, or ...), that the loading of the graph lasts forever, that is, it stays in the state "loading..."

This state is persistant for a while ( 1/2h, 1h ? ) and closing the browser/ emptying the browser's memory doesnt'help.

Seen on Firefox, IE11 (Windows 8.1), iPad and the raspberry browser. web page "WWW.dillings.de"

Any ideas?

Re: Graphs on the website will not be updated ... ?

Posted: Thu 14 May 2015 2:38 pm
by water01
Works fine for me, do you have a slow Internet connection?

Edit : correction all work except Humidity. On running the F12 developer tools it looks like your humdata.json file is incorrect as the tool shows it only loading 278bytes, whereas mine is 54,741bytes. I think therefore there is a problem with the upload, especially as realtimegauges.txt is not loading either as your SteelSeries gauges are not working.

Re: Graphs on the website will not be updated ... ?

Posted: Thu 14 May 2015 2:44 pm
by steve
I think it's a timing issue, the data is coming from the cache and perhaps is loaded too quickly - before the chart is ready for it. You have only changed the cache setting on the temperature graph, you need to set it for all of them, and that may make the problem go away.

Re: Graphs on the website will not be updated ... ?

Posted: Thu 14 May 2015 2:51 pm
by water01
Looks like Steve is right as it just happened to me on a different screen and the file is short on Wind Direction. It couldn't be that the FTP upload is timing out leaving random short files on the server, could it?

The realtimegauges.txt is still wrong though.

Re: Graphs on the website will not be updated ... ?

Posted: Thu 14 May 2015 3:04 pm
by steve
I think you may be right about it being an upload issue - http://www.dillings.de/humdata.json is currently returning an empty file, even after forcing a refresh.

Re: Graphs on the website will not be updated ... ?

Posted: Thu 14 May 2015 3:11 pm
by willyweather
thanks for the quick Responses!

Your findings are consistend to mine I got the last minutes - I just noticed with ftp, that at the moment the file "wdirdata.json" is 0 Bytes on the web Server allthough the origin on my raspberry is more than 11kB ...

sorry for my misunderstanding, yes I put the "Cache off- patch" only on one place in the file, will correct that asap (maybe not today any more since I'm running out of time..).

Yes, I know, that my gauges are currently not working (have never been). I didn't want to bother anyone yet, since I 'm just in the learning phase about the steel series library.
I have read already, that I have to put the file /web/realtimegaugesT.txt -> realtimegauges.txt in the extra web files section (which I did to my best knowledge), but this hasn't worked up to now. This would be my next step after solving the "trend issue"

Wilfried

p.s.: Well, I do have a DSL uplink speed of 1,2MBit/sec (DL 16MBit/sec), but you may be right also with this assumption - I noticed, that today the Internet is significantly slower than normal.... maybe because of the storm we had today in Germany. However, my last mile connection seems to be ok.

Re: Graphs on the website will not be updated ... ?

Posted: Thu 14 May 2015 3:13 pm
by steve
willyweather wrote:Your findings are consistend to mine I got the last minutes - I just noticed with ftp, that at the moment the file "wdirdata.json" is 0 Bytes on the web Server allthough the origin on my raspberry is more than 11kB .
You'll need to turn on ftp logging and look for error messages in the ftplog.txt file.

Re: Graphs on the website will not be updated ... ?

Posted: Thu 14 May 2015 3:17 pm
by water01
I have read already, that I have to put the file /web/realtimegaugesT.txt -> realtimegauges.txt in the extra web files section (which I did to my best knowledge), but this hasn't worked up to now. This would be my next step after soving the "trend issue"
That usually is C:/Cumulus/web/realtimegauges.T.txt -> /htdocs/reatimegauges.txt or /public_html/realtimegauges.txt.

But you are right if the upload is timing out prior to the standard files uploading it is no good adding to that load until you have sorted that out, unless the incorrect path etc. is the cause of the problem.

Re: Graphs on the website will not be updated ... ?

Posted: Thu 14 May 2015 3:21 pm
by water01
Stupid me just realised this is a RPi so my paths are incorrect they are for a Windows machine.

Re: Graphs on the website will not be updated ... ?

Posted: Thu 14 May 2015 3:34 pm
by willyweather
OK, thanks - your hints help a lot - will come back to that when I am digging into that more.

1. step done:

I have updated the file "cumuluscharts.js" to my best knowledge (not to sure about the first occurence of "$.Ajax", though) - let's see ;-)

Wilfried

p.s.: Windows-paths ... no Problem - I had seen that and will be hopefully able to translate that ;-)