Hi
i am using RRD4 for graphing some values from a multi sensor. Everything was working fine for quite sometime until a few week ago when i noticed the graphing was not working any more.
Unfortunately, I am not able to trace back and see what changes i made that possibly broke this graph. I have not made any changes directly related to this rules file or the rrd4j config.
in order to display the values on the graph, i had to create rules for converting the raw (or i believe they are string values) passed by the zwave multisensor and convert them to integer and i used those as source for the RRD4J graph in the rrd4j config file (attached). The rule files is as follows for converting those raw values from the zwave sensor to integers:
import java.util.*;
import java.lang.Integer;
rule “luminance”
when
Event( source == “MS2lumsensor”, $l : value > 0 )
then
int i = Integer.parseInt($l.toString());
i=i+1;
execute.command (“vsms2lumcom”, i );
end
rule “humidity”
when
Event( source == “MS2humsensor”, $h : value > 0 )
then
int i = Integer.parseInt($h.toString());
i=i+1;
execute.command (“vsmshum2com”, i );
end
rule “temperature”
when
Event( source == “MS2tempFsensor”, $t : value > 0 )
then
int i = Integer.parseInt($t.toString());
i=i+1;
execute.command (“vsmstemp2com”, i );
end
The rule file gets added without errors but on the termin i see the following when the rules seem to triggered:
ERROR 2018-07-02 22:49:07,389 : Error in executing rule : MS2lumsensor:Exception executing consequence for rule “luminance” in org.openremote.controller.protocol: java.lang.NumberFormatException: For input string: “83.44”
Event org.openremote.controller.model.event.CustomState@a6eff23c not processed!
Exception executing consequence for rule “luminance” in org.openremote.controller.protocol: java.lang.NumberFormatException: For input string: “83.44”
at org.drools.core.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
at org.drools.core.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1100)
at org.drools.core.phreak.RuleExecutor.fire(RuleExecutor.java:121)
at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:74)
at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1007)
at org.drools.core.common.DefaultAgenda.fireLoop(DefaultAgenda.java:1350)
at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1288)
at org.drools.core.impl.StatefulKnowledgeSessionImpl.internalFireAllRules(StatefulKnowledgeSessionImpl.java:1306)
at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1297)
at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1278)
at org.openremote.controller.statuscache.rules.RuleEngine.push(RuleEngine.java:203)
at org.openremote.controller.statuscache.EventProcessorChain.push(EventProcessorChain.java:196)
at org.openremote.controller.statuscache.StatusCache.update(StatusCache.java:293)
at org.openremote.controller.model.sensor.Sensor.update(Sensor.java:367)
at org.openremote.protocol.zwave.ZWaveCommand.updateSensors(ZWaveCommand.java:587)
at org.openremote.protocol.zwave.model.commandclasses.CCMultiLevelSensor.updateSensorCommand(CCMultiLevelSensor.java:1769)
at org.openremote.protocol.zwave.model.commandclasses.CCMultiLevelSensor.linkSensorCommand(CCMultiLevelSensor.java:1357)
at org.openremote.protocol.zwave.model.ZWaveNode.linkSensorCommand(ZWaveNode.java:858)
at org.openremote.protocol.zwave.model.ZWaveNode.addSensorCommand(ZWaveNode.java:993)
at org.openremote.protocol.zwave.ZWaveCommand.setSensor(ZWaveCommand.java:461)
at org.openremote.controller.model.sensor.Sensor.start(Sensor.java:412)
at org.openremote.controller.deployer.Version20ModelBuilder.buildSensorModel(Version20ModelBuilder.java:718)
at org.openremote.controller.deployer.Version20ModelBuilder.build(Version20ModelBuilder.java:595)
at org.openremote.controller.deployer.AbstractModelBuilder.buildModel(AbstractModelBuilder.java:154)
at org.openremote.controller.service.Deployer.startup(Deployer.java:1060)
at org.openremote.controller.service.Deployer.softRestart(Deployer.java:455)
at org.openremote.controller.service.Deployer$ControllerDefinitionWatch.run(Deployer.java:1642)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NumberFormatException: For input string: “83.44”
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
at java.lang.Integer.parseInt(Integer.java:615)
at org.openremote.controller.protocol.Rule_luminance427027631.defaultConsequence(Rule_luminance427027631.java:7)
at org.openremote.controller.protocol.Rule_luminance427027631DefaultConsequenceInvokerGenerated.evaluate(Unknown Source)
at org.openremote.controller.protocol.Rule_luminance427027631DefaultConsequenceInvoker.evaluate(Unknown Source)
at org.drools.core.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1089)
… 26 more
ERROR [Controller Definition File Watcher for Default Deployer]: Error in executing rule : MS2lumsensor:Exception executing consequence for rule “luminance” in org.openremote.controller.protocol: java.lang.NumberFormatException: For input string: “83.44”
Event org.openremote.controller.model.event.CustomState@a6eff23c not processed!
Exception executing consequence for rule “luminance” in org.openremote.controller.protocol: java.lang.NumberFormatException: For input string: “83.44”
at org.drools.core.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
at org.drools.core.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1100)
at org.drools.core.phreak.RuleExecutor.fire(RuleExecutor.java:121)
at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:74)
at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1007)
at org.drools.core.common.DefaultAgenda.fireLoop(DefaultAgenda.java:1350)
at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1288)
at org.drools.core.impl.StatefulKnowledgeSessionImpl.internalFireAllRules(StatefulKnowledgeSessionImpl.java:1306)
at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1297)
at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1278)
at org.openremote.controller.statuscache.rules.RuleEngine.push(RuleEngine.java:203)
at org.openremote.controller.statuscache.EventProcessorChain.push(EventProcessorChain.java:196)
at org.openremote.controller.statuscache.StatusCache.update(StatusCache.java:293)
at org.openremote.controller.model.sensor.Sensor.update(Sensor.java:367)
at org.openremote.protocol.zwave.ZWaveCommand.updateSensors(ZWaveCommand.java:587)
at org.openremote.protocol.zwave.model.commandclasses.CCMultiLevelSensor.updateSensorCommand(CCMultiLevelSensor.java:1769)
at org.openremote.protocol.zwave.model.commandclasses.CCMultiLevelSensor.linkSensorCommand(CCMultiLevelSensor.java:1357)
at org.openremote.protocol.zwave.model.ZWaveNode.linkSensorCommand(ZWaveNode.java:858)
at org.openremote.protocol.zwave.model.ZWaveNode.addSensorCommand(ZWaveNode.java:993)
at org.openremote.protocol.zwave.ZWaveCommand.setSensor(ZWaveCommand.java:461)
at org.openremote.controller.model.sensor.Sensor.start(Sensor.java:412)
at org.openremote.controller.deployer.Version20ModelBuilder.buildSensorModel(Version20ModelBuilder.java:718)
at org.openremote.controller.deployer.Version20ModelBuilder.build(Version20ModelBuilder.java:595)
at org.openremote.controller.deployer.AbstractModelBuilder.buildModel(AbstractModelBuilder.java:154)
at org.openremote.controller.service.Deployer.startup(Deployer.java:1060)
at org.openremote.controller.service.Deployer.softRestart(Deployer.java:455)
at org.openremote.controller.service.Deployer$ControllerDefinitionWatch.run(Deployer.java:1642)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NumberFormatException: For input string: “83.44”
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
at java.lang.Integer.parseInt(Integer.java:615)
at org.openremote.controller.protocol.Rule_luminance427027631.defaultConsequence(Rule_luminance427027631.java:7)
at org.openremote.controller.protocol.Rule_luminance427027631DefaultConsequenceInvokerGenerated.evaluate(Unknown Source)
at org.openremote.controller.protocol.Rule_luminance427027631DefaultConsequenceInvoker.evaluate(Unknown Source)
at org.drools.core.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1089)
… 26 more
ERROR 2018-07-02 22:49:07,394 : Root Cause:
java.lang.NumberFormatException: For input string: “83.44”
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
at java.lang.Integer.parseInt(Integer.java:615)
at org.openremote.controller.protocol.Rule_luminance427027631.defaultConsequence(Rule_luminance427027631.java:7)
at org.openremote.controller.protocol.Rule_luminance427027631DefaultConsequenceInvokerGenerated.evaluate(Unknown Source)
at org.openremote.controller.protocol.Rule_luminance427027631DefaultConsequenceInvoker.evaluate(Unknown Source)
at org.drools.core.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1089)
at org.drools.core.phreak.RuleExecutor.fire(RuleExecutor.java:121)
at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:74)
at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1007)
at org.drools.core.common.DefaultAgenda.fireLoop(DefaultAgenda.java:1350)
at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1288)
at org.drools.core.impl.StatefulKnowledgeSessionImpl.internalFireAllRules(StatefulKnowledgeSessionImpl.java:1306)
at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1297)
at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1278)
at org.openremote.controller.statuscache.rules.RuleEngine.push(RuleEngine.java:203)
at org.openremote.controller.statuscache.EventProcessorChain.push(EventProcessorChain.java:196)
at org.openremote.controller.statuscache.StatusCache.update(StatusCache.java:293)
at org.openremote.controller.model.sensor.Sensor.update(Sensor.java:367)
at org.openremote.protocol.zwave.ZWaveCommand.updateSensors(ZWaveCommand.java:587)
at org.openremote.protocol.zwave.model.commandclasses.CCMultiLevelSensor.updateSensorCommand(CCMultiLevelSensor.java:1769)
at org.openremote.protocol.zwave.model.commandclasses.CCMultiLevelSensor.linkSensorCommand(CCMultiLevelSensor.java:1357)
at org.openremote.protocol.zwave.model.ZWaveNode.linkSensorCommand(ZWaveNode.java:858)
at org.openremote.protocol.zwave.model.ZWaveNode.addSensorCommand(ZWaveNode.java:993)
at org.openremote.protocol.zwave.ZWaveCommand.setSensor(ZWaveCommand.java:461)
at org.openremote.controller.model.sensor.Sensor.start(Sensor.java:412)
at org.openremote.controller.deployer.Version20ModelBuilder.buildSensorModel(Version20ModelBuilder.java:718)
at org.openremote.controller.deployer.Version20ModelBuilder.build(Version20ModelBuilder.java:595)
at org.openremote.controller.deployer.AbstractModelBuilder.buildModel(AbstractModelBuilder.java:154)
at org.openremote.controller.service.Deployer.startup(Deployer.java:1060)
at org.openremote.controller.service.Deployer.softRestart(Deployer.java:455)
at org.openremote.controller.service.Deployer$ControllerDefinitionWatch.run(Deployer.java:1642)
at java.lang.Thread.run(Thread.java:745)
ERROR [Controller Definition File Watcher for Default Deployer]: Root Cause:
rrd4j-config.xml (2.16 KB)