Current Cost CC128 Display Unit

 


XML OUTPUT DESCRIPTION - v0.11


 

 

1.  Serial Port

 

The CC128 Display Unit outputs ASCII text over its serial port at 57600 baud, 1 start, 8-bit data, 1 stop, no parity, no handshake. This version does not listen for incoming data.

 

Using the optional Current Cost serial port cable, a standard PC's COM1 Port will receive the raw data for display using a terminal emulator program like Windows HyperTerminal. For a quick check, a batch command like the following works on some PC systems. Obviously, edit the "com1" text to match the Com port in use.

 

@echo off

title CurrentCost Data Display

color f0

prompt ""

mode con: cols=100 > nul

mode com1: baud=57600 parity=n data=8 stop=1 > nul

echo Displaying data received from com1 serial port. Press Ctrl-C to stop...

echo.

type com1

pause

 

If the PC does not have a COM serial port, the optional Current Cost USB cable can be used in conjunction with driver software to create a virtual COM port. The Prolific PL-2303 Drivers support Windows 2K/XP (not Vista, although there may be third party compatible drivers available), MacOS (8, 9 and 10.x PowerPC and Intel) and Linux (some kernels include support without additional drivers).

 

If the data is captured to a text file, some HTML browsers will open this to display the block of XML for easier reading, but the text must be prefixed and post fixed with a block label, eg <xml>...</xml>. MS Excel will read this data and it can be auto filtered. Alternatively there are free XML viewers available. All these programs start to load very slowly with file sizes above 2MB. There is no separate schema available, the programs will create their own.

 

The intention of providing the xml data is to enable custom software to be created to use the information in whatever way meets your personal or company objectives or interests.

 

 

 


 

2.  Real-Time Output

 

The Display Unit outputs Sensor data whenever a successful Sensor Transmission is received.

 

The CC128 message structure is slightly compressed compared with the Current Cost "Classic" format, as follows:

 

<msg>                            start of message

   <src>CC128-v0.11</src>        source and software version

   <dsb>00089</dsb>              days since birth, ie days run

   <time>13:02:39</time>         24 hour clock time as displayed

   <tmpr>18.7</tmpr>             temperature as displayed

   <sensor>1</sensor>            Appliance Number as displayed

   <id>01234</id>                radio ID received from the sensor

   <type>1</type>                sensor Type, "1" = electricity

   <ch1>                         sensor channel

      <watts>00345</watts>       data and units

   </ch1>

   <ch2>

      <watts>02151</watts>

   </ch2>

   <ch3>

      <watts>00000</watts>

   </ch3>

</msg>                           end of message

 

 

This message is sent out for each Appliance Sensor received (sensor 1 to 9) plus the "Whole House" Sensor, which is listed as sensor 0.

 

 


 

3.  History Output

 

A full cycle of History messages are output starting at 1 minute past every odd hour, ie 17:01, 19:01 etc. A burst of data is sent once every 10 seconds. History Data is sent for all 10 sensors regardless if they are now present or not.

 

Four items of sensor data for each of 10 sensors are sent each xml burst, ie 40 items. When the data from one store is completely sent, the data from the next store is sent. When the cycle is completed, the wire is quiet of history data until the start of the next cycle.

 

A full cycle of output can be initiated for download on demand by pressing and holding the Down and OK buttons together until the LED flashes. Real-time XML output and all on-screen update including the time stops while this is happening.

 

 

3.1  Two-Hourly History Store

 

The last 31 days Energy Usage is output as 2-hour aggregates of KWHr (3720 values covering 9 Appliances plus Whole House), the data being aggregated starting at odd hours, eg 23:00 to 01:00, 01:00 to 03:00 etc. This accommodates industry requests to view evening and night data segments distinguished at 23:00.

 

"Sensor 0" refers to the "Whole House" and Sensors 1 to 9 are Appliance Sensors.

 

Where sensors have more than one channel, the value presented is the total of all channels.

 

<msg>                            start of message

   <src>CC128-v0.11</src>        [as for Real-Time]

   <dsb>00089</dsb>              [as for Real-Time]

   <time>13:10:50</time>         [as for Real-Time]

   <hist>                        start of history

      <dsw>00032</dsw>           days since wipe of history

      <type>1</type>             sensor Type, "1" = electricity

      <units>kwhr</units>        units of data eg KWHr

      <data>                     start of data burst

         <sensor>0</sensor>      historic Appliance Number

         <h024>001.1</h024>      h="hours", 24="22 to 24 hrs ago"

         <h022>000.9</h022>      h="hours", 22="20 to 22 hrs ago"

         <h020>000.3</h020>      h="hours", 18="20 to 20 hrs ago"

         <h018>000.4</h018>      h="hours", 22="16 to 18 hrs ago"

      </data>

      ...                        [Sensor 1 to 8 data here]

      <data>

         <sensor>9</sensor>

         <units>kwhr</units>

         <h024>000.0</h024>

         <h022>000.0</h022>

         <h020>000.0</h020>

         <h018>000.0</h018>

      </data>

   </hist>

</msg>                           end of message

 


 

3.2  Daily History Store

 

The last 90 days Energy Usage is output as daily aggregates of KWHr (900 values covering 9 Appliances plus Whole House).

 

For simplicity, this data overlaps the 2-hr history store in the present version.

 

"Sensor 0" refers to the "Whole House" and Sensors 1 to 9 are Appliance Sensors.

 

Where sensors have more than one channel, the value presented is the total of all channels.

 

<msg>

   <src>CC128-v0.11</src>

   <dsb>00089</dsb>

   <time>13:10:50</time>

   <hist>

      <dsw>00032</dsw>

      <type>1</type>

      <units>kwhr</units>

      <data>

         <sensor>0</sensor>

         <units>kwhr</units>

         <d055>012.9</d055>      d="days", 055="55 days ago"

         <d054>011.0</d054>

         <d053>014.3</d053>

         <d052>019.5</d052>

      </data>

      ...                        [Sensor 1 to 8 data here]

      <data>

         <sensor>9</sensor>

         <units>kwhr</units>

         <d055>000.0</d055>

         <d054>000.0</d054>

         <d053>000.0</d053>

         <d052>000.0</d052>

      </data>

     </hist>

</msg>

 

 


 

3.3  Monthly History Store

 

The last 84 months Energy Usage is output as monthly aggregates of KWHr (840 values covering 9 Appliances plus Whole House).

 

For simplicity, this data overlaps the 2-hr and Daily history stores in the present version [subject to review].

 

"Sensor 0" refers to the "Whole House" and Sensors 1 to 9 are Appliance Sensors.

 

Where sensors have more than one channel this is stored totalled.

 

<msg>

   <src>CC128-v0.11</src>

   <dsb>00089</dsb>

   <time>13:10:50</time>

   <hist>

      <dsw>00032</dsw>

      <type>1</type>

      <units>kwhr</units>

      <data>

         <sensor>0</sensor>

         <units>kwhr</units>    

         <m002>257.0</m002>      m="month", 002="2 months ago"

         <m001>340.0</m001>

      </data>

      ...                        [Sensor 1 to 8 data here]

      <data>

         <sensor>9</sensor>

         <units>kwhr</units>

         <m002>000.0</m002>

         <m001>000.0</m001>

      </data>

     </hist>

</msg>

 

 

 

 

4.  Document Version

 

This Description was issued on 18th February 2009 and is subject to change without notice. The authors, copyright holders and publishers carry no liabilities whatsoever for losses of any sort, primary or secondary, time or money or anything else. All information must be verified before use by examination of actual data structures and timings by the practitioner. Accuracy of transmitted or received data is not warranted under any circumstances. Anyone using data derived from the product or any product description must perform their own risk assessment.

 

Having said that, we will try to notify interested folks of any changes as soon as practicable either directly or through web sites or blogs, and we will gratefully receive comments, criticism and suggestions for improvements from anyone.

 

 

Current Cost Ltd