The CSV event file importer is designed to provide a way to upload one-off data for sites not currently monitored by MPEC loggers. This tool can be accessed via the sites tab and is listed under the actions menu next to each site.
Event files must be formatted using the following guidelines;
File Structure
File header
The file must start with the site name, on line 1. No other information is required.
Line 2 must be blank
Files created in Excel will add in extra commas on lines 1 and 2, these can be safely left in.
Event information
The first event must start on line 3. Each line should have the following form:
- Date, represented in DD/MM/YYYY form (e.g. 30/01/2015). The date must be in GMT.
- Time must be represented in 24-hour GMT including milliseconds in the form HH:MM:SS.sss (e.g. 17:01:51.012). Appending :G (as in an hour file) is not required and will be ignored when read by Centrix.
- Relay name must be entered exactly as it is in Centrix. Any unrecognised relays will be created in Centrix. Any spare channels or unnamed channels will be ignored.
- State/Transition must be entered in one of the following forms: UP, DN, UP to DN, DN to UP. This field can be left blank to indicate an info event.
- UP and DN represents an initialisation state for the channel
- UP to DN and DN to UP represent state transitions for the channel
All fields must be separated by single comma. Spaces are not required. A trailing comma is not required but will be removed automatically when read by Centrix.
Files created in Excel may add an extra comma to each event line, this can be safely left in.
Additional information
File must be saved as .csv, any other file type will be not be uploaded.
If an event already exists for a relay at the time listed in the file, that event will be marked as duplicate and not uploaded.
Warnings
Chronological order
Channel initialisation
Function testing
One of the purposes of the CSV event upload is to allow testing of functions (e.g. virtual channels or alerts). If you are using the functionality for this purpose you should ideally use a test site to upload the data to rather than the actual live site. There is currently no means to delete or undo any data upload, so once the data is uploaded it will remain there.
As there is no means of removing data and bearing in mind that events should be imported in chronological order, it is recommended that if you wish to run the same data set for testing the you should increment the time frame of the data in the CSV file each time you run the test. This will ensure that the data set doesn't overlap the previous test data which may cause invalid test results.