This page last changed on Feb 13, 2015 by bart groot.
I am experimenting with a eminent em6600 z wave energy reader.
I an able to read how many times the wheel from the KWH meter spins in 15 minutes.
The meter i have does 345 rounds when 1 KWH is used.
So to display the KWH used instead of the amount of rounds from the meter i have to devide the reading by 345 and multiply by 1000. i should probably also do a decimal rounding to 1 decimal.
i read an article on how to convert values by a rule but i dont really understand how to modify this for my energy meter.
this is the article;
Can anyone explain to me howthe rule should be for my simple conversion?
After some long nights struggling with the wrong java version i now have a working rule.
I also tried to make the rule calculatie the used Watts bij substracting the last reading by the previous reading but that does not really work.
Here's my rule upto now,
global org.openremote.controller.statuscache.CommandFacade execute;
function void log(String msg)
Logger.getLogger(Constants.RUNTIME_EVENTPROCESSOR_LOG_CATEGORY + ".drools").debug(msg);
timer (int: 0s 7m) when eval (true) then
rule "Totaal Verbruik"
$evt : Event (source=="Pulsen")
$oldevt : Event (source=="meterstand")
double correctedValue = Double.parseDouble($evt.getValue().toString())/375;
double oldValue = Double.parseDouble($oldevt.getValue().toString());
double realtimeWatts = (correctedValue - oldValue)*4;
Posted by bart groot at Feb 11, 2015 08:00