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.
- 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 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:
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:
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.
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.
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.
Typically this is located in C:\Program Files\Cumulus
Vista / Win7
Typically this is located in C:\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|
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.
The current version has the following added which are computed when the tnetwebtags.php file is included:
|$WX['latitude']||Original latitude tag||N 33° 24' 09"|
|$WX['longitude']||Original longitude tag||W 111° 52' 59"|
|$WX['latdec']||Calculated Latitude Decimal Value||33.4025|
|$WX['longdec']||Calculated Longitude Decimal Value||-111.88305555556|
|$WX['latdeg']||Parsed Latitude Plain Text Degrees||N 33deg 24min 09sec|
|$WX['longdeg']||Parsed Longitude Plain Text Degrees||W 111deg 52min 59sec|
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.
The following webtags have been disabled in the current script due to the length they create. This is causing issues with some editors:
These can be reenabled in the original script by changing the following lines near the bottom of the script:
$WX['wspddata'] = 'DISABLED<#-wspddata>'; // Wind speed
$WX['nextwindindex'] = 'DISABLED<#-nextwindindex>'; // Index of values used above
$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.
|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|