Cumulus TNET Webtags Include Script
To extend the data that you can obtain from Cumulus, a special txt file has been created which when parsed by Cumulus and uploaded to your remote web server as a php script called tnetwebtags.php, provides the ability to access all the available webtags that Cumulus offers.
You can then use this file as an included file in other PHP scripts to access all the data contained within.
With this data, you can extend a php template to include lots more data that is not normally obtained from the realtime.txt or collected via the realtime.log file.
In addition, the tnetwebtags script provides some extra variables that are not available from Cumulus and more are being added all the time.
Downloads
Requirements
- Using PHP5 web hosting
- Intend to send data from the Cumulus Workstation to the website
- If Metar data is desired to be included, the Cumulus Metar script will be required.
Options in output
By default, including the script loads the values that were collected into an array called $WX which then can be used throughout a PHP based web template system to get what you want.
There are two options that can be passed when calling the script though to get other info...
Parse output
Parse output causes the script to generate a displayable web page with all the values displayed in a table.
You do this by adding to the end of the URL &parse=sce such as:
http://cumulus.tnetweather.com/tnetwebtags.php?parse=sce
Source View
Source view lets you see the actual PHP code as it resides on your webserver for debugging purposes.
You get this info by adding to the end of the URL &view=sce such as:
http://cumulus.tnetweather.com/tnetwebtags.php?view=sce
Preventing Access to view or parse
If for some reason, you want to prohibit someone from doing this, you can change the password for the parse option in the txt version of the script that you place on your Cumulus workstation. The next time it is uploaded to your web server, only the correct password can be used to use that ability.
Supported Tags
Current version supports tags in Cumulus up to version 1.89 build 904. Note that all tags are contained in an array called $WX ie as $WX['tagname'].
New stuff coming
Additional tags will be available from the tnetwebtags that obtain info from outside of Cumulus. Example local METAR data for Conditions, Sky, Observation time, and Visibility will be added shortly.
Usage
To use this script, you need to download the original file tnetwebtags.txt, and copy it to the workstation that you are running Cumulus on. Normally it would be installed into the home directory of Cumulus.
WinXP
Typically this is located in C:\Program Files\Cumulus
Vista / Win7
Typically this is located in C:\Cumulus
Configuring Cumulus
Opening up Cumulus and Select Configuration

The select Internet and Files

Note that the filenames used are different in both places:
| Local Filename | Remote filename |
|---|---|
| tnetwebtags.txt | tnetwebtags.php |
Make sure that you have all three items checked on the right, Process, RealtimeBold and FTP...
At this point the parsed version of the file should now appear on your website along with the current realtime.txt file at whatever schedule you have that setup as.
Added tags
The current version has the following added which are computed when the tnetwebtags.php file is included:
| Field | Value | Example |
|---|---|---|
| $WX['latitude'] | Original latitude tag | N 33° 24' 09" |
| $WX['longitude'] | Original longitude tag | W 111° 52' 59" |
| $WX['latdec'] | Calculated Latitude Decimal Value | 0 |
| $WX['longdec'] | Calculated Longitude Decimal Value | 0 |
| $WX['latdeg'] | Parsed Latitude Plain Text Degrees | deg min sec |
| $WX['longdeg'] | Parsed Longitude Plain Text Degrees | deg min sec |
The dec are decimal calculated values and the deg are worded version (No ° symbols which are parse issues for things like RSS/XML).
Decimal values are commonly used for things like Google Maps.
Disabled
The following webtags have been disabled in the current script due to the length they create. This is causing issues with some editors:
- $WD['wdirdata']
- $WD['wspddata']
- $WD['nextwindindex']
These can be reenabled in the original script by changing the following lines near the bottom of the script:
from:
$WX['wspddata'] = 'DISABLED<#-wspddata>'; // Wind speed
$WX['nextwindindex'] = 'DISABLED<#-nextwindindex>'; // Index of values used above
to:
$WX['wspddata'] = '<#wspddata>'; // Wind speed
$WX['nextwindindex'] = '<#nextwindindex>'; // Index of values used above
Note that the DISABLED is removed and the webtags have the - removed between the # and the word.
Version History
| Ver | Date | Comments |
|---|---|---|
| 2.6a | 2010-02-02 | Unreleased: Inserted Hook into script to call the Cumulus Metar Script to pick up Conditions and Sky info |
| 2.6 | 2010-01-28 | Added ability to parse and display the contents of the script using the &parse=sce option. |
| 2.5 | 2010-01-23 | Added new tage #currcond Requires v1.8.9 #904 to use. To see a value, you need to enable the conditions box in Setup / Display by check marking the "Show current conditions box". Then whatever you type in the Conditions box on the bottom right of the main screen will show up the next tag update period. |
| 2.4 | 2010-01-15 | Added new tag #altimeterpressure |
| 2.3 | 2010-01-14 | First public release |

