Decimale point

I have a problem with a output in rules, what i cant explain
i have the rule:

rule "kwh naar verbruik"

        when
                Item PulsenKWH_Watt received update
        then
                var Number puls = PulsenKWH_Watt.state as DecimalType
                var Number ppower = (3600 * puls) / 60
                        vermogen.postUpdate(ppower)

11:01:35.268 [INFO ] [marthome.event.ItemStateChangedEvent] - PulsenKWH_Watt changed from 12 to 14

Item pulsenkwh_watt recieves x pulsen from a kwh meter per minute. (3600 *14)/60 =840
but the output is:

11:01:36.431 [INFO ] [marthome.event.ItemStateChangedEvent] - vermogen changed from 720.00000000 to 840.00000000

the problem is not. posting the item. with (%.d) i can just show 840 Watt on the sitemap

but the the problem is, store it. for some reason rrd4j doenst like 840.00000000.

any a idea to change it..... already busy alday with it :)

So what is the rrd4j error you are getting ? As long as it is a number rrd4j will store anything

no error. just a empty file
everything else works fine

still dont understand why it makes 840 to 840.00000000

So what did you define in the rrd4j.persist file for this item ?. It could be it hasn’t been persisted (yet) and in the buffers. Numbers in persistence are stored as double values, so they have high precision (and so many decimals) persistence is not aware of integers.

the 2 others work like a charm and display values

Strategies {
   everyMinute  : "0 * * * * ?"
   everyHour    : "0 0 * * * ?"
   everyDay     : "0 0 0 * * ?"

}


Items {
        vermogen : strategy = everyMinute, everyChange, restoreOnStartup
        litmin : strategy = everyMinute,everyChange, restoreOnStartup
        Temperbuit : strategy = everyMinute,everyChange, restoreOnStartup

}