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

Admin Meter Import (Help)

Note: These features are only available to select people who oversee the OED site (called admins) so these features are not usually of interest to a general user.

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

Meters in OED store a lot of information about them so there are many possible values. If the CSV file has a header row then it should be:
name,url,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,previous end,unit,default graphic unit,area unit,reading freq.
Currently OED does not use the header row so the names are not crucial but OED may do so in the future so using these column header names is a good idea. Detailed information on the columns/values are described on the admin meter creating page. The order of the items is somewhat different than those specified for the header row above. Each following line should contain the values for one meter in exactly the order listed for the header row example above. The column can be blank where the default value for OED will be used if the meter creation information does not indicate it is required. Information needed for CSV upload compared to the meter creation page information are:

Many spreadsheet programs automatically format text that looks like a time or date into a different format. In general, to avoid this, one should set those fields to be text rather than a time or date. If this is not done then you will likely get a format error or unexpected data when you upload a CSV file.

If you upload a CSV that has missing or incorrect values then it could cause issues. However, some values will be noted with red boxes when you edit this meter and then it can be corrected. For example, if you put in an area but not a unit this will happen. If you have any doubts then it is a good idea to look at the values on the meters page to verify they are what you wanted.

Sample file

Below are the lines for a CSV meter import file with a header row and available in this meters.csv file. It will import two meters (Meter 1 and My Place (identifier) or Meter 2 (name)) where the meters are not enabled but are displayable. Please note that "3,5" 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., 3,5. 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 for Meter 1 but are provided for the second meter. Also note that values that are "yes" on dropdown menus for meter creation must be "true" and values that are "no" must be "false" in this file (but not the curl command). This file can be loaded using the curl command of:
curl https://myoedserver.com:3000/api/csv/meters -X POST -F 'headerRow=yes' -F 'gzip=no' -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 after a curl import but you will get an empty graphic if used since they don't have any data yet.

        name,url,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,previous end,unit,default graphic unit,area unit,reading freq.
        Meter 1,,false,yes,other,,,,,,,,,,,,,,,,,,,Electric_Utility,,,
        Meter 2,127.0.0.0,false,true,obvius,Pacific/Galapagos,"3,5",My Place,special note,123,true,true,11:50,12:10,5,10,2,decreasing,true,,,,,Electric_Utility,kWh,meters,13:00
    

Return messages

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

Details

See meters after CSV uploaded via direct file upload

You need to reload your web browser pages as described here.