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 4018) - 28 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

Counter does not work

Discussion of Ken True's web site templates

Moderator: saratogaWX

Post Reply
Windsurfer
Posts: 21
Joined: Fri 22 Apr 2016 7:43 pm
Weather Station: WS1080 compatibel
Operating System: Windows 7
Location: Germany

Counter does not work

Post by Windsurfer »

Hi all,
Sorry, my english is very bad and I use the google-translator.
I hope you understand me.

A short question.
I use Cumulus 1.9.4 along with a WH1080 clone.
On the server I use the Saratoga template.

What must I do so that the Web page is automatically updated so as Weather Display?
I always have to perform a manual refresh (F5) to refresh the page. So there is no counter.

Here is the link to my site. (Link deletet, Weatherunderground Limit exceeded)

Best Regards

Volker
You do not have the required permissions to view the files attached to this post.
Last edited by Windsurfer on Sun 17 Jul 2016 9:01 am, edited 1 time in total.
User avatar
PaulMy
Posts: 3777
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: Counter does not work

Post by PaulMy »

Hi,
I also have the Saratoga www.komokaweather.ca with Cumulus and presumably you want yours to update similar to that.

Your home page is slightly different to the usual default Saratoga. Likely Ken will be along and he will likely have some suggestion.

Enjoy,
Paul
Davis Vantage Pro2+
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm

Image
User avatar
saratogaWX
Posts: 1170
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Counter does not work

Post by saratogaWX »

Windsurfer wrote:Hi all,
Sorry, my english is very bad and I use the google-translator.
I hope you understand me.

A short question.
I use Cumulus 1.9.4 along with a WH1080 clone.
On the server I use the Saratoga template.

What must I do so that the Web page is automatically updated so as Weather Display?
I always have to perform a manual refresh (F5) to refresh the page. So there is no counter.

Here is the link to my site. http://wetter.due-m.de

Best Regards

Volker
Hi Volker, and welcome!

In your Settings-weather.php you have

Code: Select all

//$SITE['ajaxScript']     = 'ajaxCUwx.js';   // for AJAX enabled display
$SITE['ajaxScript']     = 'ajaxCUwx3.js';   // for AJAX enabled display
but the ajaxCUwx3.js script is not on your website. Change the two lines to

Code: Select all

$SITE['ajaxScript']     = 'ajaxCUwx.js';   // for AJAX enabled display
//$SITE['ajaxScript']     = 'ajaxCUwx3.js';   // for AJAX enabled display
and the AJAX updates will work again on your site (assuming that realtime.txt is uploaded by Cumulus).

Use http://wetter.due-m.de/wxstatus.php to make sure that the needed files are uploaded and current.

To refresh a page at 5 minute intervals (same interval as the recommended upload for the main files), you just need to insert

Code: Select all

<meta http-equiv="Refresh" content="300" />
anywhere in the <head>...</head> part of a page. For all pages to behave that way, put it in top.php.

I hope this helps...

Best regards,
Ken
Windsurfer
Posts: 21
Joined: Fri 22 Apr 2016 7:43 pm
Weather Station: WS1080 compatibel
Operating System: Windows 7
Location: Germany

Re: Counter does not work

Post by Windsurfer »

Hi Paul,
Thanks for your answer.

What do you mean by not standard?
I use the Saratoga Base World Packet and some additional scripts from Saratoga.
The core (ajaxdashboard, the CSS files and JavaScripts) are original.
Tomorrow I will again replace the index.php wxindex.php by the originals, otherwise I can not explain where the error may be due to me.
Your page is very nice and it works properly.
Do you use Cumulus 1 or Cumulus MX?

Best regards
Volker
Windsurfer
Posts: 21
Joined: Fri 22 Apr 2016 7:43 pm
Weather Station: WS1080 compatibel
Operating System: Windows 7
Location: Germany

Re: Counter does not work

Post by Windsurfer »

Hi Ken,
Thank you!

Tomorrow morning I will change immediately.
Now it is too late, because the computer is not here at my home.

Best regards
Volker
User avatar
PaulMy
Posts: 3777
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: Counter does not work

Post by PaulMy »

Hi Volker,
I see Ken was quick on his analysis and suggestion :clap:

By saying slightly different I can now see that I was confused by the additional image you have, and re-looking at it it is pretty standard, sorry. Many of us make some changes some slight and others more, and there is nothing wrong with that and adds to the enjoyment.

I still primarily use Cumulus 1 but do install/try MX whenever there is a new version to make sure I have it working properly.

Paul
Davis Vantage Pro2+
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm

Image
Windsurfer
Posts: 21
Joined: Fri 22 Apr 2016 7:43 pm
Weather Station: WS1080 compatibel
Operating System: Windows 7
Location: Germany

Re: Counter does not work

Post by Windsurfer »

So, it bothered me.
I quickly installed an FTP client on my laptop and made the changes.
It works fine.
Thanks again to both Ken and Paul.
The fine-tuning with the update times do I do tomorrow.

best regards
Volker
Windsurfer
Posts: 21
Joined: Fri 22 Apr 2016 7:43 pm
Weather Station: WS1080 compatibel
Operating System: Windows 7
Location: Germany

Re: Counter does not work

Post by Windsurfer »

saratogaWX wrote: Use http://wetter.due-m.de/wxstatus.php to make sure that the needed files are uploaded and current.
I'm confused.

The server has a difference of 2 hours.
What can I do?
You do not have the required permissions to view the files attached to this post.
User avatar
saratogaWX
Posts: 1170
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Counter does not work

Post by saratogaWX »

It is not the webserver's time that is incorrect. Your Cumulus system seems to be off by two hours.

Looking in CUtags.php?sce=dump shows

Code: Select all

$WX['time'] = '16:43 on 17 Juli 2016';
$WX['timehhmmss'] = '16:43:41';
$WX['timeUTC'] = '14:43 on 17 Juli 2016';
when the server's time shows

Code: Select all

Date: Sun, 17 Jul 2016 16:44:39 GMT
The UTC time should agree with the Date: time (both are in UTC) and the Cumulus system is off by two hours.
Check the timezone setting on the Cumulus system and correct -- then the times should match.
Windsurfer
Posts: 21
Joined: Fri 22 Apr 2016 7:43 pm
Weather Station: WS1080 compatibel
Operating System: Windows 7
Location: Germany

Re: Counter does not work

Post by Windsurfer »

Hi Ken,
thanks for the answer.
I'm still confused.
In settings.php I set the valid Time Zone for Germany.

$ SITE ['tz'] = 'Europe/Berlin';

Berlin = UTC (Dublin) + 1
Berlin CEST = UTC +2
This is the time of my computer so also of cumulus.

Where must I make the adjustment?

best regards
User avatar
saratogaWX
Posts: 1170
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Counter does not work

Post by saratogaWX »

Your webserver appears to be set correctly.

Your system that runs Cumulus/CumulusMX appears to have the time issue. Make sure it's clock is set with the correct timezone and it is syncronized with NTP to keep it's time updated.
Windsurfer
Posts: 21
Joined: Fri 22 Apr 2016 7:43 pm
Weather Station: WS1080 compatibel
Operating System: Windows 7
Location: Germany

Re: Counter does not work

Post by Windsurfer »

Hi Ken,
sorry, even if I go on the nerves you, I have more questions.

The facts:
CUtags.php?sce=dump say:
$WX['time'] = '10:16 on 18 Juli 2016';
$WX['timehhmmss'] = '10:16:08';
$WX['timeUTC'] = '08:16 on 18 Juli 2016';
'timeUTC' = 08:16 is correct, is Greenwich time GMT or UTC
'time' = 10:16 is correct, is Greemwich time + 2 hours (CEST) for the timezone Berlin.

My computer synchronized correctly on CEST --> UTC+2
There is no mistake on the home computer and in cumulus I have found no way of time correction.

I ask myself why it is checked at CU-realtime and CU-FTP 'time' and CU-data 'timeUTC'.

My current solution:
Currently I have solved the problem by modification in the script include-wxstatus.php.
I increases fault tolerance to 120 minutes.
strtotime($chkdate),60*5+30,'application'); --> strtotime($chkdate),60*125+30,'application');
But this can not be a permanent solution, because 120 applies to CEST, in winter (CET) applies 60.

Best regards
Volker
User avatar
saratogaWX
Posts: 1170
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Counter does not work

Post by saratogaWX »

I should have looked more closely at the Webserver's response.. that is where the problem exists, not with the system running Cumulus.

Per the HTTP standard, each webserver is supposed to have a Date: header in the response which is the current GMT/UTC time on the webserver.

Mine responds as expected with
07/18/16 08:02:49 Browsing http://saratoga-weather.org/CUtags.php?sce=dump
Fetching http://saratoga-weather.org/CUtags.php?sce=dump ...
GET /CUtags.php?sce=dump HTTP/1.1
Host: saratoga-weather.org
Connection: close
User-Agent: Sam Spade 1.14


HTTP/1.1 200 OK
Date: Mon, 18 Jul 2016 15:02:48 GMT
Server: Apache
X-Powered-By: PHP/5.6.23
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8

$WX['time'] = '08:00 on 18 July 2016'; // The current time and date. Example result: 18:30 on 30 December 2009.
$WX['timeUTC'] = '15:00 on 18 July 2016'; // The current UTC date/time rather than local date/time
You webserver responds with an incorrect GMT/UTC time


07/18/16 08:02:57 Browsing http://wetter.due-m.de/CUtags.php?sce=dump
Fetching http://wetter.due-m.de/CUtags.php?sce=dump ...
GET /CUtags.php?sce=dump HTTP/1.1
Host: wetter.due-m.de
Connection: close
User-Agent: Sam Spade 1.14


HTTP/1.1 200 OK
Date: Mon, 18 Jul 2016 17:02:51 GMT
Server: Apache
X-Powered-By: PleskLin
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html


$WX['time'] = '17:02 on 18 Juli 2016';
$WX['timeUTC'] = '15:02 on 18 Juli 2016';
So your webserver's UTC time is incorrect-- the server is using CEST instead of UTC for it's internal time.
The Date: header on an HTTP response should be UTC/GMT time and is CEST time instead.

That is something only the hoster can correct if you are hosted on a shared webserver.

After the hoster fixes the time issue, I'd recommend reverting the status check to

strtotime($chkdate),60*5+30,'application');

so an upload later than 5m30s would be highlighted.

Sorry for the initial confusion!

Best regards,
Ken
Windsurfer
Posts: 21
Joined: Fri 22 Apr 2016 7:43 pm
Weather Station: WS1080 compatibel
Operating System: Windows 7
Location: Germany

Re: Counter does not work

Post by Windsurfer »

Thanks Ken,
I'll check with the hosting provider Strato.

Yes, they are only a temporary stopgap 120 minutes.

best regards
Volker
Windsurfer
Posts: 21
Joined: Fri 22 Apr 2016 7:43 pm
Weather Station: WS1080 compatibel
Operating System: Windows 7
Location: Germany

Re: Counter does not work

Post by Windsurfer »

Ok, server-time is now correct, made changes in cumulus undo, no more problems.
Thanks for your help.

best regards
Volker
Post Reply