Realtime.txt: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
2,704 bytes added ,  16:49, 18 September 2022
m
Start to make the page more MX friendly
mNo edit summary
m (Start to make the page more MX friendly)
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Template:Version badge Mx}}{{Version badge 1}}This Wiki page applies to both Cumulus flavours.[[Category:Cumulus MX]][[Category:Cumulus Files]][[Category:MX txt Files]][[Category:Cumulus 1]]
{{Template:Version badge Mx}}{{Version badge 1}}This Wiki page applies to both Cumulus flavours.
 
 
[[Category:Cumulus Files]] [[Category:MX_txt_Files]]
This Wiki page describes one of the  [[:Category:Cumulus Files|files]] that Cumulus can optionally generate. 




= List of fields in the file =
= List of fields in the file =


The list below represents the MX field list.  
The list below represents the field list for the final 1.9.4 version of Cumulus, (and releases of MX before 3.7.0).


The final 1.9.4 version of Cumulus, (and releases of MX before 3.7.0) omit the final field shown below.
For historic interest, old versions of Cumulus 1 had fewer fields; although the table does not indicate the version at which each field was added, you can click the '''History''' tab and look at the early edits.
For historic interest, old versions of Cumulus 1 had fewer fields; although the table does not indicate the version at which each field was added, you can click the '''History''' tab and look at the early edits.
{| border="1" class="wikitable"
{| border="1" class="wikitable"
Line 304: Line 307:
| Is it sunny? 1 if the sun is shining, otherwise 0 (above or below [[Cumulus.ini_(Cumulus_1)#Section:_Solar |threshold]])
| Is it sunny? 1 if the sun is shining, otherwise 0 (above or below [[Cumulus.ini_(Cumulus_1)#Section:_Solar |threshold]])
| <#IsSunny>
| <#IsSunny>
|}
==Fields added with later releases of MX ==
Please be aware that MX develops very rapidly, and there is a lack of contributors to the Wiki, so the information here may be out of date.
{| border="1" class="wikitable"
|-
! style="width:60px" | Field number
! style="width:80px" | Example content
! style="width:450px" | Description
! style="width:90px" | Equivalent [[Webtags|web tag]] if your locale/region uses decimal points<br> See [[#MX web tags]] for equivalents in latest MX releases.
|-
|-
|59 (only included for release 3.7.0 and later)
|59 (only included for release 3.7.0 and later)
Line 310: Line 325:
|&lt;#feelslike&gt;
|&lt;#feelslike&gt;
|}
|}
= Bandwidth Considerations =
Most internet providers now place a limit on the amount of Bandwidth you can consume each month. Bandwidth is a figure representing the quantity of data you can upload and download. The various uploads done by Cumulus will have a huge impact on your allowance if you choose to upload at very frequent intervals.
* Sizing guidance for the legacy Cumulus (1) uploads:
** The "realtime.txt" file the 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, see [[#Special note to Fine Offset/EasyWeather users]]) updated every 5 to 15 seconds depending on your [[#Enabling generation of this file in MX|'Realtime interval' setting]].  1 kilobyte every 10 seconds represents 144 kB a day. 
** Uploading [[FAQ#What_is_the_size_of_the_standard_Cumulus_update.3F|the realtime.txt plus the standard templates]] represents about 90 MB per day (based on uploading only every 10 minutes).
* Sizing guidance for MX uploads:
** For Cumulus MX, the optional '''realtime.txt''' file is at least 262 bytes, (a lot of the content never changes, but if you have enabled generation and upload of this file, the whole file is uploaded every time), so still smaller than that 1024 bytes, and therefore still less than 1.5 MB a day even if uploaded every second.
** The [[SteelSeries Gauges]] web page is often supplied with data every second, (34 560 times a day), that represents a minimum of 110 MB per day, as the mandatory file '''realtimegaugesT.txt''' is 2.2 kiloBytes (kB).
** MX graph drawing uses assorted [[:Category:JSON_Files|*.json]] files which add up to several megabytes (MB) at every upload (compared against the highly compressed legacy Cumulus graph images of 400 kB per upload). So assuming these .json files are uploaded at the standard interval and that is set to 1 minute, just for graph plotting, MX requires a further 150 to 350 MB per day, this is dependent on various settings (e.g. data period represented on graphs, which graphs are being plotted).
** For the other web pages, the file concerned is [[websitedataT.json]] which is 31.5 kB, and if that is uploaded every minute, that adds about 50 MB a day.
** Don't forget that you may have files uploaded at end of day, you may be sending files to third party sites, to home automation, and be uploading [[MySqlConnect|SQL commands]], all these need to be multiplied by how often they are sent in a day, and then included in your calculation where relevant.
On top of your internet connection bandwidth restrictions, you may also have bandwidth caps on your database, or web, servers so this same figure should be considered for your various servers.




Line 322: Line 355:


There are two key points to understand about the source for generation of the file:  
There are two key points to understand about the source for generation of the file:  
#First is that a [[Cumulus template file]] is held internally in the Cumulus code that can generate this file with some standard content as [[#List of fields in the file|listed here]]
#First is that a [[Cumulus template file]] is held internally in the Cumulus code that can generate this file with some standard content as [[#List of fields in the file|listed in table above]]
# Second is that this internal template, regardless of any locale (or region) settings, always generates the file so that it is readable by [[PHP#Incorporating_Script|script languages]] that expect a full stop to separate the integer part of any real number from the decimal part of that real number.
# Second is that this internal template, regardless of any locale (or region) settings, always generates the file so that it is readable by [[PHP#Incorporating_Script|script languages]] that expect a full stop to separate the integer part of any real number from the decimal part of that real number.


Information about the default generated file:
Information about the default generated file:
* As hinted above, the generation of the file requires you to set various options, see [[#Generation of this file]]
* As hinted above, the generation of the file requires you to set various options, see [[#Generation of this file]]
* There is no functionality, included in any Cumulus software that you download, that requires this file to exist
* The '''realtime.txt''' is generated as a text file with a single line of ''space'' separated values.  
* The '''realtime.txt''' is generated as a text file with a single line of ''space'' separated values.  
* The file contains a list of key values of the sensors
* The file contains a list of key values of the sensors
Line 337: Line 371:
Some users, and some third-party supplied web pages, require fewer, or more, fields than those provided in the standard '''realtime.txt''' file.
Some users, and some third-party supplied web pages, require fewer, or more, fields than those provided in the standard '''realtime.txt''' file.


Arranging this is easy, the content of the file that Cumulus uploads to an external site can be tailored to the needs of whatever you choose.  
Arranging this is easy, the content of a file, that Cumulus uploads to an external site for you, can be tailored to the needs of whatever you choose.  


All you need to do is create your own [[Cumulus template file]], sometimes called ''realtime-xT.txt'' (to indicate it is an e''X''tra file, a ''T''emplate file and is related to ''realtime''.txt), you can place this file in the [[web folder]], and ask Cumulus to process that file for you:
All you need to do is create your own [[Cumulus template file]], sometimes called ''realtime-xT.txt'' (to indicate it is an e''X''tra file, a ''T''emplate file and is related to ''realtime''.txt), you can place this file in the [[web folder]], and ask Cumulus to process that file for you:
* [[File:Badge v1.png]]  
* [[File:Badge v1.png]] Legacy software versions:
*# Create the template file picking the web tags you want to include from:
*# Create the template file picking the web tags you want to include from:
*#*  If you use decimal commas, the list [[Webtags#CURRENT_CONDITIONS:|here]]
*#*  If you use decimal commas, the list [[Webtags#CURRENT_CONDITIONS:|here]]
*#* If you use decimal points, the list [[Webtags#Current_Conditions|here]]
*#* If you use decimal points, the list [[Webtags#Current_Conditions|here]]
*# Arrange for the processing and uploading by using the Cumulus Configuration|Internet|Files dialog.  
*# Arrange for the processing and uploading by using the Cumulus menu selections: '''Configuration''' &rarr; ''Internet'' &rarr; '''Files''' tab dialog. [[File:Cumulus Internet Settings Files.png|Right]]
*#* Type in the name you have used for your template file in ''Local Filename''
*#* Type in the name you have used for your template file in ''Local Filename''
*#* Tick the ''Process?'' checkbox,  
*#* Tick the ''Process?'' checkbox,  
Line 350: Line 384:
*#* Finally, supplying a remote path and filename that you want created remotely, you can call it "realtime.txt" after the path name if you like
*#* Finally, supplying a remote path and filename that you want created remotely, you can call it "realtime.txt" after the path name if you like
* [[File:Badge vMx.png]] From build 3075 onwards, all decimal web tags now support the "rc=y" modification parameter.
* [[File:Badge vMx.png]] From build 3075 onwards, all decimal web tags now support the "rc=y" modification parameter.
*# Create the template file based on the list of web tags in the code snippet below. If you are unsure what they represent, look [[Webtags#Current_Conditions|here]].
*# Create the template file based on the list of web tags in the code snippet [[#MX web tags|below]]. If you are unsure what they represent, look [[Webtags#Current_Conditions|here]].
*# Arrange for the processing and uploading by using the '''Extra web files''' page in the [[MX_Administrative_Interface#Extra_Web_Files|interface]], follow the instructions in that link, ticking the ''Process?'' checkbox, and the ''Realtime?'' checkbox
*# Arrange for the processing and uploading by using the '''Extra web files''' page in the [[MX_Administrative_Interface#Extra_Web_Files|interface]], follow the instructions in that link, [[File:Extra web settings.png|Right]] ticking the ''Process?'' checkbox,  the ''Real Time?'' checkbox, and the '''UTF8''' checkbox (as shown in first row in image)




Line 398: Line 432:
*The uploading interval is the same as the file creation interval.
*The uploading interval is the same as the file creation interval.


 
means that most of it gets very out of date, as MX is develo
<br>
<br>
 
== Bandwidth Considerations ==
 
The file Cumulus (1 or MX) 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, see [[#Special note to Fine Offset/EasyWeather users]]) 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.
 


= Special note to Fine Offset/EasyWeather users =
= Special note to Fine Offset/EasyWeather users =
5,838

edits

Navigation menu