OED Developer Documentation

Test Data

This information is for developers of the OED software so this information is not usually of interest to a general user.

The update to the Redux Toolkit (RTK) is not yet reflected in the documentation. As a result, some information may be out of date.

Developers want to have test meter data for OED development that is consistent, stable and does not require having access to actual meters. This describes how to get and load such meter test data along with related groups, units & conversions.

Prerequisites

What follows assumes you have a properly installed and working OED but have not yet loaded in the reading data described here. If they have already been loaded then the loading step for that meter will be skipped. At a minimum you should be able to see the main OED page in a web browser (normally URL of localhost:3000). Normally the database is automatically created and works fine. If you get errors about the database then you need to address them before you can do this or get the test data in (if you get errors during this process).

Inserting the standard OED test data

The simple and mathematical test data is created in OED by doing the following (they are described later):

  1. Make sure you have OED running so it is available to do the necessary work.
  2. Open a terminal in the web/vsc Docker container by right clicking on the web container in the Docker extension of VSC and attaching a shell. (Described in the getting started directions)
  3. In the terminal, run the command npm run testData. This may take a few minutes but when it completes there should be new meters with data, new groups, the DB structures are all updated and the CSV files used will be removed unless there was an error. This generates all the standard test data except the one where readings are every minute since that is a large dataset that is less frequently used. See the next step before you can use the new OED information within the OED web page.
  4. As we update OED pages, the code is avoiding reloading Redux state every time. Thus, to see all the changes in Redux state and to get the array for graphing units, you need to reload an existing OED web page. Once done you should see all the test meters/groups and data as described below. If this does not happen then an error likely occurred so carefully look at the output in your terminal that you used above.

If you only want to load some of the data (not the common usage), you can look at package.json for the individual commands to insert the mathematical data. The others are so small/fast that they are done as above. See Mathematical test data section below.

Comparison data

When you do a compare graph, you choose how far from current time you compare. As a result, you need current readings and ones immediately before that time to get data for the comparison graph. If you are using meter data that does not have this, you will need to create it. Here is how to do it:

  1. Get the timezone of your local machine (not the Docker container for OED) by doing this in the terminal: date +%Z. For what follows the timezone is assumed to be CDT but you should change if your timezone differs.
  2. If you want to be extra careful, check the time in Postgres. Open a Postgres terminal by attaching a shell to the database container in a similar way to how you did it above for the web container. Once inside the database shell, do: psql -U oed to access the database terminal and do the following within this terminal. Verify timezone is correct by doing: select clock_timestamp() at time zone 'CDT';. Make sure that it shows the same time as on the clock on your computer that you found in the previous step and replace CDT with the timezone using. You can now quit postgres by doing: \q
  3. Open a terminal by attaching a shell to the OED web container as was done earlier in this file.
  4. In the web terminal do:
    node -e 'require("./src/server/util/developer.js").shiftReadings("meter name", "CDT")'
    Where "meter name" is replaced with the meter you want to shift and still use the double quotes. Similarly, CDT should be the timezone found above. The console will show (the shift value will be different):
    	shifting meter "meter name" to timezone "CDT"
    	The readings were shifted by:  10 days
    	refreshing all views since readings changed
    	[INFO@2023-10-03T02:05:08.194+00:00] Refreshing All Reading Views...
    	
    	[INFO@2023-10-03T02:05:08.196+00:00] Refreshing Materialized Daily Reading Views
    	
    	[INFO@2023-10-03T02:05:08.197+00:00] Refreshing Materialized Hourly Reading Views
    	
    	[INFO@2023-10-03T02:05:14.231+00:00] Daily View Refreshed
    	
    	[INFO@2023-10-03T02:05:19.900+00:00] Materialized Hourly View Refreshed
    	
    	[INFO@2023-10-03T02:05:19.902+00:00] ...Views Refreshed!
    			
  5. If you don't want to refresh the readings (then cannot graph the new data but useful if shifting lots of meters until the last one) then add a third parameter of false:
    node -e 'require("./src/server/util/developer.js").shiftReadings("meter name", "CDT", false)'
  6. You need to refresh the web page with OED to see the new compare values of shifted data.

This process can be repeated as often as desired to keep the readings current. If you give an incorrect meter name that does not exist then an error similar to the following will appear:

	[ERROR@2023-10-02T22:56:40.591+00:00] Unhandled Promise Rejection: TypeError: Cannot read properties of null
	(reading 'humanize')
	Stacktrace:
	TypeError: Cannot read properties of null (reading 'humanize')
	at Object.shiftReadings (/usr/src/app/src/server/util/developer.js:36:71)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	
	(node:288) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1)
	(Use `node --trace-warnings ...` to show where the warning was created)
		

The following figure shows the result after shifting the three amp meters to current time and then doing a comparison graphic for 1 week. There is no difference between the meters since they all have the same shape and only scaling of the readings. comparison graphic for 1 week of amp meters.

Map data

The following assumes you have loaded the test data into your development OED system. You can use other meter data if you prefer.

Please use the admin map creating documentation for information on how to load and calibrate a map. This page only describes the necessary details of the test map. You need to be logged in as an admin to complete these steps.

Use the sample Happy Place map by downloading it. This is the map you upload into OED. We will call it "Happy Place" and you can use that name in OED or some other name. The map angle is 0.0 degrees.

During the calibration step, you will use a mythical GPS coordinate system of (0-30, 0-50) which are real GPS values but not usual for a map. This large area works because we will make a perfect calibration with no error. This means the lower, left corner of the map has GPS coordinate (0, 0) and the top, right has GPS coordinate (50, 30). The Plotly grid has values of (0, 0) for lower, left and (300, 500) for the top, right. This means the coordinates are reversed for GPS (latitude, longitude) compared to the grid (x, y) and are a factor of 10 smaller. During calibration, click on three places on the map. In principle it does not matter where but three spread out places on the map is better normally. When you do that, OED will show the grid coordinate you clicked on. As just explained, you need to reverse the coordinates and divide by 10. Thus, if you are told "input GPS coordinate that corresponds to the point: x: 277, y: 461 in this format -> latitude,longitude" then you enter "46.1, 27.7" for the GPS value in the box and submit. Repeat this 3 times and you should then see an error of 0% for both directions. If not, start over. If yes, then save changes to the database.

The following meters and groups will automatically be placed at these locations:

  • Sin Amp 1 kWh at Play Place
  • Sin Amp 2 kWh at Swimming Pool
  • Sin Amp 1 kWh at Theater
  • Sin Amp 1 + 2 kWh (group) at Cafeteria
  • Sin Amp 2 + 3 kWh (group) at Housing

If all went well, you should now see the following on the map page. what the Happy Place map should look like

Rotated map

Sometimes you want to test a rotated map. In this case use Happy Place 30 Deg map that was rotated by 30 degrees. This does not impact the GPS coordinates but means the simple correspondence between the OED grid and GPS no longer holds. During calibration, use these points:

  • Bottom, right of Swimming Pool at coordinate 265, 342 with GPS value of 39.5, 27.7
  • Bottom, right of Theater at coordinate 217, 234 with GPS value of 23.7, 29.3
  • Bottom, right of Cafeteria at coordinate 85, 252, with GPS value of 17.0, 12.7

This will give: result: x: 3.127%, y: 0.647%. If you switch to this map then you should see the following Where items are shown at the same location but the map is rotated. what the Happy Place 30 Degree map should look like

Simple Test Data

Meter data

The simple/basic test data is not representative of real meter data nor mathematical but it is easy to use. Each meter has readings for five days and the line graphs should be a straight line. The following table gives the expected values for the line graphs for all units for these simple meters where NA indicates that unit is not allowed/not compatible. The item for each meter/row that is marked with a * indicates the default graphic unit if one is not already selected. All values are for per hour for the rate. Note kW and kWh are not impacted by a rate change. The Gallon and Gallon flow are available for testing the rate choices.

The table also contains the mathematical test data in the lower part.

Meter nameDatesNoteskWhBTUMJM3 Gas100 W bulbUS DollarEurokgMetric tonkg of CO2Metric ton of CO2FahrenheitCelsiuskWGallonLiterGallon per minuteLiter per hour
Electric Utility kWh6/1-5/2021graphs as raw meter data1 - 5*3412.08 - 17060.43.6 - 189.32e-2 - 0.4661-50.115 - 0.5750.1012 - 0.506NANA0.709 - 3.5457.09e-4 - 3.545e-3NANANANANANANA
Electric Utility kWh not displayable6/1-5/2021graphs as raw meter data; only if admin1 - 5*3412.08 - 17060.43.6 - 189.32e-2 - 0.4661-50.115 - 0.5750.1012 - 0.506NANA0.709 - 3.5457.09e-4 - 3.545e-3NANANANANANANA
Electric Utility kWh 2-66/1-5/2021graphs as meter data2 - 6*6824.16 - 20472.487.2 - 21.60.186 - 0.5592 - 60.23 - 0.690.2 - 0.6NANA1.418 - 4.2541.418e-3 - 4.254e-3NANANANANANANA
Electric Utility kWh in BTU6/1-5/2021graphs as meter data1 - 53412.08 - 17060.4*3.6 - 189.32e-2 - 0.4661-50.115 - 0.5750.1012 - 0.506NANA0.709 - 3.5457.09e-4 - 3.545e-3NANANANANANANA
Electric Utility kWh in MTon CO26/1-5/2021graphs as meter data1 - 53412.08 - 17060.4*3.6 - 189.32e-2 - 0.4661-50.115 - 0.5750.1012 - 0.506NANA0.709 - 3.5457.09e-4 - 3.545e-3*NANANANANANANA
Natural Gas BTU6/1-5/2021graphs as meter data2.93e-4 - 1.465e-31 - 5*1.06e-3 - 5.27e-32.73e-5 - 1.36e-42.93e-4 - 1.465e-32.95e-6 - 1.48e-52.6e-6 - 1.3e-5NANA5.28e-5 - 2.64e-45.28e-8 - 2.64e-7NANANANANANANA
Natural Gas BTU in Dollar6/1-5/2021graphs as meter data2.93e-4 - 1.465e-31 - 51.06e-3 - 5.27e-32.73e-5 - 1.36e-42.93e-4 - 1.465e-32.95e-6 - 1.48e-5*2.6e-6 - 1.3e-5NANA5.28e-5 - 2.64e-45.28e-8 - 2.64e-7NANANANANANANA
Natural Gas Dollar6/1-5/2021graphs as meter dataNANANANANA1 - 5*0.88-4.4NANANANANANANANANANANA
Natural Gas Cubic Meters6/1-5/2021graphs as meter data10.7 - 53.43.64e4 - 1.82e538.5 - 192.31 - 5*10.7 - 53.40.11 - 0.550.97 - 4.84NANANANANANANANANANANA
Trash Kg6/1-5/2021graphs as meter dataNANANANANANANA1 - 5*1e-3 - 5e-3NANANANANANANANANA
Temp Fahrenheit 0-2126/1-5/2021graphs as meter dataNANANANANANANANANANANA0 - 212*-17.78 - 100NANANANANA
Temp Fahrenheit in Celsius6/1-5/2021graphs as meter dataNANANANANANANANANANANA0 - 212-17.78 - 100*NANANANANA
Electric kW6/1-5/2021graphs as meter dataNANANANANANANANANANANANANA1 - 5*NANANANA
Electric kW 2-66/1-5/2021graphs as meter dataNANANANANANANANANANANANANA2 - 6*NANANANA
Water Gallon6/1-5/2021graphs as meter dataNANANANANANANANANANANANANANA1-5*3.79-18.93NANA
Water Gallon flow 1-5 per minute6/1-5/2021graphs as meter dataNANANANANANANANANANANANANANANANA1-5*227.12-1135.6
Sin 4 Day kWh2020graphs as 4 day/raw meter0 - 3 sine*0 - ~102330 - ~10.80 - ~0.280 - 30 - ~0.350 - ~0.303NANA0 - ~2.130 - 2.13e-3NANANANANANANA
Sin 4 Hour kWh2020graphs daily but not less than 4 hour/raw if zoomed0 - 3 sine*0 - ~102330 - ~10.80 - ~0.280 - 30 - ~0.350 - ~0.303NANA0 - ~2.130 - 2.13e-3NANANANANANANA
Sin 15 Min kWh2020graphs daily0 - 3 sine*0 - ~102330 - ~10.80 - ~0.280 - 30 - ~0.350 - ~0.303NANA0 - ~2.130 - 2.13e-3NANANANANANANA
Sin 23 Min kWh2020graphs as daily0 - 3 sine*0 - ~102330 - ~10.80 - ~0.280 - 30 - ~0.350 - ~0.303NANA0 - ~2.130 - 2.13e-3NANANANANANANA
Sin 15 Min kWh2020graphs as daily0 - 3 sine*0 - ~102330 - ~10.80 - ~0.280 - 30 - ~0.350 - ~0.303NANA0 - ~2.130 - 2.13e-3NANANANANANANA
Sin Amp 1 kWh2020-21graphs as daily0 - 1 sine*0 - ~34020 - ~3.60 - ~0.0930 - 10 - ~0.1150 - ~0.101NANA0 - ~0.7080 - 7.08e-4NANANANANANANA
Sin Amp 2 kWh2020-21graphs as daily0 - 2 sine*0 - ~68040 - ~7.20 - ~0.180 - 20 - ~0.230 - ~0.202NANA0 - ~1.420 - 1.42e-4NANANANANANANA
Sin Amp 3 kWh2020-21graphs as daily0 - 3 sine*0 - ~102060 - ~10.80 - ~0.280 - 30 - ~0.3450 - ~0.303NANA0 - ~2.120 - 2.12-3NANANANANANANA
Sin Sq kWh2020graphs as daily0 - 2.5 sine*0 - ~85200 - ~9.00 - ~0.230 - 2.50 - ~0.290 - ~0.252NANA0 - ~1.770 - 1.77-3NANANANANANANA
Cos Sq kWh2020graphs as daily0 - 2.5 sine*0 - ~85200 - ~9.00 - ~0.230 - 2.50 - ~0.290 - ~0.252NANA0 - ~1.770 - 1.77-3NANANANANANANA
Cos 23 Min kWh2020graphs as daily0 - 3 sine*0 - ~102330 - ~10.80 - ~0.280 - 30 - ~0.350 - ~0.303NANA0 - ~2.130 - 2.13e-3NANANANANANANA

For bar graphs, you can easily check the day bars for the simple data. Wider bars will only show for data with more days as OED does not show bars with days missing at the start or end. The value can be found by taking the day value on the line graph (shown in the table above) and multiplying by 24. For example, Electric Utility kWh as kWh has line values of 1-5 and bar values of 24-120. In US Dollars it is 0.115 - 0.575 on line and 2.76-13.8 on bar. Tis is because it is 24 times larger as the sum over the 24 hours of the rate/day. This holds for both quantity and flow units.

If the custom slider is used and the bar width is 2 days then you get two bars: June 2-3 and Jun 4-5. The value is 120 (48 + 72) and 216 (96 + 120).

Group data

The following table gives groups that are created from the meters above as well as the mathematical meter data described below. All area units are sq. meters and not set/zero if left off.

Group nameDefault graphic unitValues for default unitareaIncluded metersIncluded groupsAll meters includedCompatible unitsNote
Electric Utility 1-5 + 2-6 kWhkWh3 - 1110Electric Utility kWh, Electric Utility kWh 2-6noneElectric Utility kWh, Electric Utility kWh 2-6see Electric Utility kWh
Electric Utility 1-5 + 2-6 DollarUS Dollar0.345 - 1.26510Electric Utility kWh, Electric Utility kWh 2-6noneElectric Utility kWh, Electric Utility kWh 2-6see Electric Utility kWh
Natural Gas Dollar EuroEuro0.88 - 4.4Natural Gas DollarnoneNatural Gas Dollarsee Natural Gas Dollar
Electric Utility 1-5 + Natural Gas Dollar EuroEuro0.9812 - 4.906Electric Utility kWh, Natural Gas DollarnoneElectric Utility kWh, Natural Gas Dollarsee Natural Gas Dollar
Electric Utility 1-5 kWh not displayablekWh1 - 5Electric Utility kWhnoneElectric Utility kWhsee Electric Utility kWhThis should only been seen and graphable by an admin
Electric kW + 2-6 kWkW3 - 11100Electric kW, Electric kW 2-6noneElectric kW, Electric kW 2-6see Electric Utility kWh
SqSin + SqCos kWhkWhvery close to 2.510testSqSin kWh, testSqCos kWhnonetestSqSin kWh, testSqCos kWhsee Electric Utility kWh
SqSin + SqCos no unitnonesame as abovetestSqSin kWh, testSqCos kWhnonetestSqSin kWh, testSqCos kWhsee Electric Utility kWhWill graph once a unit compatible with kWh is chosen
Sin Amp 1 + 2 kWhkWhsine from 0-31000Sin Amp 1 kWh, Sin Amp 2 kWhnoneSin Amp 1 kWh, Sin Amp 2 kWhsee Electric Utility kWh
Sin Amp 2 + 3 kWhkWhsine from 0-51000Sin Amp 2 kWh, Sin Amp 3 kWhnoneSin Amp 2 kWh, Sin Amp 3 kWhsee Electric Utility kWh
Sin Amp 1 + (2 - 3) kWhkWhsine from 0-610000Sin Amp 1 kWhSin Amp 2 + 3 kWhSin Amp 1 kWh, Sin Amp 2 kWh, Sin Amp 3 kWhsee Electric Utility kWhincludes group
Amp 1 + 2 + (1 + 2) + (2 -3) kWhkWhsine from 0-610000Sin Amp 1 kWh, Sin Amp 2 kWhSin Amp 1 + 2 kWh, Sin Amp 2 + 3 kWhSin Amp 1 kWh, Sin Amp 2 kWh, Sin Amp 3 kWhsee Electric Utility kWhincludes 2 groups and 2 duplicate meters

Mathematical Test Data

The OED test data generation code can generate sine and cosine based data. It has several advantages:

  • You can create on your own machine without needing to download anything.
  • The provided script will generate the data and load it into your OED database for use within the system.
  • Since it has a regular pattern, it is often easy to see issues in graphed data.
  • Different datasets can be used to focus on different types of testing.

Note that the values are shifted so the minimum is 0 since most meter data is like that. It is easy to use this data by following these steps

The following table gives a list of the available data and information about it. The meter name assumes you use the provided script to load the data. (If you want to generate the test data outside the usual script, the <command name> is what you use to create this dataset manually with npm run <command name> in a web/vsc Docker container terminal. You will then need to load the reading data into OED as described on the reading import page. The file will have the name indicated and is located in the src/server/test/db/data/automatedTests/ directory. It is important to properly set the reading frequency to see the expect result.) The meter name is the one if the testData script is used to create and load this data.

DescriptionMeter name# points/file size <command name>File produced
Sine function with a period of 45 days and amplitude 3 for 1 year with points every 4 daysSin 4 Day kWh92 points/5kBgenerateFourDayTestingDatafourDayFreqTestData.csv
Sine function with a period of 45 days and amplitude 3 for 1 year with points every 4 hoursSin 4 Hour kWh2196 points/129kBgenerateFourHourTestingDatafourHourFreqTestData.csv
Sine function with a period of 45 days and amplitude 3 for 1 year with points every 23 minutesSin 23 Min kWh22915 points/1.4MBgenerateTwentyThreeMinuteTestingDatatwentyThreeMinuteFreqTestData.csv.
Sine function with a period of 45 days and amplitude 3 for 1 year with points every 15 minutesSin 15 Min kWh35136 points/2.1MBgenerateFifteenMinuteTestingDatafifteenMinuteFreqTestData.csv
Cosine function with a period of 45 days and amplitude 3 for 1 year with points every 23 minutesCos 23 Min kWh22915 points/1.4MBgenerateCosineTestingData23FreqCosineTestData.csv
Sine squared function with a period of 45 days and amplitude 2.5 for 1 year with points every 1 daySin Sq kWh366 points/21kBgenerateSineSquaredTestingData2.5AmpSineSquaredTestData.csv
Cosine squared function with a period of 45 days and amplitude 2.5 for 1 year with points every 1 dayCos Sq kWh366 points/21kBgenerateCosineSquaredTestingData2.5AmpCosineSquaredTestData.csv
Sine function with a period of 45 days and amplitudes 1-3 for 2 years with points every 15 minutesSin Amp 1 kWh, Sin Amp 2 kWh, Sin Amp 3 kWh70176 points/4.2MB each; 12.6MB totalgenerateVariableAmplitudeTestingData15Freq1AmpSineTestData.csv, 15Freq2AmpSineTestData.csv, 15Freq3AmpSineTestData.csv
Sine function with a period of 45 days and amplitude 3 for 1 year with points every 1 minute. This is normally used for specialized testing of a large number of readings and not automatically generated by the script.Sin 1 Min527040 points/32MBgenerateOneMinuteTestingDataoneMinuteFreqTestData.csv

What OED should display with this test data

This section gives a range of samples of what OED will display when graphing the test data described above.

Simple data

Quantity data

The following figure shows the kWh meters and groups as a line graph: Simple test data line graphic of kWh

The following figure shows the kWh meters and groups as a 1 day bar graph: Simple test data 1 day bar graphic of kWh

OED will show a blank bar graphic in this case (and all the 5 day meters) for 1 or 4 weeks because it will not display bars with incomplete meter data at the start or end.

Same as the line graphic above but in kg of CO2 to show changing the unit: Simple test data 1 week bar graphic of kWh

Same as above but as a 1 day bar graph: Simple test data 1 day bar graphic of kWh

The following figure shows the water meter as a line graph where the rate is Day to show changing the rate and a different type of unit. Note KWh must be shown per hour. Simple test data line graphic of Water in per day

Flow data

The following figure shows the kW meters and groups as a line graph: Simple test data line graphic of kW

The following figure shows the kW meters and groups as a 1 day bar graph: Simple test data 1 day bar graphic of kW

The following figure shows the water flow meter as a line graph where the rate is Minute to show changing the rate and a different type of unit. Note kW must be shown per hour. Simple test data line graphic of Water flow in per hour

Raw data

The following figure shows a temperature meter that collects in Fahrenheit but has a default graphic unit of Celsius as a line graph: Simple test data line graphic of temperature in Fahrenheit as Celsius

Mathematical data

The following picture shows the meters Sin 4 Day kWh, Sin 4 Hour kWh, Sin 23 Min kWh, Sin 15 Min kWh. It is designed to show how the number of points impact the line quality in OED and verify that varied reading rates do not impact the OED code. What you see is that the 4 day line is shifted due to the placement of the time values. The other meters are very similar in value. This shows that the daily averaging in OED is accurate. Note that in this and all line graphics, you will see the similar values as you zoom in to see hourly or meter level points. This is because the data is kW. The only change you will see is in the quality of the graphic if you zoom in so tight that you have limited points to graph. Sample line graphic of sine with readings at various rates

The following picture shows the same meters as above but as a bar graph with 4 week bars. In a perfect world, all the bars would have the same value for a given date range. As can be seen, there are small differences where the value varies more as the frequency of the readings goes down. This variation is due to the inaccuracy of low frequency readings as is normal. Sample bar graphic of sine with readings at various rates

The following picture shows a line graphic of the sin values for the 3 different amplitudes (1-3). As expected, they have the same period with a different amplitude. Plus, it looks nice! Sample line graphic of sine with readings at various amplitudes

The following picture shows a line graphic of a group containing all the sine amplitudes above but with 1 & 2 included twice. OED does not duplicate the values so the sum is a maximum of 6 or 1 + 2 + 3. Sample line graphic of sine group with duplicate

The following picture shows a sin and cos with the same amplitude. It should be noted that normally sin and cos are phase shifted so the high of one is the low of the other. You do not see that because the values were shifted to all be positive. Sample line graphic of sine and cosine

The following picture shows the meters Sin Sq kWh & Cos Sq kWh along with a group containing both meters (Sin Sq + Cos Sq kWh). If OED is working properly then the group should have a constant value since sin^2 + cos^1 = 1 or the value of the amplitude in this case. This is a good test of whether groups work (for simple groups of only two meters). If you want to see how accurate OED is then just graph this group and you will see that the value is always very close to 2.5. Sample line graphic of sin^2 and cos^2 along with a group combining them.

The following image shows sin with readings every minute. It is a very high quality version of the first picture with points that are less frequent. It is zoomed in to less than a day to show the minute points. This data is not automatically generated and is normally only used to test OED's speed when there is lots of reading points. You would need to generate this data (placed in src/server/test/db/data/automatedTests/oneMinuteFreqTestData.csv) and then upload via CSV as described for the real-world data. Sample line graphic of sine with readings every one minute

Real World Test Data

This data can show what happens with actual data. However, it is harder to see when things are off. It is provided as an alternative to the mathematical data but will probably be used less now that that data exists.

The table below lists the types of test data we have. The first four all have 3.5 years of electric data but for different meters so the values vary. The last one is a sample file that you can edit to create your own data.

DescriptionReadings CSVSize of Readings File
Contains actual electric data on an hourly basis for about 3.5 years (Oct. 2016-Apr. 2020)threeYearA.csv1.3MB
Contains actual electric data on an hourly basis for about 3.5 years (Oct. 2016-Apr. 2020)threeYearB.csv1.3MB
Contains actual electric data on an hourly basis for about 3.5 years (Oct. 2016-Apr. 2020)threeYearC.csv1.3MB
Contains actual electric data on an hourly basis for about 3.5 years (Oct. 2016-Apr. 2020)threeYearD.csv1.3MB
Sample file to edit for your own datasampleReadings.csv0 MB

Using the provided data

Choose the file you want where clicking on the link in a web browser will download that file. Note you can load as many test data files as you want into a single OED instance. The import of this data into OED uses the CSV import feature that is described in the CSV import documentation and pages linked from that page, esp. about readings. You do not need to know all those details but can get further information as needed.

Loading the data into your OED

You will want to have OED running during this process. Start it with Docker as you should have previously done. Log in as an admin user. Go to the CSV upload page using the "CSV" button in the top, right of the OED web page. You should default to the "Readings" tab which is what you want. Now do the following:

  1. Enter the meter name in the box where the sample graph below used the file name without the extension and spaces, e.g., "Three Year A" for the first file. You can use any name you like.
  2. Use the "Choose File" button to select the file with the reading data you are uploading.
  3. Check the "Create Meter" and "Header row" boxes.
  4. Check the "Refresh Readings" and "Refresh Hourly Readings" boxes so the readings will be available right away for graphing. You can delay doing this until the last upload if you are doing multiple readings files to make it a little faster. If you forget to do this then you must manually refresh the readings to graph them.
  5. Click the "Submit CSV Data" button to start the upload. This will take a little while (probably less than one minute). A popup window will appear when the upload is done telling you the status. It should be SUCCESS without any warnings if all went well. If something went wrong then address the issue. Note if there are lots of errors then you need to look at the log or console where OED is running to see them all.
  6. Reload the web page where OED is running to see the new meter(s).
  7. Go to the meter page and assign the unit and, if desired, the default graphic unit for each meter. The examples make them Electric_Utility for the unit and kWh for the default graphic unit. Also set the reading frequency to 01:00:00 or 1 hour since that is what the data represents.
  8. You should now be able to graph them.

Below is a line graphic with the four 3.5 year meters. If all went well then this is what you should see. Sample line graphic of three year electric test data

If you don't see this then something is wrong and you should not continue this process and instead ask us for help. (See link at bottom of page)

Creating own data

You can download the sample data from the table above. You can edit the sampleReadings.csv file by opening it in you preferred editor where a spreadsheet program is fine as long as you make sure to save it as a CSV file. Remove the two sample readings on lines 2 and 3 of the file and create new lines with the data you want. Note that normally the end time of the previous point is equal to the start time of the next point in real meter data. You can put in as many lines as you want with readings. This file has a header row so it is easier to see what goes in each column. Once you are done editing and save the file in CSV format, import it the same way as the provided data above except you need to check the "Header Row" box since the file has a header row. Deal with any messages to correct problems and see the readings import page for more info on dealing with issues. Note if there are lots of errors then you need to look at the log or console where OED is running to see them all.

Database issue

If you cannot load the data into the database or it disappears after shutting down OED, then you likely have a database issue. To test you can do the following:

  1. Log in as the admin.
  2. Change the default graph type to something else (say bar) and save the change. Make sure it gives the green popup that it saved okay.
  3. Refresh the web browser and go tho the main OED page. It should have preselected the bar choice for graphic indicating that it is the default choice. If this does not work then verify the admin preference change was actually saved without error because it seems your installation is not saving to the database.
  4. Shut OED down and bring it back up.
  5. When OED is done installing, go to the web page and refresh the page. Again, you should see the bar as the default selection. If this fails then the database changes are not being saved between runs of OED. This indicates an install issue. If you don't know what to do then contact us.

Help

You should now be done and have the test data in your OED development system. If something did not work then you can seek help from the project by contacting us.