Category:Cumulus MX: Difference between revisions

m
 
*5. ''Realtime.txt upload''
** Cumulus MX can be set to recreate a file called [[Realtime.txt]] on a very frequent basis. The real time interval defines the time from the end of doing one real time update until the start of the next real time update. The file is recreated, in that unlike other log files, MX does not add new rows in each update, the file only ever contains a single line of values.
** This feature allows you to upload the file that Cumulus recreates on the most frequent basis. *MX does not use thethis realtime.txt file in any of its supplied components, so that file by default is not available on your web server.
**There is an option elsewhere (Internet Settings screen) to upload this log file.
**This option*There is anthe ability elsewhere (Internet Settings alternativescreen) to havingupload thatthis log file onto your web server, insteadshould MXyou updateswish ato databaseuse tableit. InThe thismost optioncommon MXuse will putis intoas a databasesource tablefor row,Ajax the(JavaScript samebased) valuesupdating itof canweb putpages intoon thatthe logsame filevery onfrequent recreationbasis.
**The option being described here is an alternative to having that log file on your web server, instead MX in this option MX updates a database table, adding a new row at the same very frequent interval.
#If you don't have a table in your database for this upload, first
***In this standard option, where you cannot specify which columns to include, MX will put into a database table row, the same set of values it would put into that log file on recreation.
***It is important to stress, this database table has rows added, so it is not equivalent to the uploaded file that contains a single line.
#If you don't already have a table in your database with the right columns for this upload, first
#* Choose Table name - the default table name is "Realtime", but you can choose any other name
#*Now move down the screen and click the '''Save''' button, and wait for MX to pop up '''Settings Saved''' message
 
*6. ''Custom upload - seconds interval''
** This feature allows you to specify your own SQL for an upload to be repeated every NN seconds. This caters for when you want something like the values in "realtime.txt" but want to specify your own schema (set of column names) or your own interval between updates (independent of what has been selected for real-time interval). Like the other custom options, this might be because you have extra sensors or do not have sensors for all items in standard log file.
**Apart from the Save button below all options, there are 3 items specifically for this option:
**# A tick box to enable or disable this upload (so you can leave the SQL recorded in Cumulus.ini for when you want to use it again, but start/stop running it as and when you like).
**# The SQL you want to run, it should include INSERT IGNORE (or REPLACE or UPDATE) to insert a row, the name of the table, the columns to be updated and the values you include in your SQL are expressed as web tags. You can have more than one SQL statement in this box (end each with semi-colon) so you might want to add a delete "DELETE FROM YourTableName WHERE LogDateTime < DATE_SUB(NOW(), INTERVAL 7 DAY);" after your update/insert command to replicate the retention option of the previous feature, in this case deleting rows over a week old.
**# The number of seconds between runs, the default is 10, but if your weather station updates less frequently, maybe you will choose 40 or 60 as the interval. In theory the number of seconds specified here might represent anything between how frequently your weather station reports readings and several hours.
5,838

edits