Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4017) - 17 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Problem update gauge

Discussion of Mark Crossley's HTML5/Javascript gauges

Moderator: mcrossley

Post Reply
Guillaume_67370
Posts: 28
Joined: Fri 17 Jan 2014 8:38 am
Weather Station: Vantage Pro 2
Operating System: Windows 7
Location: Offenheim

Problem update gauge

Post by Guillaume_67370 »

Hello everybody,

I have a little problem with the update datas of the steelseries Gauges, i set 3 seconds on real time in Cumulus and of the server but datas will be update every 8 seconds, 20 seconds, 30 seconds on my web site, it depends...

http://www.meteo-offenheim.fr/instruments.php

Do you have any explication?

Thanks
Guillaume
Image
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Problem update gauge

Post by nitrx »

If the data don't change in a timerange you will see no change on the gauges I think..
Guillaume_67370
Posts: 28
Joined: Fri 17 Jan 2014 8:38 am
Weather Station: Vantage Pro 2
Operating System: Windows 7
Location: Offenheim

Re: Problem update gauge

Post by Guillaume_67370 »

Wind speed or direction change all the time.
If i have a look on Cumulus datas changed so why it doesn't change every 3 seconds on my web site as configurate??
Guillaume
Image
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Problem update gauge

Post by steve »

Perhaps the realtimegauges.txt file isn't able to be uploaded that frequently. Turn on ftp logging and look at the realtimeftplog.txt to see how often it's being uploaded.
Steve
User avatar
mcrossley
Posts: 12685
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Problem update gauge

Post by mcrossley »

It looks like it is working now?

Every so often you get a 'corrupt' realtimegauges.txt file, the only thing wrong with it is that the closing "}" at the end of the file is missing for some reason - possibly because the file is being written to at the time of read. I have put a workaround in for that on my site by creating the JSON data using PHP and waiting for the realtimeGuages.txt file to be flagged as updated on the web server file system (long polling).

I see you have based your gauges on the 'test' script I have on my site, that version has not yet been released and does contain a couple of bugs that I know about but have yet to fix.
Guillaume_67370
Posts: 28
Joined: Fri 17 Jan 2014 8:38 am
Weather Station: Vantage Pro 2
Operating System: Windows 7
Location: Offenheim

Re: Problem update gauge

Post by Guillaume_67370 »

mcrossley wrote:It looks like it is working now?

Every so often you get a 'corrupt' realtimegauges.txt file, the only thing wrong with it is that the closing "}" at the end of the file is missing for some reason - possibly because the file is being written to at the time of read. I have put a workaround in for that on my site by creating the JSON data using PHP and waiting for the realtimeGuages.txt file to be flagged as updated on the web server file system (long polling).

I see you have based your gauges on the 'test' script I have on my site, that version has not yet been released and does contain a couple of bugs that I know about but have yet to fix.
Hi Steve, Mark,

Thanks for your answer.

I downland the last version of Cumulus 1.9.4 build 1088. It doesn't change anything...
Have a look on website from my friend it function correctly.http://www.meteo-kogenheim.fr/page_instruments.php
Why not by me?? :(

Regards
Guillaume
Image
water01
Posts: 3215
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Problem update gauge

Post by water01 »

I would say the difference is your host provider's FTP is not capable of uploading a quite large file like realtimegauges.txt every 3 seconds. Even your friends if you look at it does not change every 3 seconds, the readings stay static sometimes for as many as 3 or 4 timings i.e. 9-12 seconds.

I would have thought a more realistic timing would be 10 seconds, as I am sure that Mark didn't design the gauges to be almost "realtime" gauges otherwise he wouldn't have set the default countdown to 60 seconds.
David
Image
User avatar
mcrossley
Posts: 12685
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Problem update gauge

Post by mcrossley »

It looks like the 'version' of the realtimegauges.txt file that your web server returns is only updated every 30 seconds at the moment.

The 'Last Modified' date on the file only changes every 30 seconds according to Apache.

I think there are two likely explanations..

1. Cumulus is only uploading the file every 30 seconds - you can check this from the Cumulus logs.

2. The web server is caching the file locally and not reading it from the file system at every request.

(3 - less likely) The file modified date/time isn't being updated with each FTP transfer. Can you check on the web server if the file modified time changes each time Cumulus uploads a new version?



I see you also have a whole page refresh thrown in for good measure every 300 seconds!
<meta http-equiv="Refresh" content="300">
Guillaume_67370
Posts: 28
Joined: Fri 17 Jan 2014 8:38 am
Weather Station: Vantage Pro 2
Operating System: Windows 7
Location: Offenheim

Re: Problem update gauge

Post by Guillaume_67370 »

mcrossley wrote:It looks like the 'version' of the realtimegauges.txt file that your web server returns is only updated every 30 seconds at the moment.

The 'Last Modified' date on the file only changes every 30 seconds according to Apache.

I think there are two likely explanations..

1. Cumulus is only uploading the file every 30 seconds - you can check this from the Cumulus logs.

2. The web server is caching the file locally and not reading it from the file system at every request.

(3 - less likely) The file modified date/time isn't being updated with each FTP transfer. Can you check on the web server if the file modified time changes each time Cumulus uploads a new version?



I see you also have a whole page refresh thrown in for good measure every 300 seconds!
<meta http-equiv="Refresh" content="300">
Mark,

I give you answer of your 3 different explanations :

1. That is impossible because often i receive datas every 8, 10, 15 seconds. When you speack about Cumulus logs you speak about this file attached?

2. I don't understand what you mean

3. I have a loock on the web server, it appears a file realtimegauges.txt and every 5-10 secons when i refresch appears a file realtimegauges.txttmp

Yes I have a whole page refresh of 300 seconds but that is normally not a problem. My colleage hasn't any whole page refresh.

Regards
You do not have the required permissions to view the files attached to this post.
Guillaume
Image
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Problem update gauge

Post by steve »

Guillaume_67370 wrote:When you speack about Cumulus logs you speak about this file attached?
The realtime ftp log that I suggested you look at, two days ago, would be a good place to start.
Steve
Guillaume_67370
Posts: 28
Joined: Fri 17 Jan 2014 8:38 am
Weather Station: Vantage Pro 2
Operating System: Windows 7
Location: Offenheim

Re: Problem update gauge

Post by Guillaume_67370 »

Find attached ftp log. You must go at the end of the file.
You do not have the required permissions to view the files attached to this post.
Guillaume
Image
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Problem update gauge

Post by steve »

It's taking about 6 or 7 seconds to get the realtime files to your server, then there is a short gap until the next realtime upload slot comes around, so your uploads are typically around 8 or 9 seconds apart. You're already using the rename option, and that should minimise the problem where the file is incomplete on the server. From the log, it's clear that the rename takes a fraction of a second

So the limit is on the speed that the files can be uploaded to your server. You could reduce the realtime upload interval to 1 second, and then the next slot will come around more quickly, but that will only get you down to 6 or 7 seconds. Or, more realistically, increase it to 10 seconds, say, as was suggested earlier.

I don't know why the gauges code is apparently getting incomplete files as Mark saw; the rename takes a fraction of a second, so you wouldn't expect the file to be unavailable for very long at all.

I've just had a look at the realtime.txt file on your site, and constantly refreshing the file in my browser. I can see the same thing that Mark noted; that it's only updating every 30 seconds or so. Assuming that it's still being uploaded every 8 or 9 seconds, then as Mark said, there must be some kind of caching issue with your server such that it's only sending the latest version of the file every 30 seconds or so, even though a newer version has been uploaded.
Steve
Guillaume_67370
Posts: 28
Joined: Fri 17 Jan 2014 8:38 am
Weather Station: Vantage Pro 2
Operating System: Windows 7
Location: Offenheim

Re: Problem update gauge

Post by Guillaume_67370 »

Hello,

I come back to this subject because i'm confronted again on this issue with an updating of about every 22 seconds.
Do you think it will be a problem with caching issue with my server again ??

thanks for your help
Regards
Guillaume
Image
Post Reply