The info on this page is for OED version 0.8.0. See "Help versions" menu at top of page for other versions.

Admin Meter Import (Help)

Overview

This page describes the process of importing meters into OED via a CSV file. See the general CSV import page for an overview and information common to all CSV imports.

Usage

The information needed to upload meters is the same whether done via the web page or direct file upload. The web page looks as follows:

admin CSV meter page

Required and optional information

Meter CSV file format

If the file has a header row then it should be:
name,ipaddress,enabled,displayable,type,timezone,gps,identifier,note,area,cumulative,reset,reset start,reset end,gap,variation,duplicates,timesort,end only,reading,start time,end time
More information on the first set of columns/values are described on the admin meter viewing page and the later ones are the meter defaults for reading input and described on the admin reading import page.
Each following line should contain the values for one meter. Most values can be skipped where the default value for OED will be used. A brief description of each value is in the following table:

Meter value Description Default value
name The internal name of a meter none, must be provided and unique
ipaddress The IP address to pull data from some meters none but optional
enabled True if OED will automatically acquire meter data (if possible) None, must be true or false
displayable Can users see this meter and its data None, must be true or false
type The type of meter data, other is used for ones not listed none, must be mamac, metasys, obvius or other
timezone The timezone of this meter as text. OED can accept most standard time zone names such as this Wikipedia one where the "TZ database name" is used, e.g., Pacific/Galapagos for the Galápagos Islands none
gps The GPS coordinates of this meter input as latitude, longitude pair (without parentheses or quotes but separated by a comma) none
identifier The name shown users for this meter none, must be provided and unique
note Information admins want to store about this meter empty
area The area associated with this meter none
cumulative true if reading are treated as cumulative for this meter false
reset true if the cumulative readings reset to zero at times false
reset start The earliest time of each day that cumulative reset can occur 00:00:00, meaning it can start at any time during the day
reset end The latest time of each day that cumulative reset can occur 23:59:59.999999, meaning it can end at any time during the day
gap How many seconds are considered normal between the end of one reading and the start of the next reading 0.0
variation How may seconds the length of one reading can vary for the length of the next reading 0.0
duplicates How many times a reading will occur in a row where 1 means no duplicates (the most common) 1
timesort increasing if readings are supplied so later ones are later in time and decreasing if reverse increasing
end only true if each reading only has an end date/time stamp and no start time stamp false
reading The value of the last reading seen by this meter and normally set by OED automatically 0.0
start time The start date/time stamp of the last reading seen by this meter and normally set by OED automatically 1970-01-01 00:00:00
end time The end date/time stamp of the last reading seen by this meter and normally set by OED automatically 1970-01-01 00:00:00

Sample file

Below are the lines for a CSV meter import file with a header row. It will import two meters (Meter 1 and Meter 2) where the meters are not enabled but are displayable. Please note that "1.2, -3.4" is a pair of values separated by a comma that would be in a single column of the CSV file and input without the quotes, i.e., 1.2, -3.4. The quotes are added when such a CSV is saved to make it clear that the comma is not a new column. Most values that are optional and unspecified so the default values are used. This meters.csv was loaded using the curl command of:
curl https://myoedserver.come:3000/api/csv/meters -X POST -F 'headerRow=true' -F 'gzip=false' -F 'email=csvuser@myorg.com' -F 'password=csvuserpassword' -F 'csvfile=@meters.csv'
assuming the shown URL, user email and password. (See admin reading sample files for more information on URL, email and password.) You need to reload the OED web page so your browser is aware of the new meters but you will get an empty graphic if used since they don't have any data.

        name,ipaddress,enabled,displayable,type,timezone,gps,identifier,note,area,cumulative,reset,reset start,reset end,gap,variation,duplicates,timesort,end only,reading,start time,end time
        Meter 1,,FALSE,TRUE,other,,,Student Dorm,This dorm has 20 students,13418,,,,,,,,,,,,
        Meter 2,,FALSE,TRUE,other,America/Halifax,"1.2, -3.4",Athletic facility,,,,,,,,,,,,,,
    

Return messages

What follows are the common messages returned from a meter upload along with their meaning:

Details

Note that for efficiency reasons and because it is uncommon for the meters to change, OED does not automatically recheck for new meters when doing graphing. If you add new meters, there are two ways to get them to be available for graphing:

  1. You can visit the Meters viewing page if logged in as an admin. This page works directly with meter information and it does recheck for updates. Once this is done, any new meters will also be available for graphing. This is the fastest/easiest way to do this.
  2. You can refresh the web browser page with OED. This will cause it to return to the initial state with updated information. However, you will lose all unsaved changes along with any selected meters/graphics meaning you are restarting from scratch. This is probably only desireable if someone who is not an admin needs to see the meter changes right away.