2017-11-07 18:17:31,914 ERROR [Polling Sensor Thread ID = 100118, Name ='virtual_volet_salon_status']: Error in executing rule : virtual_volet_salon_status:java.lang.Integer cannot be cast to java.lang.String Event org.openremote.controller.model.event.CustomState@88f8eeca not processed!java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String at java.lang.String.compareTo(String.java:111) at ConditionEvaluator39b0ecb05ada40729038151938a5ae45.evaluate(Unknown Source) at org.drools.core.rule.constraint.MvelConstraint.evaluate(MvelConstraint.java:258) at org.drools.core.rule.constraint.MvelConstraint.isAllowedCachedLeft(MvelConstraint.java:226) at org.drools.core.common.SingleBetaConstraints.isAllowedCachedLeft(SingleBetaConstraints.java:138) at org.drools.core.phreak.PhreakJoinNode.doLeftInserts(PhreakJoinNode.java:113) at org.drools.core.phreak.PhreakJoinNode.doNode(PhreakJoinNode.java:76) at org.drools.core.phreak.RuleNetworkEvaluator.switchOnDoBetaNode(RuleNetworkEvaluator.java:519) at org.drools.core.phreak.RuleNetworkEvaluator.evalBetaNode(RuleNetworkEvaluator.java:505) at org.drools.core.phreak.RuleNetworkEvaluator.evalNode(RuleNetworkEvaluator.java:341) at org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:301) at org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:136) at org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:94) at org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:194) at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:73) 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.controller.model.sensor.Sensor$DeviceReader.run(Sensor.java:655) at java.lang.Thread.run(Thread.java:744)2017-11-07 18:17:41,929 ERROR [Polling Sensor Thread ID = 100266, Name ='thermostat_varia']: Error in executing rule : thermostat_varia:java.lang.Integer cannot be cast to java.lang.String Event Range Event (ID = 100266, Source = 'thermostat_varia', Value = '15', Boundaries = [15...30]) not processed!java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String at java.lang.String.compareTo(String.java:111) at ConditionEvaluatorb7240dd69dd44b86906e848648e42427.evaluate(Unknown Source) at org.drools.core.rule.constraint.MvelConstraint.evaluate(MvelConstraint.java:258) at org.drools.core.rule.constraint.MvelConstraint.isAllowedCachedLeft(MvelConstraint.java:226) at org.drools.core.common.SingleBetaConstraints.isAllowedCachedLeft(SingleBetaConstraints.java:138) at org.drools.core.phreak.PhreakJoinNode.doLeftInserts(PhreakJoinNode.java:113) at org.drools.core.phreak.PhreakJoinNode.doNode(PhreakJoinNode.java:76) at org.drools.core.phreak.RuleNetworkEvaluator.switchOnDoBetaNode(RuleNetworkEvaluator.java:519) at org.drools.core.phreak.RuleNetworkEvaluator.evalBetaNode(RuleNetworkEvaluator.java:505) at org.drools.core.phreak.RuleNetworkEvaluator.evalNode(RuleNetworkEvaluator.java:341) at org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:301) at org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:136) at org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:94) at org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:194) at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:73) 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.controller.model.sensor.Sensor$DeviceReader.run(Sensor.java:655) at java.lang.Thread.run(Thread.java:744)2017-11-07 18:17:41,934 ERROR [Polling Sensor Thread ID = 100291, Name ='VKEY4']: Error in executing rule : VKEY4:java.lang.Integer cannot be cast to java.lang.String Event org.openremote.controller.model.event.CustomState@4e092ee not processed!java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String at java.lang.String.compareTo(String.java:111) at ConditionEvaluator39b0ecb05ada40729038151938a5ae45.evaluate(Unknown Source) at org.drools.core.rule.constraint.MvelConstraint.evaluate(MvelConstraint.java:258) at org.drools.core.rule.constraint.MvelConstraint.isAllowedCachedLeft(MvelConstraint.java:226) at org.drools.core.common.SingleBetaConstraints.isAllowedCachedLeft(SingleBetaConstraints.java:138) at org.drools.core.phreak.PhreakJoinNode.doLeftInserts(PhreakJoinNode.java:113) at org.drools.core.phreak.PhreakJoinNode.doNode(PhreakJoinNode.java:76) at org.drools.core.phreak.RuleNetworkEvaluator.switchOnDoBetaNode(RuleNetworkEvaluator.java:519) at org.drools.core.phreak.RuleNetworkEvaluator.evalBetaNode(RuleNetworkEvaluator.java:505) at org.drools.core.phreak.RuleNetworkEvaluator.evalNode(RuleNetworkEvaluator.java:341) at org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:301) at org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:136) at org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:94) at org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:194) at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:73) 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.controller.model.sensor.Sensor$DeviceReader.run(Sensor.java:655) at java.lang.Thread.run(Thread.java:744)2017-11-07 18:19:28,634 ERROR [Polling Sensor Thread ID = 100266, Name ='thermostat_varia']: Error in executing rule : thermostat_varia:java.lang.Integer cannot be cast to java.lang.String Event Range Event (ID = 100266, Source = 'thermostat_varia', Value = '22', Boundaries = [15...30]) not processed!java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String at java.lang.String.compareTo(String.java:111) at ConditionEvaluatorb7240dd69dd44b86906e848648e42427.evaluate(Unknown Source) at org.drools.core.rule.constraint.MvelConstraint.evaluate(MvelConstraint.java:258) at org.drools.core.rule.constraint.MvelConstraint.isAllowedCachedLeft(MvelConstraint.java:226) at org.drools.core.common.SingleBetaConstraints.isAllowedCachedLeft(SingleBetaConstraints.java:138) at org.drools.core.phreak.PhreakJoinNode.doLeftInserts(PhreakJoinNode.java:113) at org.drools.core.phreak.PhreakJoinNode.doNode(PhreakJoinNode.java:76) at org.drools.core.phreak.RuleNetworkEvaluator.switchOnDoBetaNode(RuleNetworkEvaluator.java:519) at org.drools.core.phreak.RuleNetworkEvaluator.evalBetaNode(RuleNetworkEvaluator.java:505) at org.drools.core.phreak.RuleNetworkEvaluator.evalNode(RuleNetworkEvaluator.java:341) at org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:301) at org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:136) at org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:94) at org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:194) at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:73) 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.controller.model.sensor.Sensor$DeviceReader.run(Sensor.java:655) at java.lang.Thread.run(Thread.java:744)
package org.openremote.controller.protocolglobal org.openremote.controller.statuscache.CommandFacade execute;global org.openremote.controller.statuscache.SwitchFacade switches;import org.openremote.controller.utils.Logger;import org.openremote.controller.Constants;import org.openremote.controller.model.event.*import java.util.Date;import java.text.SimpleDateFormat;rule "start_system"when eval(true)thenexecute.command( "thermostat_varia", 15);execute.command( "securite_status", 0);execute.command( "virtual_etat_multisensor", 0);execute.command( "virtual_etat_porte", 0);execute.command( "virtual_etat_capteur_fumee", 0);execute.command( "virtual_etat_capteur_eau", 0);execute.command( "armement_on" );execute.command( "thermostat_image", 0);execute.command("VCODE","-");execute.command("VKEY","-");endrule "Alarme" whenEvent( source == "detection_porte", value == "on" )Event( source == "armement_status", value == "on" )thenexecute.command( "sms_ouverture" );endrule "Time detecteur fumee" whenEvent( source == "detection_fumee", value == "on" )thenDate now = new Date();SimpleDateFormat dateFormatter = new SimpleDateFormat("dd-MM' ---- 'H:mm:ss");execute.command("heure_detection_fumee", "" +dateFormatter.format(now));endrule "Time detecteur eau" whenEvent( source == "detection_innondation", value == "on" )thenDate now = new Date();SimpleDateFormat dateFormatter = new SimpleDateFormat("dd-MM' ---- 'H:mm:ss");execute.command("heure_detection_innondation", "" +dateFormatter.format(now));endrule "Time multisensor" whenEvent( source == "detection", value == "on" )thenDate now = new Date();SimpleDateFormat dateFormatter = new SimpleDateFormat("dd-MM' ---- 'H:mm:ss");execute.command("heure_detection_multisensor", "" +dateFormatter.format(now));endrule "Time porte" whenEvent( source == "detection_porte", value == "on" )thenDate now = new Date();SimpleDateFormat dateFormatter = new SimpleDateFormat("dd-MM' ---- 'H:mm:ss");execute.command("heure_detection_porte", "" +dateFormatter.format(now));endrule "etat_multisensor_on"whenEvent( source == "etat_multisensor" , value == "on" )thenexecute.command( "virtual_etat_multisensor", 0);endrule "etat_multisensor_off"timer (int: 175000s)whenEvent( source == "etat_multisensor" , value == "off" )thenexecute.command( "virtual_etat_multisensor", 1);endrule "battery_multisensor_hs" whenEvent( source == "battery_multisensor", value == 255)thenexecute.command( "virtual_battery_multisensor", 0);endrule "battery_multisensor_faible" whenEvent( source == "battery_multisensor", value <= 9)thenexecute.command( "virtual_battery_multisensor", 0);endrule "battery_multisensor_moyen" whenEvent( source == "battery_multisensor", value >= 10 && <= 49)thenexecute.command( "virtual_battery_multisensor", 1 );endrule "battery_multisensor_elevee" whenEvent( source == "battery_multisensor", value >= 50 && <= 100)thenexecute.command( "virtual_battery_multisensor", 2 );endrule "etat_detecteur_porte_on"whenEvent( source == "etat_porte" , value == "on" )thenexecute.command( "virtual_etat_porte", 0);endrule "etat_detecteur_porte_off"timer (int: 175000s)whenEvent( source == "etat_porte" , value == "off" )thenexecute.command( "virtual_etat_porte", 1);endrule "battery_porte_hs" whenEvent( source == "battery_porte", value == 255)thenexecute.command( "virtual_battery_porte", 0);endrule "battery_porte_faible" whenEvent( source == "battery_porte", value <= 9)thenexecute.command( "virtual_battery_porte", 0);endrule "battery_porte_moyen" whenEvent( source == "battery_porte", value >= 10 && <= 49)thenexecute.command( "virtual_battery_porte", 1 );endrule "battery_porte_elevee" whenEvent( source == "battery_porte", value >= 50 && <= 100)thenexecute.command( "virtual_battery_porte", 2 );endrule "etat_capteur_eau_on"whenEvent( source == "etat_capteur_eau" , value == "on" )thenexecute.command( "virtual_etat_capteur_eau", 0);endrule "etat_capteur_eau_off"timer (int: 175000s)whenEvent( source == "etat_capteur_eau" , value == "off" )thenexecute.command( "virtual_etat_capteur_eau", 1);endrule "battery_capteur_eau_hs" whenEvent( source == "battery_capteur_eau", value == 255)thenexecute.command( "virtual_battery_capteur_eau", 0);endrule "battery_capteur_eau_faible" whenEvent( source == "battery_capteur_eau", value <= 9)thenexecute.command( "virtual_battery_capteur_eau", 0);endrule "battery_capteur_eau_moyen" whenEvent( source == "battery_capteur_eau", value >= 10 && <= 49)thenexecute.command( "virtual_battery_capteur_eau", 1 );endrule "battery_capteur_eau_elevee" whenEvent( source == "battery_capteur_eau", value >= 50 && <= 100)thenexecute.command( "virtual_battery_capteur_eau", 2 );endrule "etat_capteur_fumee_on"whenEvent( source == "etat_capteur_fumee" , value == "on" )thenexecute.command( "virtual_etat_capteur_fumee", 0);endrule "etat_capteur_fumee_off"timer (int: 175000s)whenEvent( source == "etat_capteur_fumee" , value == "off" )thenexecute.command( "virtual_etat_capteur_fumee", 1);endrule "battery_capteur_fumee_hs" whenEvent( source == "battery_capteur_fumee", value == 255)thenexecute.command( "virtual_battery_capteur_fumee", 0);endrule "battery_capteur_fumee_faible" whenEvent( source == "battery_capteur_fumee", value <= 9)thenexecute.command( "virtual_battery_capteur_fumee", 0);endrule "battery_capteur_fumee_moyen" whenEvent( source == "battery_capteur_fumee", value >= 10 && <= 49)thenexecute.command( "virtual_battery_capteur_fumee", 1 );endrule "battery_capteur_fumee_elevee" whenEvent( source == "battery_capteur_fumee", value >= 50 && <= 100)thenexecute.command( "virtual_battery_capteur_fumee", 2 );endrule "Depart1"timer (cron: 0 30 08 * * ?)when eval(true)thenexecute.command( "securite_status", 1);endrule "Depart2"timer (cron: 0 00 10 * * ?)when eval(true)thenexecute.command( "securite_status", 0);endrule "Arrivee1"timer (cron: 0 00 15 * * ?)when eval(true)thenexecute.command( "securite_status", 2);endrule "Arrivee2"timer (cron: 0 30 17 * * ?)when eval(true)thenexecute.command( "securite_status", 0);endrule "Allez" whenEvent( source == "securite_status", value == 1)Event( source == "detection_porte", value == "on" )thenexecute.command("volet_salon_varia", 30);execute.command("volet_cuisine_varia", 50);endrule "Viens" whenEvent( source == "securite_status", value == 2)Event( source == "detection_porte", value == "on" )thenexecute.command("volet_salon_varia", 99);execute.command("volet_cuisine_varia", 99);endrule "status_volet_salon_off" whenEvent( source == "volet_salon_conso", value <= 10)thenexecute.command( "virtual_volet_salon_status", 0 );endrule "status_volet_salon_on" whenEvent( source == "volet_salon_conso", value >= 15)thenexecute.command( "virtual_volet_salon_status", 1 );endrule "status_volet_cuisine_off" whenEvent( source == "volet_cuisine_conso", value <= 10)thenexecute.command( "virtual_volet_cuisine_status", 0 );endrule "status_volet_cuisine_on" whenEvent( source == "volet_cuisine_conso", value >= 15)thenexecute.command( "virtual_volet_cuisine_status", 1 );endrule "Dodo_off"timer (int: 2s)whenEvent( source == "dodo_status" , value == "on" )thenexecute.command( "dodo_off" );endrule "dodo" whenEvent( source == "dodo_status", value == "on" )thenexecute.command("volet_salon_varia", 0);execute.command("volet_cuisine_varia", 0);endrule "Confort" whenEvent( source == "thermostat_varia", $h : value)Event( source == "temperature", value < $h)thenexecute.command( "chauffage_on" );endrule "Confort2" whenEvent( source == "thermostat_varia", $h : value)Event( source == "temperature", value > $h)thenexecute.command( "chauffage_off" );endrule "thermostat_froid" whenEvent( source == "temperature", value <= 18)thenexecute.command( "thermostat_image", 0);endrule "thermostat_chaud" whenEvent( source == "temperature", value >= 19)thenexecute.command( "thermostat_image", 1 );endrule "temperature_froid" whenEvent( source == "temperature_ext", value <= 18)thenexecute.command( "virtual_temperature_ext", 0);endrule "temperature_chaud" whenEvent( source == "temperature_ext", value >= 19)thenexecute.command( "virtual_temperature_ext", 1 );endrule "Key pressed"timer(int: 300ms) // debouncewhen$code:Event(source=="VCODE")Event($s:source matches "VKEY\\d+", value=="ON")thenexecute.command($s, "off");if($code.getValue().toString().equals("-")){execute.command("VCODE", $s.substring(4,5));}else{execute.command("VCODE", $code.getValue().toString() + $s.substring(4,5));}endrule "Code clear"timer(int: 5s) // clear code after 5 secondswhenEvent(source=="VCODE", value!="-")thenexecute.command("VKEY", "-");execute.command("VCODE", "-");endrule "Last key"whenEvent($s:source matches "VKEY\\d", value=="ON")thenexecute.command("VKEY", $s.substring(4,5));endrule "armement_off" whenEvent( source == "VCODE", value == "1987" )thenexecute.command("armement_off");end
rule "battery_capteur_fumee_moyen" when
Event( source == "battery_capteur_fumee", value >= 10 && <= 49)
then
execute.command( "virtual_battery_capteur_fumee", 1 );
end
rule "battery_capteur_fumee_moyen" when
Event( source == "battery_capteur_fumee", value >= "10" && <= "49")
then
execute.command( "virtual_battery_capteur_fumee", 1 );
end
Event( source == "battery_capteur_fumee", eval(Integer.parseInt(value.toString()) <= 9))
or
Event( source == "battery_capteur_fumee", value == "255")
Event( source == "battery_capteur_fumee", eval(Integer.parseInt(value.toString()) <= 9))
or
Event( source == "battery_capteur_fumee",eval(Integer.parseInt(value.toString()) == 255))
Event( source == "battery_capteur_fumee", eval(Integer.parseInt(value.toString()) <= 9)) || eval(Integer.parseInt(value.toString()) == 255))
Apparently this rule is problematic !!
rule "thermostat_salon_1" when
Event( source == "thermostat_varia_salon", $h : value)
Event( source == "temperature", value < $h)
then
execute.command( "chauffage_on" );
end
rule "thermostat_salon_2" when
Event( source == "thermostat_varia_salon", $h : value)
Event( source == "temperature", value > $h)
then
execute.command( "chauffage_off" );
end
TRACE 2017-11-19 13:13:37,291 (Drools): Inserted event Range Event (ID = 100266, Source = 'thermostat_varia_salon', Value = '15', Boundaries = [15...30])TRACE 2017-11-19 13:13:37,291 (Drools): Fact count: 68ERROR 2017-11-19 13:13:37,292 (Drools): Error in executing rule : thermostat_varia_salon:java.lang.Integer cannot be cast to java.lang.String Event Range Event (ID = 100266, Source = 'thermostat_varia_salon', Value = '15', Boundaries = [15...30]) not processed!
java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String at java.lang.String.compareTo(String.java:111)
at ConditionEvaluator15fe55c2cfa74c5ebfec216d2c692deb.evaluate(Unknown Source)
rule "thermostat_salon_1" when
Event( source == "thermostat_varia_salon", $h : value)
Event( source == "temperature", eval(Integer.parseInt(value.toString()) < $h) )
then
execute.command( "chauffage_on" );
end
Yes that's correct the "thermostat_varia_salon" sensor is a type of range while "temperature" is a custom type.I do not understand what I have to do when you say "make the second one range or level" ?
thank you
rule "thermostat_salon_1" when
Event( source == "thermostat_varia_salon", $h : value) Event( source == "temperature", eval(Integer.parseInt(value.toString()) < $h))
then
execute.command( "chauffage_on" );
end
rule "thermostat_salon_2" when
Event( source == "thermostat_varia_salon", $h : value) Event( source == "temperature", eval(Integer.parseInt(value.toString()) > $h))
then
execute.command( "chauffage_off" );
end
ERROR 2017-11-19 17:13:09,560 : Rule definition 'modeler_rules.drl' could not be deployed. See errors below.ERROR 2017-11-19 17:13:09,561 : Rule Compilation error The operator < is undefined for the argument type(s) int, ObjectERROR 2017-11-19 17:13:09,561 : Rule Compilation error The operator > is undefined for the argument type(s) int, ObjectERROR 2017-11-19 17:13:09,561 : Cannot start event processor 'Drools Rule Engine' : Cannot find KieModule: org.default:artifact:1.0.0-SNAPSHOT
rule "thermostat_salon_1" when
Event( source == "thermostat_varia_salon", $h : value)
Event( source == "temperature", value < $h)
then
execute.command( "chauffage_on" );
end
rule "thermostat_salon_1" when
Event( source == "thermostat_varia_salon", $h : value)
Event( source == "temperature", eval(Integer.parseInt(value.toString()) < Integer.parseInt($h.toString()) ))
then
execute.command( "chauffage_on" );
end