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 4019) - 03 April 2024

Legacy Cumulus 1 release 1.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

Wrong data on my website

Discussion of Ken True's web site templates

Moderator: saratogaWX

perl
Posts: 52
Joined: Wed 24 Jun 2015 7:02 pm
Weather Station: Davis Vantage Pro2
Operating System: Buster Lite rPi
Location: Taasinge, Denmark
Contact:

Wrong data on my website

Post by perl »

Hi,

I have searched for an error in data on my website. It is about min and max temperature yesterday:
ScreenShot219.jpg
I can see that it is the ajax-dashboard.php making this - maybee it has something to do with the "$maxtempyest":
ScreenShot221.jpg
But then my knowledge is not enough :( - I don't see where the data comes from.
Can somebody explain where the data comes from?
I use CumulusMX on my Raspberry to upload data to my website with Saratoga scripts.

kind regards,
Per
You do not have the required permissions to view the files attached to this post.
freddie
Posts: 2471
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Wrong data on my website

Post by freddie »

Have a look in dayfile.txt which is located in your Cumulus "data" folder. Each line in that file is for one day of data. Look for the day with the incorrect readings and see if the data is correct in there. A decode of each line of the file can be found at https://cumuluswiki.wxforum.net/a/Dayfile.txt. If the data in that file is incorrect then it will need to be changed. If it is correct then the problem lies elsewhere - probably in the web tags.
Freddie
Image
User avatar
saratogaWX
Posts: 1181
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: Wrong data on my website

Post by saratogaWX »

The data for $maxtempyest comes from the CUtags.php processed by Cumulus and uploaded to your site.

What is the URL for your website? I'll take a look about the issue.
perl
Posts: 52
Joined: Wed 24 Jun 2015 7:02 pm
Weather Station: Davis Vantage Pro2
Operating System: Buster Lite rPi
Location: Taasinge, Denmark
Contact:

Re: Wrong data on my website

Post by perl »

Hi Ken,
My website is on https://vejr.perlaustsen.dk
User avatar
saratogaWX
Posts: 1181
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: Wrong data on my website

Post by saratogaWX »

Thanks for the URL.,

There is one issue with your Settings.php that needs correction. Please change

Code: Select all

$SITE['DSforecasts'] = array(
 // Location|lat,long  (separated by | characters)
Svendborg, DK|55.042312,10.617283,
to

Code: Select all

$SITE['DSforecasts'] = array(
 // Location|lat,long  (separated by | characters)
'Svendborg, DK|55.042312,10.617283',
as the lack of the single-quote marks around the value is causing a PHP syntax error in Settings.php.

Looking at your CUtags.php?sce=dump shows
$WX['date'] = '11/08/2018';
$WX['time'] = '11:15 on 11 August 2018';
$WX['timehhmmss'] = '11:15:02';
so the data in the CUtags is very old.. that's why the yesterday temps are showing incorrect data.

Looking at https://vejr.perlaustsen.dk/wxstatus.php shows that Cumulus has not been uploading data (other than realtime.txt) to your site since 11/08/2018 10:35
so check your FTP settings to get Cumulus uploading to your site again. Then the stale data should be corrected with current data.
perl
Posts: 52
Joined: Wed 24 Jun 2015 7:02 pm
Weather Station: Davis Vantage Pro2
Operating System: Buster Lite rPi
Location: Taasinge, Denmark
Contact:

Re: Wrong data on my website

Post by perl »

Hi Ken,
I have changes the settings.php.
Then I downloaded the cu-plugin.zip file to my computer from Your website.
Then I uploaded a new CUtags.txt file to the cumulusmx/webfiles directory
I also uploaded all the other files from the zip file to the cumulusmx directory
The weather yesterday is still very hot :(
ScreenShot223.jpg
The file CUtags.txt is also in the cumulusmx directory.
The cumulusmx extra files looks all right to me:
ScreenShot224.jpg
CUtags.php?sce=view and CUtags.php?sce=dump still gives wrong informations

I knew there was problems with the wxstatus.php - but I could not figure it out

Per
You do not have the required permissions to view the files attached to this post.
User avatar
saratogaWX
Posts: 1181
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: Wrong data on my website

Post by saratogaWX »

It appears that the FTP is working (the CUtags.php is being uploaded according to wxstatus.php). However, I think your /home/CumulusMX/CUtags.txt is incorrect -- look at the file. It should contain contents like

Code: Select all

<?php
/*
 File: CUtags.txt

 Purpose: load Cumulus variables into a $WX[] array for use with the Canada/World/USA template sets

 Instructions:  
 Save this page as CUtags.txt and place in your cumulus\webfiles directory
 
 Use the Cumulus, Configuration, Internet, Files panel select an unused entry.

 In the Local Filenames, press Browse and select the CUtags.txt file as the local filename.
 In the Remote Filenames box, enter the directory and CUtags.php as the Remote Filename to use. 
 Leave the Binary? box unchecked,
 Check the Process? box.
 Leave the Realtime? box unchecked.
 Check the FTP? box.
 
 Press OK on the Internet Settings dialog to close it and save the settings.


 Author: Ken True - webmaster@saratoga-weather.org

 (created by gen-CUtags.php - V1.07 - 02-Jan-2013)

 These tags generated on 2013-01-13 01:01:57 GMT
   From tags.txt updated 2013-01-12 18:01:52 GMT

*/
// --------------------------------------------------------------------------

// allow viewing of generated source

if (isset($_REQUEST["sce"]) and strtolower($_REQUEST["sce"]) == "view" ) {
//--self downloader --
   $filenameReal = __FILE__;
   $download_size = filesize($filenameReal);
   header("Pragma: public");
   header("Cache-Control: private");
   header("Cache-Control: no-cache, must-revalidate");
   header("Content-type: text/plain");
   header("Accept-Ranges: bytes");
   header("Content-Length: $download_size");
   header("Connection: close");
   
   readfile($filenameReal);
   exit;
}
$WXsoftware = 'CU';  
$defsFile = 'CU-defs.php';  // filename with $varnames = $WX['CU-varnames']; equivalents
 
$rawdatalines = <<<END_OF_RAW_DATA_LINES
tempunit|<#tempunit>:|:
tempunitnodeg|<#tempunitnodeg>:|:
pressunit|<#pressunit>:|:
rainunit|<#rainunit>:|:
windunit|<#windunit>:|:
windrununit|<#windrununit>:|:
cloudbaseunit|<#cloudbaseunit>:|:
date|<#date>:|:
time|<#time>:|:
timehhmmss|<#timehhmmss>:|:
timeUTC|<#timeUTC>:|:
...
If you see lines with values like

Code: Select all

date|1/27/2011:|:
time|09:15 on 27 January 2011:|:
timehhmmss|09:15:46:|:
it means that the CUtags.txt template file is pre-parsed with old data (from my station in 2011).
In the CU-plugin.zip, extract CUtags.txt again from the WXtags-template-files/ directory and replace your /home/CumulusMX/CUtags.txt file with it.
User avatar
saratogaWX
Posts: 1181
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: Wrong data on my website

Post by saratogaWX »

You might try changing the template files to /home/CumulusMX/web directory .. it may be that CumulusMX processes the CUtags.txt in the /home/CumulusMX directory IN PLACE and so one update will clobber the template file.
User avatar
mcrossley
Posts: 12756
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Wrong data on my website

Post by mcrossley »

saratogaWX wrote: Tue 19 Feb 2019 7:01 pm You might try changing the template files to /home/CumulusMX/web directory .. it may be that CumulusMX processes the CUtags.txt in the /home/CumulusMX directory IN PLACE and so one update will clobber the template file.
Cumulus always appends "tmp" to processed files in the source folder, no matter the location.
User avatar
saratogaWX
Posts: 1181
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: Wrong data on my website

Post by saratogaWX »

Thanks for chiming in, Mark! I think the issue now is a pre-processed CUtags.txt with no <#...> variables in it. Copying the CUtags.txt from the CU-plugin.zip should fix perl's issue.
perl
Posts: 52
Joined: Wed 24 Jun 2015 7:02 pm
Weather Station: Davis Vantage Pro2
Operating System: Buster Lite rPi
Location: Taasinge, Denmark
Contact:

Re: Wrong data on my website

Post by perl »

The CUtags.txt was all right - uploadet all files again - checked it again OK.
Restartet the CumulusMX - still the same

Here is the files in the zip file I have uploadet to the webserver:
ScreenShot227.jpg
Yes I see theese values in the php file:
ScreenShot226.jpg
I have downloadet the file CUtags.txt (named CUtags_txt.txt) from cumulusMX/webfiles and enclosed it

I have also downloadet the file CUtags.php (named CUtags_php.txt) from my webserver and enclosed it

I really appreciate Your comments, but I really can't see what I am doing wrong or how to find the error.
Has it something to do with the comma delimiter?

Per
You do not have the required permissions to view the files attached to this post.
freddie
Posts: 2471
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Wrong data on my website

Post by freddie »

Looking at the date information in CUtags_php.txt two things spring to mind:
1. The data within Cumulus is old
2. The PHP file isn't being uploaded to the web server

1 seems very unlikely, as I can see current data arriving on your site.
2 could be the case. Is the PHP file actually being uploaded and replaced? I ask because the date information in the file is very old. From your website (https://vejr.perlaustsen.dk/CUtags.php?sce=dump):

Code: Select all

$WX['date'] = '1/27/2011'; // The current date
$WX['time'] = '09:15 on 27 January 2011'; // The current time and date.
Surely that should be todays date and current time?

What is the timestamp on your PHP file on the web server itself?
Freddie
Image
perl
Posts: 52
Joined: Wed 24 Jun 2015 7:02 pm
Weather Station: Davis Vantage Pro2
Operating System: Buster Lite rPi
Location: Taasinge, Denmark
Contact:

Re: Wrong data on my website

Post by perl »

Hi,

The zip file downloadet from the website to Cumulus is last updated on 30 Sep 2017 02:09pm PDT (30 Sep 2017 21:09 GMT)
The CUtags.php in this zip file is from 27-01-2011
Yes it is old, but it should be OK.
If You take a look in this file You will find the old data as I mentioned in my message.

Instructions in CUtags.php file:
Save this page as CUtagsT.htm and place in your cumulus\webfiles directory (the PI with cumulusMX software running)

Use the Cumulus, Configuration, Internet, Files panel select an unused entry.

In the Local Filenames, press Browse and select the CUtagsT.htm file as the local filename.
In the Remote Filenames box, enter the directory and CUtags.php as the Remote Filename to use. (this file is placed on the webserver)
Leave the Binary? box unchecked,
Check the Process? box.
Leave the Realtime? box unchecked.
Check the FTP? box.

Press OK on the Internet Settings dialog to close it and save the settings.

It looks so:
ScreenShot229.jpg
Instructions in CUtags.txt file:
Save this page as CUtags.txt and place in your cumulus\webfiles directory (placed in cumulusMX\webfiles directory)

Use the Cumulus, Configuration, Internet, Files panel select an unused entry.

In the Local Filenames, press Browse and select the CUtags.txt file as the local filename.
In the Remote Filenames box, enter the directory and CUtags.php as the Remote Filename to use.
Leave the Binary? box unchecked,
Check the Process? box.
Leave the Realtime? box unchecked.
Check the FTP? box.

Press OK on the Internet Settings dialog to close it and save the settings.

It look like this:
ScreenShot230.jpg
I really don't understand why I should use two files - but followed the instructions !

$WX['date'] = '1/27/2011'; // The current date
The timestamp for the CUtags.php file is 19-02-2019
You do not have the required permissions to view the files attached to this post.
freddie
Posts: 2471
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Wrong data on my website

Post by freddie »

perl wrote: Wed 20 Feb 2019 1:21 pmThe CUtags.php in this zip file is from 27-01-2011
Yes it is old, but it should be OK.
This is the file that should contain current data updated by Cumulus replacing tags in the template file by live data. Therefore the problem lies with the processing of the template file.
perl wrote: Wed 20 Feb 2019 1:21 pmIt looks so:
ScreenShot229.jpg

It look like this:
ScreenShot230.jpg

I really don't understand why I should use two files - but followed the instructions !
I don't understand this either, as whichever one runs second will overwrite the file produced by the one that ran first. Have you tried removing one of the file processing commands and seeing what is output?

Is there anything flagged in the log files in MXDiags folder?
Freddie
Image
User avatar
mcrossley
Posts: 12756
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Wrong data on my website

Post by mcrossley »

OK, let's reset this.

1. The original screen shot you posted of your Extra files in Cumulus looked OK.

2. Do not upload the CUtags.php file to your web server manually - Cumulus will do that, delete the file that is there already.

3. Switch on FTP logging in Cumulus.

4. Let it run for a couple of web update intervals

5. Switch off FTP logging and post the FTPLog file from the Cumulus folder.
Post Reply