Lorem ipsum dolor amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.


Follow Us:

Interpreting XML data

Interpreting XML data

You are here:
< Back

At the bottom of the page is the output of a minute granular export showing the past ten minutes of cumulative data (obtained with the URL http://DEVNAME.egaug.es/cgi-bin/egauge-show?m&n=10). time_stamp represents the time of the export (unix timestamp in hex); time_delta indicates the time in seconds between exports; epoch represents the date and time recording started on that device (unix timestamp in hex).

Each <cname> tag contains data on a column header; in this case, that translates to a physical register on the device. t indicates the register type (P for power, V for Voltage, etc) and the text inside the tag represents the register name as recorded on the device. Virtual registers may also be shows in the appropriate parameter is passed in the initial request.

Each row (<r> tag) contains a series of columns (<c> tag) that show the cumulative value of each register. To determine the average value of a register over a given time, simply find the difference between the two cumulative values and divide by the appropriate time delta. The resulting values are expressed in units based on the register type (see the chart in section 2.2.1 of the XML API document for the unit type).  It should be noted that prior to firmware 3.01 cumulative values do not necessarily count up from zero. On firmware 3.01 and newer passing the option when requesting data returns values relative to device epoch (ie, values start at zero). Using the parameter epoch in a data push has the same effect. This assumes that the date and time recording started option is set correctly on the eGauge.

Some examples (based on the sample output at the bottom of the page):

Average Grid usage over the most recent minute 55357226851 – 55357243343 = −16492 / 60 = -274.86 Watts (remember, Power registers are bidirectional)

Average Voltage L2 over ten minutes 4511385868513 – 4511319123106 = 66745407 / 600 = 111242.345 mV / 1000 = 111.24 Volts

<group serial=”0x4e842294″>

<data columns=”12″ time_stamp=”0x564cb0e8″ time_delta=”60″ epoch=”0x55973268″>

<cname t=”P”>Grid</cname>

<cname t=”S”>Grid*</cname>

<cname t=”V”>VL2</cname>

<cname t=”V”>VL1</cname>

<cname t=”F”>Frequency</cname>