Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download

Problem update gauge

Discussion of Mark Crossley's HTML5/Javascript gauges

Moderator: mcrossley

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

Problem update gauge

Postby Guillaume_67370 » Sat Feb 08, 2014 6:04 pm

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: 1303
Joined: Sun Dec 13, 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Problem update gauge

Postby nitrx » Sat Feb 08, 2014 6:23 pm

If the data don't change in a timerange you will see no change on the gauges I think..

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

Re: Problem update gauge

Postby Guillaume_67370 » Sun Feb 09, 2014 12:56 am

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: 26493
Joined: Mon Jun 02, 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Problem update gauge

Postby steve » Sun Feb 09, 2014 11:31 am

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
-----
Hosting available for Cumulus web sites. See http://sandaysoft.com/forum/viewtopic.php?f=2&t=11876

Please read the posts in the Announcements section about the current status of Cumulus development since I have retired from my day job

User avatar
mcrossley
Posts: 5136
Joined: Thu Jan 07, 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Problem update gauge

Postby mcrossley » Sun Feb 09, 2014 1:18 pm

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: 21
Joined: Fri Jan 17, 2014 8:38 am
Weather Station: Vantage Pro 2
Operating System: Windows 7
Location: Offenheim

Re: Problem update gauge

Postby Guillaume_67370 » Tue Feb 11, 2014 12:21 pm

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: 1439
Joined: Sat Aug 13, 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 7 64bit HP SP1
Location: Somewhere in the USA
Contact:

Re: Problem update gauge

Postby water01 » Tue Feb 11, 2014 1:42 pm

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.

User avatar
mcrossley
Posts: 5136
Joined: Thu Jan 07, 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Problem update gauge

Postby mcrossley » Tue Feb 11, 2014 2:27 pm

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: 21
Joined: Fri Jan 17, 2014 8:38 am
Weather Station: Vantage Pro 2
Operating System: Windows 7
Location: Offenheim

Re: Problem update gauge

Postby Guillaume_67370 » Tue Feb 11, 2014 7:22 pm

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: 26493
Joined: Mon Jun 02, 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Problem update gauge

Postby steve » Tue Feb 11, 2014 8:10 pm

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
-----
Hosting available for Cumulus web sites. See http://sandaysoft.com/forum/viewtopic.php?f=2&t=11876

Please read the posts in the Announcements section about the current status of Cumulus development since I have retired from my day job

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

Re: Problem update gauge

Postby Guillaume_67370 » Tue Feb 11, 2014 9:30 pm

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: 26493
Joined: Mon Jun 02, 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Problem update gauge

Postby steve » Wed Feb 12, 2014 7:47 am

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
-----
Hosting available for Cumulus web sites. See http://sandaysoft.com/forum/viewtopic.php?f=2&t=11876

Please read the posts in the Announcements section about the current status of Cumulus development since I have retired from my day job

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

Re: Problem update gauge

Postby Guillaume_67370 » Wed Apr 04, 2018 4:03 pm

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


Return to “SteelSeries Gauges”

Who is online

Users browsing this forum: No registered users and 2 guests