Counter Log - Help with kWh calculation

Avatar
  • updated

Hi people,

May I ask a little help about counter log?

I have a power sensor on an electric board. On ETS, I get an Instantaneous Power object (2 bytes), which comes in kW format. Like, if the house is consuming 1200W, I get 1,2 value on ETS, if it's consuming 250W, I get 0,25 value, and so on. I have the correct instant values showing on visualization.


I've tried to create counter logs, to get an approximate daily consumption, etc. The problem is that the values on the counter log don't make any sense.


For example, if the house is consuming constant 250W during 24hour, I should get 6 kWh by the end of the day, but the values don't make sense. On one day, it showed something like 138kWh on one day, which is impossible. I deleted all data now.


Either I'm configuring all wrong the counter log, or there's something I'm missing.

Thanks for any help

Avatar
Ricardo Pinto

Hi,

Just a quick update:

It looks like it's working pretty well 😁


I took the kWh consumption, added the kWh price and the daily fixed power price, and it looks good so far.

Best regards

Avatar
Ricardo Pinto

Now I think I'm getting results :-D


Will watch the values during the weekend.

Thanks everybody for the tips

Avatar
Fabien Fuster

Thanks a lot for the feedback and explanations, lots clearer now !


Your right, this deserves a bit more in the manuals and tutorials to avoid further misunderstanding.

Best regards,

Avatar

No problem, I understand, we will try to improve counter log as well as manuals and tutorials to make it more easier for you...


About reset counter we can take the following analogy:

In car you have counter for overall millage (cannot be reset by the user) and trip millage (can be reset by user). You can do the same in bOS create two counter logs with same input value and do similar things...

Regards

Avatar
Ricardo Pinto


Thanks Matias, for the extensive explanation, we were trying to find solutions, and honestly we were a bit confused about how the counter log works.

As for step 4, resetting the counter value, what's the use for? Is there any advantage in resetting the counter?

Best regards

Avatar

Hello everybody,

I see, that there is a bit of confusion about counter log and energy consumption.

First let me explain how Counter Log works...

Input value of the Counter log should always be consumption (e.g. electrical energy - kWh, gas, water - m3) and not power! 

When we first link the input value to Counter log, it remembers the value. Let's say that when we link our electrical energy meter to counter log it's current value is 100 kWh and counter logs starting value will be 100. However this value is not saved in database, because counter log stores only difference in values in interval of 1 hour so it will actually start with 0. 

Let say that in next hour our energy meter value will be 110 kWh, that means that consumption in that hour was 10 kWh and Counter log will save value 10 in the database. Then after another hour the energy meter value would be 115 kWh and counter log will add 5 to previous database entry and the new entry would be 15 and so on...


Example with power:

Lets say that we have a device that is measuring only active power P (W) and we would like to calculate energy consumption (kWh). 

In this case we first need to calculate energy consumption (kWh) from Power (W) and we can use Calculation task for that.

The formula for energy is E = cos Fi * P * t (let's say cos Fi = 1)


Basically energy is calculated as integration of power:

E(kWh) = Int(P)dt * 1/3600 / 1000

  1. Set Calculus to: Integral.
  2. set Constant Factor to: 1/3600 (Ws -> Wh)  / 1000 (Wh -> kWh) = 2,7778e-7.
  3. Add new operation and select Power as input value in W.
  4. Now you can use Value output in tasks (Counter Log) or make a Double user interface control for it. A Run Function control linked to the Reset function can be used to enable resetting of the counter value.

More examples can be found here:

https://www.comfortclick.com/BOS/KnowledgeBase/Calculation

https://www.comfortclick.com/BOS/KnowledgeBase/CounterLog

Regards

Avatar
Maarten Van Parijs

I'm also interested in this, actually surprised the counter log does't work with kW and gives back kWh, seems a basic function to me in bOS.

Also as info, the formula to calculate Wh from Amps in the beginning of this thread is wrong, you need to take in account for the power factor (cos φ). Without it you are calculating VA (Volt-Amps), the energie company can't read this value with the standard power meters. Take it as free electricity.

https://en.wikipedia.org/wiki/Power_factor

V * Cos φ * A = W

Example: 230 * 0.8 * 2 = 368W

Without cos φ: 230 * 2 = 460VA

If you have a three phase + neutral installation you need to add Square root of 3, √(3) = 1.73

V * √(3) * Cos φ * A = W

Example: 230 * 1.73 * 0.8 * 2 = 636.64

Avatar
Fabien Fuster

Can only add the same request here .... after all these unsuccessful test, help wanted bOS team !

Best regards

Avatar
Ricardo Pinto

Hi Fabien,

I've also faced problems with my tests, so I have no good results either.

I really don't understand the Counter Log. Wasn't it supposed to accept a simple kW value, log how much it consumed during one hour and spit it out?

Even the Analog Log looks like it gets the values better than the Counter Log. When I created a Counter Log to log the kW values, I also created an Analog Log with the same input, and even tough the Analog Log is not for this purpose, it actually looks better logging values.

So bOS team, please help us out here.

I have a kW value coming from KNX in real time (not kWh), I just want to use bOS to log the consumption. And so far, none of the options worked. The KNX module software sucks, so I just want to take my realtime kW value and calculate the consumption on bOS.

The Counter Log register values every hour, so if I give a kW value as an input, wasn't it suppose to log how much I consumed every hour? Do I need anything eles?

HELP please.

Best regards

Avatar
Fabien Fuster

Hi Ricardo,

Sorry for my late feedback, but I had an unplanned business trip..

My tests are also not fully satisfactory. The fake device is not recording anything at all, and I don't understand why. I'm sending this 250 value every second on the LAN, the calculation node seems to get it, but the log stay desperately empty....

Regarding the ream consumption node, I get my graph, but seems not to be correct. Either my theoretical solution doesn't work, or there is another issue I don't get with the log.

real and accurate consumption :

Associated energy consumption test log (to be compared to the blue line above) :

Not only the value has a "scaling" issue, but also the shape is wrong. So clearly, it need some more research...

Regards,