CurrentCost\Watts Clever "CLASSIC": XML output format

by Craig Hubbard 3. October 2009 17:23

The Watts Clever Wireless Energy Monitor stores historical data for 4 years which can be downloaded via the USB connection to a computer for further analysis or to build graphs and charts etc.

The data sent by the STC-4002 resembles an XML format where values are enclosed in tags such as <name></name>. Below we have included a sample output that is  output via the USB connection every 6 seconds.

<msg>
  <date>
    <dsb>00030</dsb> // 'date since birth' number of days since data logging started
    <hr>10</hr><min>15</min><sec>08</sec> // Devices Time
  </date>
  <src>
    <name>CC02</name> // Device Name (Fixed)
    <id>03577</id>  // Communication channel for device (Changes when Transmitter is sync’d)
    <type>1</type> // Hardware version of the device.
    <sver>1.11</sver> // Firmware version
  </src>
  <ch1>
    <watts>00768</watts> // Value from the fixed clamp sensor 
  </ch1>
  <ch2>
    <watts>00000</watts> // Value from the 2nd clamp sensor 
  </ch2>
  <ch3>
    <watts>00000</watts> // Value from the 3rd clamp sensor
  </ch3>
  <tmpr>30.6</tmpr> // Current Temperature 
  <hist>
    <hrs> // Total Kwh used in 2 hour blocks
      <h02>000.8</h02>
      ....
      <h26>008.1</h26>
    </hrs>
    <days> // Total Kwh used per day/s
      <d01>0054</d01>
      ....
      <d31>0000</d31>
    </days>
    <mths> // Total Kwh used per month/s
      <m01>0000</m01>
      ....
      <m12>0000</m12>
    </mths>
    <yrs> // Total Kwh used per year/s
      <y1>0000000</y1>
      ....
      <y4>0000000</y4>
    </yrs>
  </hist>
</msg>

A note about how the history is stored

Data stored on the device shifts from field to field in relation to time. For example; the field <H02> should be read as “2 hours ago” <H04> would be 4 hours ago etc

The same applied to other period values: <d01> should be read as 1 day ago

How you can use this raw data

Live feed

You may wish to capture the data in a way that you are receiving live data from an always connected monitor, in this case you would write an application using a programming language of choice that can connect to the com port to receive serial data.

The data from the XML format that you would most likely be interested in would include the following fields:

  • dsb – this counts the number of days since the monitor was last reset
  • hr, min, sec – this is the time that the monitor is displaying
  • ch1, ch2, ch3 values in watts for each of the possible three sensors, ch1 is the fixed sensor usually for the single phase installation.
  • tmpr – the temperature

from the above value we have enough information to capture live data every 6 seconds to display or store the date , time, current energy consumption in watts, and the current temperature.

Historical Data

When you do not intend to keep the monitor connected to a computer all the time your option is to download data as required to analyse using a program such as a Excel or Word to produce charts and graphs of the energy used over time.

Available from:

Tags: , ,

Technical

Pingbacks and trackbacks (1)+

Comments are closed
Theme by

RecentComments

Comment RSS