Category:Cumulus MX: Difference between revisions

m
→‎Optional Sections: Minor resequencing of sentances
m (→‎Optional Sections: Minor resequencing of sentances)
*3.''Monthly log file upload''
**Cumulus starts a new log file for each new month, that is why this is called the monthly log.
**This database table has one row for each line in thatany monthly log and therefore the same table contains all months.
** This feature takes the set of values that MX has just added to the monthly log file, and soon afterwards if this feature is enabled, MX inserts those same values into a new row in a database table.
#If you don't have a table in your database for this upload (skip to step after SQL if you do), first
#* Choose Table name - the default table name is "Monthly", but you can choose any other name
#* Enable - tick here when you are ready for this action [using the schema (set of column names) in the SQL quoted above] to happen automatically.
#* Now move down the screen and click the '''Save''' button, and wait for MX to pop up '''Settings Saved''' message.
*#* The upload you select here will happen every time MX creates a new line in the monthly log file, it might be every 10 minutes, but you may have configured a different interval.
# NowSeparately, to populate your table with past rows:
#* If you are using Windows, open a command window in the folder where "CumulusMX.exe" is found. Type <tt>ExportMySql.exe monthly</tt>
#*If you are using another operating system, send the following instruction to the terminal in the folder where you installed MX. <tt>sudo mono ExportMySql.exe monthly</tt>
** The upload you select here will happen every time MX creates a new line in the monthly log file, it might be every 10 minutes, but you may have configured a different interval.
 
 
**Apart from the need to press the Save button that follows all the options, there are 3 items just for this option:
**# A tick box to enable or disable this upload (so you can leave the SQL recorded, but stop running it when you like.
**# The SQL you want to run, it should include INSERT IGNORE (or REPLACE or UPDATE) to insert/replace/update a row, include (as all SQL needs) the name of the table, include the columns to be updated and include the values either expressed as web tags or derived from a sub-query.
**# A drop down for the number of minutes between runs, the default is 10, but if your weather station updates less frequently, maybe you will choose 15, 20, 30, or 60 as the interval out of the 11 available in drop down.
 
 
*5. ''Realtime.txt upload''
** This feature allows you to upload the file that Cumulus recreates on the most frequent basis. MX does not use the 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 file, but an alternative is to get MX to put the values it would put into that file into a database table and this option is to do that.
**There is an option elsewhere (Internet Settings screen) to upload this log file.
**This option is an alternative to having that log file on your web server, instead MX updates a database table. In this option MX will put into a database table row, the same values it can put into that log file on recreation.
#If you don't have a table in your database for this upload, first
#* Choose Table name - the default table name is "Realtime", but you can choose any other name
 
#With the table existing, there are 3 steps left:
# Enable - tick here when you are ready for this action [using the schema (set of column names) in the SQLcreating quotednew above]rows to happen automatically.
# AEnter in the text box where you enter a retention string in format '''retainVal=NNN retainUnit=XXXX''' where NNN is a number from 1 to 3 digits long, and XXX is a time unit e.g. second, minute, hour, day, week, month, quarter, or year.
#* Because the updates are so frequent this database table grows very quickly, and you need to say when it should delete the older rows so the table never has too many rows. If you think about it, after a few days, you probably do not need to look at this very detailed level of values information within a day. In that case set retention to delete after a few days ''retainVal=3 retainUnit=day''.
# 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 own interval between updates. In theoryLike the numberother ofcustom secondsoptions, specified herethis might representbe anythingbecause betweenyou howhave frequentlyextra yoursensors weatheror stationdo reportsnot readingshave andsensors severalfor hoursall 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, but stop running it 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.
 
=== Alarms ===
5,838

edits