Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.0.0 (build 4022) - 11 May 2024

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

realtime.txt

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

Moderator: daj

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

Re: realtime.txt

Post by steve »

pinto wrote:Only an idea: can Steve add the buildnumber to the realtime.txt
Yes, good idea. I decided to make the build number more visible (it's in About... now) as I intend to continue with this process of having beta releases with the same version number but different build numbers.
Steve
User avatar
steve
Cumulus Author
Posts: 26701
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: realtime.txt

Post by steve »

I've just uploaded a new build (459) which fixes the decimal points and adds a 40th item, the build number.
Steve
pinto
Posts: 112
Joined: Sat 11 Oct 2008 3:20 pm
Weather Station: Davis Vantage Pro 2 Plus
Operating System: Debian Buster

Re: realtime.txt

Post by pinto »

tks. looks O.K. :D

even in the banner
Jozef
User avatar
dane
Posts: 417
Joined: Wed 10 Sep 2008 2:15 pm
Weather Station: Rosenborg 68700
Operating System: Win10 Ult., 64-bit, RaspberryPi
Location: Gilleleje, Denmark

Re: realtime.txt

Post by dane »

Pinto,
your banner seems to be way ahead of Kevin's banner.php V2.
Would you care to share it with us :?:
Ib
TNETWeather

Re: realtime.txt

Post by TNETWeather »

I was waiting to see if there were going to be more changes as I need to update the documentation each time as well. I had just about finished when the build number was added.

The version 3.0 packages for banner and avatar are now available for download. The new graphs are still having the core modules worked on but will most likely be available later tonight as well.
pinto
Posts: 112
Joined: Sat 11 Oct 2008 3:20 pm
Weather Station: Davis Vantage Pro 2 Plus
Operating System: Debian Buster

Re: realtime.txt

Post by pinto »

dane wrote:Pinto,
your banner seems to be way ahead of Kevin's banner.php V2.
Would you care to share it with us :?:
It is exactly the banner from Kevin.
I only changed the fonts to comicbd.ttf
and added the buildnumber to it

EDIT:V3.0 now

you can see the code here
Jozef
pinto
Posts: 112
Joined: Sat 11 Oct 2008 3:20 pm
Weather Station: Davis Vantage Pro 2 Plus
Operating System: Debian Buster

Re: realtime.txt

Post by pinto »

Hi Steve,
Trying to build a near-realtime updating index page, is it possible to add

<#heatindex>
<#beaudesc>
<#windrununit>
<#presstrend>

to the end of the realtime.txt

(index page is partly working, not finished yet)
Jozef
User avatar
steve
Cumulus Author
Posts: 26701
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: realtime.txt

Post by steve »

No problem - I need to add 'recent high gust' as well (the 'gust' that's there now is just the latest reading).
Steve
TNETWeather

Re: realtime.txt

Post by TNETWeather »

pinto wrote:Hi Steve,
Trying to build a near-realtime updating index page, is it possible to add

<#heatindex>
<#beaudesc>
<#windrununit>
<#presstrend>

to the end of the realtime.txt

(index page is partly working, not finished yet)
From my point of view... I would be hesitant of adding redundant data to this file since almost all uses of the file is going to be via a script or some sort of program.

The smaller the better and the less changes the better.

heatindex makes sense because it cannot be easily derived from other data... for that matter humidex would be nice as well (Common in Canada and becoming common in the US).

The rest are easily obtained from the data already contained in the realtime.txt file. That is why I didn't include them in the original request as they can be obtained from the data provided.

Oh... When I first recommended additional values, I couldn't think of a reason why windrununit to be different from windunit which is why I dropped it from the list.

presstrend can be derived from the existing data provided in pressure trend value. If it is positive (actually has a + in it it is Rising, if it is a negative value (will have a -) it is Falling..

Code: Select all

#	19     +0.1       pressure trend value
So in a script you could do something like:

Code: Select all

echo "Trend = ";
( substr( $DATA[18],0,1 ) == "-" ) ? print "Falling" : print "Rising";
echo "<br/>";
Similarly, the file already has the beaufortdesc value:

Code: Select all

#	13     6          wind speed (beaufort)
Beaufort values are fixed, they don't change... they are made up of a set of force values that are easily computed from existing data using a simple array.

Code: Select all

$beufortdesc = array("Calm","Light Air","Light Breeze","Gentle Breeze",
        "Moderate Breeze", "Fresh Breeze", "Strong Breeze", "Near Gale",
        "Gale", "Strong Gale", "Storm", "Violent Storm","Hurricane");
So that in a script, you could do...

Code: Select all

echo "Beaufort" . $DATA[12] . ' = ' . $beufortdesc[$DATA[12]] . "<br/>";
The power of the data in the realtime.txt file is that all the values are now known values so that if you want to display the other format, you can easily by checking to see what format is being used.

So if you were a metric station and you wanted display Fahrenheit for example, you can easily with:

Code: Select all

echo "Temp " . $DATA[2] . " " . $DATA[14] . " (" ;
if ( $DATA[14] == "C" ) ? print CoF($DATA[2],1) : print FtoC($DATA[2],1);
if ( $DATA[14] == "C" ) ? print "F)" : print "C)";
echo "<br/>";
Just an opinion of course...
User avatar
steve
Cumulus Author
Posts: 26701
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: realtime.txt

Post by steve »

Seems reasonable to me. I have to admit that I didn't look too closely at what they were as I was starting to shut everything down because of the large electrical storm that had just arrived :)

The wind unit isn't quite the same as the wind run unit, but again, can be derived easily.
Steve
pinto
Posts: 112
Joined: Sat 11 Oct 2008 3:20 pm
Weather Station: Davis Vantage Pro 2 Plus
Operating System: Debian Buster

Re: realtime.txt

Post by pinto »

Agree with Kevin, didn't think of calculating things myself :oops:

Only keep heatindex (and like he said maybe humidex if possible)
Jozef
User avatar
steve
Cumulus Author
Posts: 26701
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: realtime.txt

Post by steve »

OK, I'll add heat index, humidex, and recent high gust.
Steve
pinto
Posts: 112
Joined: Sat 11 Oct 2008 3:20 pm
Weather Station: Davis Vantage Pro 2 Plus
Operating System: Debian Buster

Re: realtime.txt

Post by pinto »

Thanks to Kevin's code samples I have my indexpage updated every 5 seconds now :D :D :D 8-)
Jozef
User avatar
steve
Cumulus Author
Posts: 26701
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: realtime.txt

Post by steve »

I've added the following to the end of realtime.txt in the next beta, which I will be uploading shortly:

41 recent max gust
42 heat index
43 humidex

I think I've got the humidex calculation correct, but no doubt someone will tell me if not. I've also added a <#humidex> web tag, but I'm not displaying the value on the main display.
Steve
TNETWeather

Re: realtime.txt

Post by TNETWeather »

Just updated...

Humidex is most likely correct but is in the would expect it to be in the format of tempunit

6.3 75.2 19.9

I'm pretty sure that the 19.9 should have been 67.8

19.9°C = 67.8°F

**Update** just checked the heat index and Humidex against WD and they are within tenths of a degree the same.
Post Reply