Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 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

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

WEBTAGS temperature compared to yesterday

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

ChaserPeek
Posts: 40
Joined: Sun 22 Nov 2020 6:53 pm
Weather Station: Davis Vp2
Operating System: Windows10

Re: WEBTAGS temperature compared to yesterday

Post by ChaserPeek »

beteljuice wrote: Sat 28 Nov 2020 12:01 am but what is ..
the web software read the sequence and ...
Why can't that prog handle the extra var and calculation ????
Please check this page https://www.meteoisernia.net/rete-di-mo ... gnone.html

This site is an aggregator of some stations and it works with a system that read a TXT file (old file generated by WVIEW, now I'm testing CUMULUS).
So, I don't works with a "pure" web template of Cumulus, but with an external system that read my sequence of webtags.

As you can see, I have fixed almost everything values. Some values are not present and they are not required, but comparison with temp of 24h ago, is very helpful (see "Rispetto a ieri:" label)
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: WEBTAGS temperature compared to yesterday

Post by beteljuice »

But that site is 'reading' a json file for data, not the simple txt you suggested.
Image
......................Imagine, what you will KNOW tomorrow !
ChaserPeek
Posts: 40
Joined: Sun 22 Nov 2020 6:53 pm
Weather Station: Davis Vp2
Operating System: Windows10

Re: WEBTAGS temperature compared to yesterday

Post by ChaserPeek »

Maybe the site convert the TXT in Json but, of course, to show a station, I must add a file.txt path.
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: WEBTAGS temperature compared to yesterday

Post by beteljuice »

This is part of the json made from the data ..

Code: Select all

"data":{
	"data":{
		"stationName":"Isernia Centro Via Latina",
		"stationElevationDesc":"433 metri slm",
		"stationDateTimeDesc":"23:37 del 28\/11\/2020",
		"hiOutsideTemp":"20.8",
		"lowOutsideTemp":"0.0",
		"outsideTemp":"20.8",
		"lowOutsideTempTime":"23:27",
		"hiOutsideTempTime":"22:52",
		"yesterdayHiOutsideTemp":"23.6",
		"yesterdayLoOutsideTemp":"19.4",
		"yesterdayHiOutsideTempTime":"09:30",
		"yesterdayLoOutsideTempTime":"07:25",
		"dayavgtemp":"0.0",
		"yesterdayDayavgtemp":"20.6",
		"windChill":"21.2",
		"outsideHeatIndex":"20.8",
		"outsideTempImage":"s",
		"daychangetemp":"ieri era 20.8",
		"weatherDesc":"In aumento",
Edit: see next post below

Can you tell 'them' what your data file is named or do they demand a set name ?
If they will accept ????.php we can do do something, otherwise everytime you upload you would have to run another (simple) sever-side prog to make the output file in the correct format
:(
Last edited by beteljuice on Sun 29 Nov 2020 5:51 am, edited 1 time in total.
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: WEBTAGS temperature compared to yesterday

Post by beteljuice »

An experiment for you to try ....

Remember your earlier test ????.txt that produced the php code as well ?

Rename that produced file as test.txt

In the (server) directory where that file is check to see if there is a file called .htaccess - dot start, no extn

If there is make a back-up and copy it.

If not, create one from new with notepad++ or similar (plain text file)
It needs to contain ..

Code: Select all

<Files test.txt> 
    AddType application/x-httpd-php .txt
</Files>
Save it, upload to web remembering dot up front and no extn

All being well when you look at the test.txt file in a browser, the php code should have been executed and your | delimited data should just be values ;)
Image
......................Imagine, what you will KNOW tomorrow !
ChaserPeek
Posts: 40
Joined: Sun 22 Nov 2020 6:53 pm
Weather Station: Davis Vp2
Operating System: Windows10

Re: WEBTAGS temperature compared to yesterday

Post by ChaserPeek »

Thanks, I tried to do your tip.

The difference is that my browser not shows the txt file but download it.
When I open the text.txt after download, I see |0.0|23:27|22:52|0.0|0.0|21.0|20.4|s|<?php echo (20.4 - 20.4); ?> yet.. :bash: :bash: :bash:
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: WEBTAGS temperature compared to yesterday

Post by beteljuice »

That looks like something went wrong with .htaccess (or your server isn't running apache)

Double check that .htaccess appears in the directory where the test.txt located,
check that <Files test.txt> has the correct file name

It maybe that for your server a php version has to be stated eg.

Code: Select all

AddType application/x-httpd-php5 .txt
If you like you could make test.txt simply

Code: Select all

<?php
echo "Hello, It works !";
?>
Image
......................Imagine, what you will KNOW tomorrow !
ChaserPeek
Posts: 40
Joined: Sun 22 Nov 2020 6:53 pm
Weather Station: Davis Vp2
Operating System: Windows10

Re: WEBTAGS temperature compared to yesterday

Post by ChaserPeek »

Of course the hosting used support php
http://www.centrometeomolise.it/test_stazione/hello.php

I tried to change the line AddType application/x-httpd-php5 .txt but browser download the file without parse the PHP function.
The file hello.php it's correctly parsed withoud download. Maybe .htaccess not give right instrucion for the txt file.

Can be a solution install apache in local machine to create the file ? Next I can upload it with other software ? :roll:
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: WEBTAGS temperature compared to yesterday

Post by beteljuice »

Sudden thought !

Check that the file permissions for test.txt are executable.
Image
......................Imagine, what you will KNOW tomorrow !
ChaserPeek
Posts: 40
Joined: Sun 22 Nov 2020 6:53 pm
Weather Station: Davis Vp2
Operating System: Windows10

Re: WEBTAGS temperature compared to yesterday

Post by ChaserPeek »

I think problem is solved :D

I tried some solutions with htaccess without success.

Finally, I tried to rename client.txt in client.php.txt and browser execute it :mrgreen:

This is "normal" txt not parsed http://www.centrometeomolise.it/test_stazione/test.txt
Thid is "fixed" php.txt parsed http://www.centrometeomolise.it/test_st ... nt.php.txt

No htaccess used and no php setting added :mrgreen:

Now I can try to add some complex function using other webtags to generate derivated values.

I have now last problem: as you see <?php echo (24.4 - 24.4); ?> temp now and temp yesterday are the same (<?php echo (<#temp rc=y> - <#RecentOutsideTemp d=1 rc=y>); ?>

Maybe I have archive a little messy :D .
When can I delete all archives of Cumulus and restart recording ?
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: WEBTAGS temperature compared to yesterday

Post by beteljuice »

I'm not at all sure what you have done ????
... AFAIK only the last extension is paid attention to, so ?????.php.txt is a text file and shouldn't be 'seen' by the php preprocessor - unless someone tells me differently :?

... plus of course it is not the filename your data collector expects.
Image
......................Imagine, what you will KNOW tomorrow !
ChaserPeek
Posts: 40
Joined: Sun 22 Nov 2020 6:53 pm
Weather Station: Davis Vp2
Operating System: Windows10

Re: WEBTAGS temperature compared to yesterday

Post by ChaserPeek »

Yes, you are right but, I think this is a feature of the hosting.
Now I must test if yesterday value running but I must delete archive.
Post Reply