Realtime.txt: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
no edit summary
No edit summary
No edit summary
[[Image:CumulusInternetSettingsScreen.png|thumb]] Although not technically a 'log file' it is automatically produced by Cumulus and follows a similar format to the other Log files. <br><br> 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 updated frequently. <br><br> Using Cumulus you decide how often to update the file -- for example every 15 seconds. This is then uploaded to your website and used to produce near instant readings. <br><br> To set how often the file is produced by Cumulus, click on the 'Configuration' menu then 'Internet' (Click the thumbnail opposite)
[[file:CumulusInternetSettingsScreen.png|thumb]]
Although not technically a 'log file' it is automatically produced by Cumulus and follows a similar format to the other Log files.
<br/><br/>
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 updated frequently.
<br/><br/>
Using Cumulus you decide how often to update the file -- for example every 15 seconds. This is then uploaded to your website and used to produce near instant readings.
<br/><br/>
To set how often the file is produced by Cumulus, click on the 'Configuration' menu then 'Internet' (Click the thumbnail opposite)
 
Note that from Cumulus 1.9.1 onwards, the options for uploading realtime.txt have changed. To get the realtime.txt file to upload, you need to tick all three 'enable realtime' options in the internet settings.
 
<br> Notes:
 
*The realtime.txt file is NOT a log file and is constantly replaced. It does not therefore contain any historic data.
*The realtime.txt file is NOT a log file and is constantly replaced. It does not therefore contain any historic data.
*The 'interval' sets how often Cumulus produces ''and'' uploads to the website
 
<br>
 
= Special note to Fine Offset/EasyWeather users =
 
Weather stations which come shipped with the EasyWeather software (generally known as FineOffset or Watson) should consider the realtime updating with care. The station only updates every 48 seconds, so sending realtime information to your website every 5 seconds is very wasteful. It may be better for a figure 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)
=Special note to Fine Offset/EasyWeather users=
Weather stations which come shipped with the EasyWeather software (generally known as FineOffset or Watson) should consider the realtime updating with care. The station only updates every 48 seconds, so sending realtime information to your website every 5 seconds is very wasteful. It may be better for a figure 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)
 
<br>
 
= Bandwidth Considerations =
 
In order to provide near real-time updates, Cumulus uploads a very small file at regular intervals. Typically this is 15 seconds buy depends on your 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.
 
The file Cumulus uploads is less than 1024 bytes in size, but for the calculation we will assume 1024 bytes
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 webserver.
 
<br>
 
= Where is the file used =
 
The realtime.txt is used by:
=Where is the file used=
 
*the 'gauges' page on the website produced by Cumulus
The realtime.txt is used by:
*[[CumulusRealtime]] -- the new application developed in [http://silverlight.net/ SilverLight]
*the 'gauges' page on the website produced by Cumulus
*[[CumulusRealtime]] -- the new application developed in [http://silverlight.net/ SilverLight]
*The [[WeatherConsole]] and [[Sidebar gadget]] [[:Category:AddOns|addons]]
 
<br>
 
= Format of the file =
 
{| classborder="wikitable1" borderclass="1wikitable"
|-
! style="width:60px" | Field #
! style="width:80px" | Example
! style="width:450px" | Description
! style="width:90px" | Equivalent [[Webtags]]
|-
| 1
| 19/08/09
| date (always dd/mm/yy)
| &lt;#date&gt;
|-
|1 2
| 16:03:45
|19/08/09
|date time(always dd/hh:mm/yy:ss)
| &lt;#hour&gt;:&lt;#minute&gt;
|<#date>
|-
|2 3
| 8.4
|16:03:45
| outside temperature
|time(always hh:mm:ss)
| &lt;#temp&gt;
|<#hour>:<#minute>
|-
|3 4
| 84
|8.4
| [http://en.wikipedia.org/wiki/Relative_humidity relative humidity]
|outside temperature
| &lt;#hum&gt;
|<#temp>
|-
|4 5
| 5.8
|84
| [http://en.wikipedia.org/wiki/Relative_humidityDewpoint relative humiditydewpoint]
| &lt;#dew&gt;
|<#hum>
|-
|5 6
|5 24.82
| wind speed (average)
|[http://en.wikipedia.org/wiki/Dewpoint dewpoint]
| &lt;#wspeed&gt;
|<#dew>
|-
|6 7
|24 33.20
| latest wind speed (average)reading
| &lt;#wlatest&gt;
|<#wspeed>
|-
|7 8
| 261
|33.0
|latest wind speedbearing (degrees) reading
| &lt;#bearing&gt;
|<#wlatest>
|-
|8 9
| 0.0
|261
| current rain rate (per hour)
|wind bearing (degrees)
| &lt;#rrate&gt;
|<#bearing>
|-
| 10
|9
|0 1.0
|current rain ratetoday (per hour)
| &lt;#rfall&gt;
|<#rrate>
|-
| 11
|10
|1 999.07
| barometer
|rain today
| &lt;#press&gt;
|<#rfall>
|-
| 12
|11
| W
|999.7
| current wind direction (compass point)
|barometer
| &lt;#currentwdir&gt;
|<#press>
|-
| 13
|12
|W 6
| wind speed ([http://en.wikipedia.org/wiki/Beaufort_scale beaufort])
|current wind direction (compass point)
| &lt;#beaufort&gt;
|<#currentwdir>
|-
| 14
|13
| km/h
|6
| wind units - m/s, mph, km/h, kts
|wind speed ([http://en.wikipedia.org/wiki/Beaufort_scale beaufort])
| &lt;#windunit&gt;
|<#beaufort>
|-
| 15
|14
| C
|km/h
|wind temperature units - m/s,degree mphC, km/h,degree F kts
| &lt;#tempunit&gt;
|<#windunit>
|-
| 16
|15
| hPa
|C
|temperature pressure units - degreeMB, ChPa, degreein F
| &lt;#pressunit&gt;
|<#tempunit>
|-
| 17
|16
| mm
|hPa
|pressure rain units - MB, hPamm, in
| &lt;#rainunit&gt;
|<#pressunit>
|-
| 18
|17
| 146.6
|mm
| wind run (today)
|rain units - mm, in
| &lt;#windrun&gt;
|<#rainunit>
|-
| 19
|18
|146 +0.61
| pressure trend value
|wind run (today)
| &lt;#presstrendval&gt;
|<#windrun>
|-
| 20
|19
| +085.12
| monthly rainfall
|pressure trend value
| &lt;#rmonth&gt;
|<#presstrendval>
|-
| 21
|20
|85 588.24
|monthly yearly rainfall
| &lt;#ryear&gt;
|<#rmonth>
|-
| 22
|21
|588 11.46
|yearly yesterday's rainfall
| &lt;#rfallY&gt;
|<#ryear>
|-
| 23
|22
|11 20.63
| inside temperature
|yesterday's rainfall
| &lt;#intemp&gt;
|<#rfallY>
|-
| 24
|23
| 57
|20.3
| inside [http://en.wikipedia.org/wiki/Humidity humidity]
|inside temperature
| &lt;#inhum&gt;
|<#intemp>
|-
| 25
|24
| 3.6
|57
|inside [http://en.wikipedia.org/wiki/HumidityWind_chill humiditywind chill]
| &lt;#wchill&gt;
|<#inhum>
|-
| 26
|25
|3 -0.67
| temperature trend value
|[http://en.wikipedia.org/wiki/Wind_chill wind chill]
| &lt;#temptrend&gt;
|<#wchill>
|-
| 27
|26
| -010.79
| today's high temp
|temperature trend value
| &lt;#tempTH&gt;
|<#temptrend>
|-
| 28
|27
| 12:00
|10.9
| time of today's high temp (hh:mm)
| &lt;#tTempTH&gt;
|<#tempTH>
|-
| 29
|28
| 7.8
|12:00
|time of today's highlow temp (hh:mm)
| &lt;#tempTL&gt;
|<#tTempTH>
|-
| 30
|29
| 14:41
|7.8
| time of today's low temp (hh:mm)
| &lt;#TtempTL&gt;
|<#tempTL>
|-
| 31
|30
| 37.4
|14:41
|time of today's lowhigh tempwind speed (hh:mmaverage)
| &lt;#windTM&gt;
|<#TtempTL>
|-
| 32
|31
| 14:38
|37.4
| time of today's high wind speed (average) (hh:mm)
| &lt;#TwindTM&gt;
|<#windTM>
|-
| 33
|32
| 44.0
|14:38
|time of today's high wind speed (average)gust (hh:mm)
| &lt;#wgustTM&gt;
|<#TwindTM>
|-
| 34
|33
| 14:28
|44.0
| time of today's high wind gust (hh:mm)
| &lt;#TwgustTM&gt;
|<#wgustTM>
|-
| 35
|34
| 999.8
|14:28
|time of today's high wind gustpressure (hh:mm)
| &lt;#pressTH&gt;
|<#TwgustTM>
|-
| 36
|35
| 16:01
|999.8
| time of today's high pressure (hh:mm)
| &lt;#TpressTH&gt;
|<#pressTH>
|-
| 37
|36
| 998.4
|16:01
|time of today's highlow pressure (hh:mm)
| &lt;#pressTL&gt;
|<#TpressTH>
|-
| 38
|37
| 12:06
|998.4
| time of today's low pressure (hh:mm)
| &lt;#TpressTL&gt;
|<#pressTL>
|-
| 39
|38
| 1.8.7
|12:06
| Cumulus version
|time of today's low pressure (hh:mm)
| &lt;#version&gt;
|<#TpressTL>
|-
| 40
|39
| 819
|1.8.7
| Cumulus versionbuild number
| &lt;#build&gt;
|<#version>
|-
| 41
|40
| 36.0
|819
| 10-minute high gust
|Cumulus build number
| &lt;#wgust&gt;
|<#build>
|-
| 42
|41
|36 10.03
| heat index
|10-minute high gust
| &lt;#heatindex&gt;
|<#wgust>
|-
| 43
|42
| 10.35
| [http://en.wikipedia.org/wiki/Humidex humidex]
|heat index
| &lt;#humidex&gt;
|<#heatindex>
|-
| 44
|43
| 13
|10.5
| [http://en.wikipedia.org/wiki/HumidexUv_index humidexUV Index]
| &lt;#UV&gt;
|<#humidex>
|-
| 45
|44
| 0.2
|13
| [http://en.wikipedia.org/wiki/Uv_indexEvapotranspiration UV Indexevapotranspiration] today
| &lt;#ET&gt;
|<#UV>
|-
| 46
|45
| 14
|0.2
| [http://en.wikipedia.org/wiki/EvapotranspirationSolar_radiation evapotranspirationsolar radiation] todayW/m2
| &lt;#SolarRad&gt;
|<#ET>
|-
| 47
|46
| 260
|14
| 10-minute average wind bearing (degrees)
|[http://en.wikipedia.org/wiki/Solar_radiation solar radiation] W/m2
| &lt;#avgbearing&gt;
|<#SolarRad>
|-
| 48
|47
| 2.3
|260
| rainfall last hour
|10-minute average wind bearing (degrees)
| &lt;#rhour&gt;
|<#avgbearing>
|-
| 49
|48
|2. 3
| The number of the current forecast as per [[Strings.ini]]. If the forecast is not being provided by the station and not being generated by Cumulus a value of 0 (zero) is returned
|rainfall last hour
| &lt;#forecastnumber&gt;
|<#rhour>
|-
| 50
|49
|3 1
| Flag to indicate that the location of the station is currently in daylight (1 = yes, 0 = No)
|The number of the current forecast as per [[strings.ini]]. If the forecast is not being provided by the station and not being generated by Cumulus a value of 0 (zero) is returned
| &lt;#isdaylight&gt;
|<#forecastnumber>
|-
| 51
|50
| 1
|Flag toIf indicatethe thatstation thehas locationlost ofcontact thewith stationits isremote currentlysensors in"Fine daylightOffset only", a Flag number is given (1 = yesYes, 0 = No)
| &lt;#SensorContactLost&gt;
|<#isdaylight>
|-
| 52
|51
| NNW
|1
| Average wind direction
|If the station has lost contact with its remote sensors "Fine Offset only", a Flag number is given (1 = Yes, 0 = No)
| &lt;#wdir&gt;
|<#SensorContactLost>
|-
| 53
|52
| 2040
|NNW
| Cloud base
|Average wind direction
| &lt;#cloudbase&gt; (value and units combined)
|<#wdir>
|-
| 54
|53
| ft
|2040
| Cloud base units
|< &lt;#cloudbase>&gt; (value and units combined)
|-
| 55
|54
| 12.3
|ft
| Apparent Temperature
|Cloud base units
| &lt;#apptemp&gt;
|<#cloudbase> (value and units combined)
|-
| 56
|55
|12 11.31
| Sunshine hours so far today
|Apparent Temperature
| &lt;#SunshineHours&gt;
|<#apptemp>
|-
|56
|11.1
|Sunshine hours so far today
|<#SunshineHours>
|-
| 57
| 420.1
| Current theoretical max solar radiation
|< &lt;#CurrentSolarMax>&gt;
|-
| 58
| 1
| Is it sunny? 1 if the sun is shining, otherwise 0
|< &lt;#IsSunny>&gt;
|}
 
= 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)''
 
<br> <tt>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</tt>
 
= Recreating the file using webtags =
<tt>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</tt>
 
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.
=Recreating the file using webtags=
 
This can be achieved by creating a template file using the webtags 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.
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.
 
Note that there are currently two small differences between the built-in realtime.txt and this version. With this version:
This can be achieved by creating a template file using the webtags 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.
 
*The Beaufort wind speed will have a 'F' prefix (eg F2) which is omitted in the built-in version.
Note that there are currently two small differences between the built-in realtime.txt and this version. With this version:
* The Beauforttemperature windunit speedis willprefixed havewith athe string 'F&amp;deg;' prefix (eg F2) which is omitted in the built-in version.
* The temperature unit is prefixed with the string '&amp;deg;' which is omitted in the built-in version.
 
''(this is one complete line, although it may appear on this page as two or more due to screen width restrictions)''
 
<tt><&lt;#date format=dd/mm/yy>&gt; <&lt;#timehhmmss>&gt; <&lt;#temp>&gt; <&lt;#hum>&gt; <&lt;#dew>&gt; <&lt;#wspeed>&gt; <&lt;#wlatest>&gt; <&lt;#bearing>&gt; <&lt;#rrate>&gt; <&lt;#rfall>&gt; <&lt;#press>&gt; <&lt;#currentwdir>&gt; <&lt;#beaufort>&gt; <&lt;#windunit>&gt; <&lt;#tempunit>&gt; <&lt;#pressunit>&gt; <&lt;#rainunit>&gt; <&lt;#windrun>&gt; <&lt;#presstrendval>&gt; <&lt;#rmonth>&gt; <&lt;#ryear>&gt; <&lt;#rfallY>&gt; <&lt;#intemp>&gt; <&lt;#inhum>&gt; <&lt;#wchill>&gt; <&lt;#temptrend>&gt; <&lt;#tempTH>&gt; <&lt;#TtempTH>&gt; <&lt;#tempTL>&gt; <&lt;#TtempTL>&gt; <&lt;#windTM>&gt; <&lt;#TwindTM>&gt; <&lt;#wgustTM>&gt; <&lt;#TwgustTM>&gt; <&lt;#pressTH>&gt; <&lt;#TpressTH>&gt; <&lt;#pressTL>&gt; <&lt;#TpressTL>&gt; <&lt;#version>&gt; <&lt;#build>&gt; <&lt;#wgust>&gt; <&lt;#heatindex>&gt; <&lt;#humidex>&gt; <&lt;#UV>&gt; <&lt;#ET>&gt; <&lt;#SolarRad>&gt; <&lt;#avgbearing>&gt; <&lt;#rhour>&gt; <&lt;#forecastnumber>&gt; <&lt;#isdaylight>&gt; <&lt;#SensorContactLost>&gt; <&lt;#wdir>&gt; <&lt;#cloudbase>&gt; <&lt;#apptemp>&gt; <&lt;#SunshineHours>&gt; <&lt;#CurrentSolarMax>&gt; <&lt;#IsSunny>&gt;</tt>
 
[[Category:Log FilesLog_Files]]

Navigation menu