Realtime.txt

This page describes a file used only by (the legacy) Cumulus 1.x.y.

It does not document any file of same name in MX; as that file is NOT used by any standard MX feature. Instead MX offers you the ability to automatically update a database table on your web site, adding a new row each time this file would be generated, that row contains the same set of values, with rows for both current and historic data.

Are you willing to contribute to this documentation, which is for you, and add a section describing how the file content is different in MX, and how it might be used there?

Introduction

  • realtime.txt is a text file with a single line of space separated values.
  • It contains a list of key values of the sensors, and is re-created frequently.
  • After creation, it is usually set to upload to your website, and used to produce near instant readings.
  • The realtime.txt file is NOT a log file and is constantly replaced. It does not therefore contain any historic data.
    • Although this file is technically not a 'log file', it is optionally automatically produced by Cumulus, and follows a similar format to the other Log files.

This is the legacy screen that controls production of this file. Standard Cumulus only uses this file for the optional real-time wind gauges (see #Where is the file used). It exists as one way that current Cumulus derivatives can be supplied to, and its content can be tailored to the needs of whatever you choose.

  • The 'interval' sets how often Cumulus produces the file, to set that interval, click on the 'Configuration' menu then 'Internet', then set parameter labelled 'Realtime interval' by entering an integer number of seconds.
  • Optionally the file can be uploaded to your externally-hosted web site, if you want this (and it is usual) select all 3 selectors:
    • Enable Realtime
    • Enable Realtime FTP
    • Realtime.txt FTP
  • The uploading interval is the same as the file creation interval.

Special note to Fine Offset/EasyWeather users

Weather stations which come shipped with the EasyWeather software should consider the real-time updating with care.

The station only updates every 48 (solar is only updated every 60) seconds, so aim for a real-time interval of around 30 seconds, that way a visitor knows not to expect updates too often but you also allow Cumulus to catch up to two updates within a minute (depending on when the first and second 48 second update came to Cumulus).

Bandwidth Considerations

The file Cumulus uploads is less than 1024 bytes in size, but for the calculation we will assume 1024 bytes, and typically this is (for non Fine Offset stations) updated every 5 to 15 seconds depending on your 'Realtime interval' setting above.

Most internet providers now place a limit on the amount of Bandwidth you can consume each month. Bandwidth is a figure representing the data you can upload and download. Doing such a regular upload will impact on your allowance.

During a month (31 days) the upload process will consume roughly 175 Mbytes of bandwidth -- this is a tiny consideration as usually bandwidth restrictions from your provider start in the Gigabytes (Gb) range, not Megabytes (Mb).

On top of your internet connection bandwidth restrictions, you may also have bandwidth caps on your web server so this same figure should be considered for your web server.

Where is the file used

The realtime.txt is used only in Cumulus 1 in the following areas:


List of fields in the file

Remember that which fields you see, depends on which version of Cumulus you are running. The list below represents the final 1.9.4 version of Cumulus.

Field # Example Description Equivalent Webtags
1 19/08/09 Date as 2 figure day [separator] 2 figure month [separator] 2 figure year - the separator is that set in the windows system short date format (see setup) <#date>
2 16:03:45 time(always hh:mm:ss as per computer system) <#timehhmmss>
3 8.4 outside temperature <#temp>
4 84 relative humidity <#hum>
5 5.8 dewpoint <#dew>
6 24.2 wind speed (average) <#wspeed>
7 33.0 latest wind speed reading <#wlatest>
8 261 wind bearing (degrees) <#bearing>
9 0.0 current rain rate (per hour) <#rrate>
10 1.0 rain today <#rfall>
11 999.7 barometer (The sea level pressure) <#press>
12 W current wind direction (compass point) <#currentwdir>
13 6 wind speed as in 6 converted to force number (beaufort) <#beaufortnumber>
14 km/h wind units - m/s, mph, km/h, kts <#windunit>
15 C temperature units - degree C, degree F <#tempunitnodeg>
16 hPa pressure units - mb, hPa, in <#pressunit>
17 mm rain units - mm, in <#rainunit>
18 146.6 wind run (today) <#windrun>
19 +0.1 pressure trend value (The average rate of pressure change over the last three hours) <#presstrendval>
20 85.2 monthly rainfall <#rmonth>
21 588.4 yearly rainfall <#ryear>
22 11.6 yesterday's rainfall <#rfallY>
23 20.3 inside temperature <#intemp>
24 57 inside humidity <#inhum>
25 3.6 wind chill <#wchill>
26 -0.7 temperature trend value (The average rate of change in temperature over the last three hours) <#temptrend>
27 10.9 today's high temp <#tempTH>
28 12:00 time of today's high temp (hh:mm) <#TtempTH>
29 7.8 today's low temp <#tempTL>
30 14:41 time of today's low temp (hh:mm) <#TtempTL>
31 37.4 today's high wind speed (of average as per choice) <#windTM>
32 14:38 time of today's high wind speed (average) (hh:mm) <#TwindTM>
33 44.0 today's high wind gust <#wgustTM>
34 14:28 time of today's high wind gust (hh:mm) <#TwgustTM>
35 999.8 today's high pressure <#pressTH>
36 16:01 time of today's high pressure (hh:mm) <#TpressTH>
37 998.4 today's low pressure <#pressTL>
38 12:06 time of today's low pressure (hh:mm) <#TpressTL>
39 1.8.7 Cumulus Versions (the specific version in use) <#version>
40 819 Cumulus build number <#build>
41 36.0 10-minute high gust <#wgust>
42 10.3 Heat index <#heatindex>
43 10.5 Humidex <#humidex>
44 13 UV Index <#UV>
45 0.2 evapotranspiration today <#ET>
46 14 solar radiation W/m2 <#SolarRad>
47 260 10-minute average wind bearing (degrees) <#avgbearing>
48 2.3 rainfall last hour <#rhour>
49 3 The number of the current (Zambretti) forecast as per Strings.ini. <#forecastnumber>
50 1 Flag to indicate that the location of the station is currently in daylight (1 = yes, 0 = No) <#isdaylight>
51 1 If the station has lost contact with its remote sensors "Fine Offset only", a Flag number is given (1 = Yes, 0 = No) <#SensorContactLost>
52 NNW Average wind direction <#wdir>
53 2040 Cloud base <#cloudbasevalue>
54 ft Cloud base units <#cloudbaseunit>
55 12.3 Apparent temperature <#apptemp>
56 11.1 Sunshine hours so far today <#SunshineHours>
57 420.1 Current theoretical max solar radiation <#CurrentSolarMax>
58 1 Is it sunny? 1 if the sun is shining, otherwise 0 (above or below threshold) <#IsSunny>
59 13.6 Feels Like <#feelslike>

Example of the file

(this is one complete line, although it may appear on this page as two or more due to screen width restrictions)


18/10/08 16:03:45 8.4 84 5.8 24.2 33.0 261 0.0 1.0 999.7 W 6 mph C mb mm 146.6 +0.1 85.2 588.4 11.6 20.3 57 3.6 -0.7 10.9 12:00 7.8 14:41 37.4 14:38 44.0 14:28 999.8 16:01 998.4 12:06 1.8.2 448 36.0 10.3 10.5 13 0.2 14 260 2.3 3 1 1 NNW 2040 ft 12.3 11.1 420.1 1 13.6

Recreating the file using web tags

Note: that the built-in realtime.txt always uses a 'dot' decimal character (and so is JavaScript/PHP 'safe'), any web tag version will use your host computers localisation for decimals. [There are some #RCxxx webtags available but they do not cover all the required values]

Note: from b3075 onwards, all decimal tags now support the "rc=y" parameter - see below.

To ensure decimal compatibility across systems use a js construct such as:

 var rt = realtime.split(" ");
 var temp = +rt[2].replace(',','.');

when referring to decimal values in the constructed file.

Alternative content

Some users, and some third-party supplied web pages, require a different set of fields to those provided in the standard realtime.txt file. In these cases, an alternative file, sometimes called realtime-xT.txt is set up in the web folder, processed and uploaded using the Extra Files feature.

Different interval or different file name

Occasionally there is a requirement from some users to create a copy of the realtime.txt file and have it posted to a location at the normal Cumulus web update interval rather than the realtime interval, or perhaps because a filename other than realtime.txt is required. This can be achieved by creating a template file using the web tags below, and referencing this in the Cumulus Configuration|Internet|Files dialog. Ticking the 'Process?' checkbox, and supplying a remote filename will create this copy of the realtime.txt file.

(this is one complete line, although it may appear on this page as two or more due to screen width restrictions)

<#date format=dd/mm/yy> <#timehhmmss> <#temp> <#hum> <#dew> <#wspeed> <#wlatest> <#bearing> <#rrate> <#rfall> <#press> <#currentwdir> <#beaufortnumber> <#windunit> <#tempunitnodeg> <#pressunit> <#rainunit> <#windrun> <#presstrendval> <#rmonth> <#ryear> <#rfallY> <#intemp> <#inhum> <#wchill> <#temptrend> <#tempTH> <#TtempTH> <#tempTL> <#TtempTL> <#windTM> <#TwindTM> <#wgustTM> <#TwgustTM> <#pressTH> <#TpressTH> <#pressTL> <#TpressTL> <#version> <#build> <#wgust> <#heatindex> <#humidex> <#UV> <#ET> <#SolarRad> <#avgbearing> <#rhour> <#forecastnumber> <#isdaylight> <#SensorContactLost> <#wdir> <#cloudbasevalue> <#cloudbaseunit> <#apptemp> <#SunshineHours> <#CurrentSolarMax> <#IsSunny> <#feelslike>


For releases after b3074 now accept the "rc=y" parameter, so if your locale uses a comma decimal you must add this parameter to all the web tags that produce decimal values

(this is one complete line, although it may appear on this page as two or more due to screen width restrictions)

<#date format=dd/mm/yy> <#timehhmmss> <#temp rc=y> <#hum> <#dew rc=y> <#wspeed rc=y> <#wlatest rc=y> <#bearing> <#rrate rc=y> <#rfall rc=y> <#press rc=y> <#currentwdir> <#beaufortnumber> <#windunit> <#tempunitnodeg> <#pressunit> <#rainunit> <#windrun rc=y> <#presstrendval rc=y> <#rmonth rc=y> <#ryear rc=y> <#rfallY rc=y> <#intemp rc=y> <#inhum> <#wchill rc=y> <#temptrend rc=y> <#tempTH rc=y> <#TtempTH> <#tempTL rc=y> <#TtempTL> <#windTM rc=y> <#TwindTM> <#wgustTM rc=y> <#TwgustTM> <#pressTH rc=y> <#TpressTH> <#pressTL rc=y> <#TpressTL> <#version> <#build> <#wgust rc=y> <#heatindex rc=y> <#humidex rc=y> <#UV rc=y> <#ET rc=y> <#SolarRad> <#avgbearing> <#rhour rc=y> <#forecastnumber> <#isdaylight> <#SensorContactLost> <#wdir> <#cloudbasevalue> <#cloudbaseunit> <#apptemp rc=y> <#SunshineHours rc=y> <#CurrentSolarMax> <#IsSunny> <#feelslike rc=y>