Page 1 of 1

smoothing values

Posted: Wednesday 07 December 2022 17:49
by har0543
Hi,
I am completly new to DZVents so perhaps I ask something that is asked before.
I have a electric boiler that has to start when the solar panels produce enough power.
With a Blocky this works. But when there is only for 1 minute enough sunshine the boiler is switched on.
So I am looking for an option to use a moving average.
I see in DzVents the option smoothItem.

Could somebody show how this is done? I get mixed up by all the options in DzVents...

thanks in advance,

Har

Re: smoothing values

Posted: Thursday 08 December 2022 23:27
by waltervl
You have to use history=true. See the examples for this in the documentation on persistent data.
See for example viewtopic.php?p=144660

Re: smoothing values

Posted: Friday 09 December 2022 19:54
by har0543
Thank you for your reply. But I can not see the trees in the forest...
I am sorry but the history=true function does not make sense to me. But I have zero programming knowlage.
I have an divice called "teruglevering" which gives values in Watts.
Do i first have to make some kind off extra logging with 10 values and another script that calcutales a new divice called pa "smoothed terugleveering"

Is there a book or site in dutch that explense LUA and or DzVents?
Hope somebody can help me here

Re: smoothing values

Posted: Friday 09 December 2022 20:30
by waltervl
Here you have an example of a script using the same functionally, only using .avg() instead of smootItem().
viewtopic.php?p=288575