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

Default Cumulus web page working in PHP using realtime.txt

Discussion and questions about Cumulus weather station software version 1. This section is the main place to get help with Cumulus 1 software developed by Steve Loft that ceased development in November 2014.
fractonimbus
Posts: 159
Joined: Thu 03 Feb 2011 1:15 am
Weather Station: WH1091
Operating System: Windows 7 on a Dell Vostro
Location: Canberra

Default Cumulus web page working in PHP using realtime.txt

Post by fractonimbus »

My default Cumulus index page now updates all the figures it can get from realtime.txt every 60 seconds, without the upload overhead of all the graphics that the normal update uses (which still operates at 15 minute intervals).

See http://www.dcnicholls.com/wx/

I recoded the indexT.htm page to include some of the PHP code from the banner.php code (http://cumulus.tnetweather.com/projects/phpggbanner), added a few steps to generate stuff that's not in the realtime.txt (Beaufort scales, apparent temperature). I also added a Fire Danger Index value, using the CSIRO equation.

In order to get Cumulus to do the updating, I had to retain the indexT.htm name, so I had to get my website server (IIS) to parse .htm files as PHP. Works well.

The only thing I don't have updating (of the met figures) is "Last rainfall" which I leave for the 15 minute full update to do.

fracto
Image
User avatar
daj
Posts: 2041
Joined: Tue 29 Jul 2008 8:00 pm
Weather Station: WH1081
Operating System: Pi & MX
Location: SW Scotland
Contact:

Re: Default Cumulus web page working in PHP using realtime.t

Post by daj »

fractonimbus wrote:In order to get Cumulus to do the updating, I had to retain the indexT.htm name, so I had to get my website server (IIS) to parse .htm files as PHP. Works well.
Just a tip....

Far better to have asked Cumulus to upload a custom file with the values you need in a PHP file. You are adding unnecessary overhead to your IIS server as it now needs to parse every HTML page just in case it has PHP. :o

You should upload a very small PHP file with the data, and the index.php file on the server uses this.
David
kippfordweather.uk
Cumulus MX & Raspberry Pi
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Default Cumulus web page working in PHP using realtime.t

Post by steve »

fractonimbus wrote:added a few steps to generate stuff that's not in the realtime.txt (Beaufort scales, apparent temperature).
Beaufort number and Apparent temperature are both in realtime.txt.
Steve
fractonimbus
Posts: 159
Joined: Thu 03 Feb 2011 1:15 am
Weather Station: WH1091
Operating System: Windows 7 on a Dell Vostro
Location: Canberra

Re: Default Cumulus web page working in PHP using realtime.t

Post by fractonimbus »

David, thanks for the suggestion. I didn't think about generating custom upload files. Why I did what I did was to reduce the large upload of the full file set too often. realtime.txt is small and can be programmed in Cumulus to upload frequently, independently of the main upload, without large overhead.

Steve, yes, your other answer about the four extra realtime.txt values lead me to discover the information. Makes it easier. Though I was a bit worried about your comment elsewhwere on the equation cumulus uses being wrong or needing checking. I'll compare my version with the Cumulus version.

What this was really about was learning PHP and getting a weather page working.

DN
Image
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: Default Cumulus web page working in PHP using realtime.t

Post by beteljuice »

Urrgh ......... page refresh !

Why aren't you using one of the (many) flavours of Ajax to update your content ?

Edit:
You may want to trial / experiment with SaratogaWX (Ken True) revamp of a long established Ajax 'theme' which is now supporting Cumulus.
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
daj
Posts: 2041
Joined: Tue 29 Jul 2008 8:00 pm
Weather Station: WH1081
Operating System: Pi & MX
Location: SW Scotland
Contact:

Re: Default Cumulus web page working in PHP using realtime.t

Post by daj »

beteljuice wrote:Urrgh ......... page refresh !.
I agree :bash: lol
David
kippfordweather.uk
Cumulus MX & Raspberry Pi
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Default Cumulus web page working in PHP using realtime.t

Post by steve »

fractonimbus wrote:Though I was a bit worried about your comment elsewhwere on the equation cumulus uses being wrong or needing checking.
Was that some time ago, just after I'd added Apparent temperature to Cumulus? There may have been some initial teething troubles, as with any new facility, but I'm reasonably confident it's correct.
Steve
fractonimbus
Posts: 159
Joined: Thu 03 Feb 2011 1:15 am
Weather Station: WH1091
Operating System: Windows 7 on a Dell Vostro
Location: Canberra

Re: Default Cumulus web page working in PHP using realtime.t

Post by fractonimbus »

beteljuice wrote:Urrgh ......... page refresh !
Why aren't you using one of the (many) flavours of Ajax to update your content ?
Well, I could add an animated GIF, too, if you like :-)

I tend to use whatever is light weight, not what is trendy. The Style Sheet Police decry the use of tables, too. But tables are simple, work in every browser since Cello, and are very configurable. For a quick page refresh, it's hard to beat the meta refresh line for brevity :-)

I like simple and clean. Ken True's main web page may be good technology but it looks like a web version of the Batmobile :-(

But I will follow up on Ajax when I get time. The Saratoga stuff looks interesting.

Steve, thanks for the info on apparent temp. I'll swap over to using the new 1.9.1 realtime.txt content.

DN
User avatar
laulau
Posts: 678
Joined: Tue 13 Oct 2009 10:52 pm
Weather Station: WeatherDuino Pro2
Operating System: Win 7
Location: Meyenheim, Alsace, FR
Contact:

Re: Default Cumulus web page working in PHP using realtime.t

Post by laulau »

beteljuice wrote:Urrgh ......... page refresh !
What do you suggest to replace the " :bash: HTTP-EQUIV="Refresh" " html code :?:
Laurent

Image
fractonimbus
Posts: 159
Joined: Thu 03 Feb 2011 1:15 am
Weather Station: WH1091
Operating System: Windows 7 on a Dell Vostro
Location: Canberra

Re: Default Cumulus web page working in PHP using realtime.t

Post by fractonimbus »

steve wrote:Beaufort number and Apparent temperature are both in realtime.txt.
Steve, FYI I checked the Apparent Temperature against the BOM formula and they're giving exactly the same result. So all OK.

DN
Image
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Default Cumulus web page working in PHP using realtime.t

Post by steve »

OK - thanks.
Steve
User avatar
daj
Posts: 2041
Joined: Tue 29 Jul 2008 8:00 pm
Weather Station: WH1081
Operating System: Pi & MX
Location: SW Scotland
Contact:

Re: Default Cumulus web page working in PHP using realtime.t

Post by daj »

laulau wrote:
beteljuice wrote:Urrgh ......... page refresh !
What do you suggest to replace the " :bash: HTTP-EQUIV="Refresh" " html code :?:
Learn/Use Javascript & Ajax calls to re-read the data file in the background and only update the data on the page rather than reloading the entire page each time.

Many of us use this technique -- on my site, the "Near Live" and "Weather Console" employ this method

I use a jQuery library (collection of Javascript functions) which makes the Ajax calls just a little easier to code.
(Ajax is simply a term used to describe Javascript methods to retrieve data in the background of the page)
David
kippfordweather.uk
Cumulus MX & Raspberry Pi
tjaliwalpa
Posts: 293
Joined: Sun 18 Apr 2010 9:47 am
Weather Station: Davis VP2
Operating System: Linux Lite Ubuntu 16.04
Location: Karoonda, SA
Contact:

Re: Default Cumulus web page working in PHP using realtime.t

Post by tjaliwalpa »

daj wrote:
laulau wrote:
beteljuice wrote:Urrgh ......... page refresh !
What do you suggest to replace the " :bash: HTTP-EQUIV="Refresh" " html code :?:
Learn/Use Javascript & Ajax calls to re-read the data file in the background and only update the data on the page rather than reloading the entire page each time.

Many of us use this technique -- on my site, the "Near Live" and "Weather Console" employ this method

I use a jQuery library (collection of Javascript functions) which makes the Ajax calls just a little easier to code.
(Ajax is simply a term used to describe Javascript methods to retrieve data in the background of the page)
Question: Wouldn't the use of jQuery and Ajax calls work without using PHP?

I ask this as I am using a server that doesn't have PHP enabled. It occured to me, having read all the above posts, that I could use that method to have my data updated on the main page in the way you have the Weather Console working (and I have my scrolling marquee working) without PHP.
Bob
User avatar
daj
Posts: 2041
Joined: Tue 29 Jul 2008 8:00 pm
Weather Station: WH1081
Operating System: Pi & MX
Location: SW Scotland
Contact:

Re: Default Cumulus web page working in PHP using realtime.t

Post by daj »

tjaliwalpa wrote:Question: Wouldn't the use of jQuery and Ajax calls work without using PHP?
Indeed -- PHP and Javascript/jQuery are different beasts.

PHP is processed on the server before it gets to the browser.
JS/jQuery on your browser

You can mix them (or not)
David
kippfordweather.uk
Cumulus MX & Raspberry Pi
tjaliwalpa
Posts: 293
Joined: Sun 18 Apr 2010 9:47 am
Weather Station: Davis VP2
Operating System: Linux Lite Ubuntu 16.04
Location: Karoonda, SA
Contact:

Re: Default Cumulus web page working in PHP using realtime.t

Post by tjaliwalpa »

Thanks David, something for me to work on. The refresh I have been using (with reload.js) has been annoying me. :bash:
Bob
Post Reply