Welcome to the Cumulus Support forum.

Latest Cumulus MX release 3.8.0 (build 3090) - 12 August 2020 (please see important announcement regarding releases since 3.5.0)
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 the NOAA report and Snow Index drop-down menus to 2030)

Use this link to Download the Software (Cumulus MX / Cumulus 1 and other related items). Software

CumulsMX PHP Webtags

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

water01
Posts: 1943
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: CumulsMX PHP Webtags

Post by water01 »

OK after reading the PHP documentation pointed to by sfws I have changed the two files to exclude the closing ?> and tested them to see if they work correctly.

Been programming in PHP now for so many years I care not to recall, but I am always willing to learn!! Why I never spotted this I will never know as I always RTFM!!
David
Image

User avatar
beteljuice
Posts: 2975
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: CumulsMX PHP Webtags

Post by beteljuice »

:groan:

the beteljuice will continue to 'close' his tags (keeps the editor happy)

Just as I'm sort of trying to rebuild the Saratoga / Kocher style 'wxstatus' page for everyone, the files and tags and file sizes are in 'flux' .

test page is also in flux and has much yet to do and 'new records' has an incredible amount of possible notifications to try and code for.

Different size versions have been mentioned, so what is the expected upload frequency of this file ?
Last edited by beteljuice on Sun 26 Apr 2020 6:39 am, edited 1 time in total.
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
HansR
Posts: 1201
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: Davis Vantage Pro 2+
Operating System: Raspbian GNU/Linux 10 (Buster)
Location: Wagenborgen (NL)
Contact:

Re: CumulsMX PHP Webtags

Post by HansR »

Ah, that's a nice one @beteljuice. Had been looking at something like this with kocher but did not have the time to dive in deep.
Looks good. Has it finished already? And I don't even use webtags. ;)
https://meteo-wagenborgen.nl / Cumulus 3.6.8 (build: 3084)
Davis Vantage Pro 2+ / Raspberry Pi 3 Model B Plus Rev 1.3
Raspbian Linux 10 (buster) / 4.19.118-v7+ armv7l
Mono JIT compiler version 6.8.0.123 (tarball Tue May 12 15:31:43 UTC 2020)

water01
Posts: 1943
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: CumulsMX PHP Webtags

Post by water01 »

Different size versions have been mentioned, so what is the expected upload frequency of this file ?
If you mean my cumulswubtags.txt only if there is an error or Mark adds more webtags. :D :D :D
David
Image

water01
Posts: 1943
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: CumulsMX PHP Webtags

Post by water01 »

OK Mark is a hard man to keep up with but I have added all the new build 3076 "feels like" webtags and updated and added the Davis webtags in cumuluswebtags.txt in the first post and tested it on my website. All is working at it should be!!

This is both files by the way as there are new ByMonth Feels Like webtags
David
Image

water01
Posts: 1943
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: CumulsMX PHP Webtags

Post by water01 »

Latest update in Build 3077 <#LastRainTip> added.
David
Image

water01
Posts: 1943
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: CumulsMX PHP Webtags

Post by water01 »

Updated for Build 3080 with Ecowitt web tags
David
Image

User avatar
dazza1223
Posts: 529
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 10
Location: Worthing
Contact:

Re: CumulsMX PHP Webtags

Post by dazza1223 »

hi i took on somthink abit here

im trying to get cumuluswebtags.php to inport in the tags with out cumuls prossising it

but it not outputing the same way as if it get prosested bye cumuls

this is the one
var then_month = 06 -1;
var then = Date.UTC(2020, then_month, 10, 18, 50, 07);
var timetodie = 10 * missed * 60000; // milliseconds per minute

im trying to get it done in php


and the php one outputs this

// Javascript Cumulus update checker - betejuice v2.0 July 2011
// set these variables to suit
var missed = 2; // Number of updates to miss before deciding "offline", MUST be > 1, fractions allowed (eg. 1.5)
var online_pic = "images/pictures/greenbrightled21px.gif"; // location of ONline image
var online_txt = "on line"; // your ONline text
var online_txt2 = "0";
var offline_pic = "images/pictures/redgreenled21px.gif"; // location of OFFline image
var offline_txt = "off line"; // your OFFline text
var offline_txt2 = "2";
// END user vars


Code: Select all

script type="text/javascript">
<!--
// Javascript Cumulus update checker - betejuice v2.0 July 2011
// set these variables to suit
var missed = 2; // Number of updates to miss before deciding "offline", MUST be > 1, fractions allowed (eg. 1.5)
var online_pic = "images/pictures/greenbrightled21px.gif"; // location of ONline image
var online_txt = "on line"; // your ONline text
var online_txt2 = "0";
var offline_pic = "images/pictures/redgreenled21px.gif"; // location of OFFline image
var offline_txt = "off line"; // your OFFline text
var offline_txt2 = "2";
// END user vars

var now = new Date();	
var then_month = <?php echo $timeUTC?> format=mm> -1;
var then = Date.UTC(<?php echo $timeUTC?> format=yyyy>, then_month, <?php echo $timeUTC?> format="dd', 'hh', 'mm', 'ss");
var timetodie = <?php echo $interval?> * missed * 60000; // milliseconds per minute

if(now - then < timetodie){
status_pic = online_pic;
status_txt = online_txt;
status_txt2 = online_txt2;
} else {
status_pic = offline_pic;
status_txt = offline_txt;
status_txt2 = offline_txt2;
}
-->
</script>  
Have fun and keep learning

dazza :D

Image

water01
Posts: 1943
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: CumulsMX PHP Webtags

Post by water01 »

I am sorry but I do not understand what you are attempting to do.

By it's very nature cumuluswebtags.txt has to be processed by CumulusMX in order to produce the values required to upload cumulswebtags.php, otherwise the values will not be present in the file.
David
Image

water01
Posts: 1943
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: CumulsMX PHP Webtags

Post by water01 »

Updated for Build 3087.
David
Image

water01
Posts: 1943
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: CumulsMX PHP Webtags

Post by water01 »

Updated for Build 3089 on 1st August, sorry for delay.
David
Image

User avatar
ConligWX
Posts: 797
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2 Plus +DFARS
Operating System: Ubuntu / Windows 10
Location: Bangor, NI
Contact:

Re: CumulsMX PHP Webtags

Post by ConligWX »

David.

Line 791 of cumulusmxwebtags.txt has a typo by the looks of it. $txchammels
Regards Simon

https://www.conligwx.org - @conligwx
• Davis Vantage Pro2 Plus + DFARS • WeatherLink Live • CumulusMX • Saratoga Templates •

water01
Posts: 1943
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: CumulsMX PHP Webtags

Post by water01 »

Not really an error as it is a PHP generated tag anyway i.e. not output by MX, but I have altered it to channels.

File now available.

To anyone who was using it $txchammels is now $txchannels (would only apply to David users).
David
Image

Post Reply