Hello all,
I have been working with the CC128 xml schema and have no problems reading \ parsing the data from the unit. I have a really newbie question.
I would like to know, from the live output (6sec pulse) how can i calculate the total kwh for the day \ interval.
Some background, currently I am logging to MySQL the interval pulse and averaging into a minute span. Basically we push the live data into a temp table with the minute rounded down to the pulse minute. Then every minute a service averages the data for that minute and pushes to a live data stream.
At the end of it i will have the average watts per minute in a single row containing all 3 channels seperatly. (Lets assume we only are working with the whole home sensor).
The calculation for watts to Kwh is (as you know) E = P(watts) * T(hr) / 1000
My query is. How do i use the existing data coming from the device. Is the data coming from the device the Kwh for the hour, live watts usage etc. Here is an example of the sql calculation(for one channel)
FORMAT(((AVG(ch1_watts) * p_min) / 1000),2) ch1_watts
(assuming p_in is the total hours in a decimal format for today).
If i haven't added enough information please let me know.
Thanks in advance.
Nico
|