This works fine for the first "on" I got on the bus. But if I press "on" a second time, all I got in the log is the following:
1320393107 INFO Object : New value on for object DummySwitch (type: 1.001)
1320393107 INFO Rule : Evaluate rule DummyTest
1320393107 INFO ObjectValue : SwitchingObjectValue: Compare value_m='1' to value='1'
1320393107 INFO Condition : ObjectCondition (id='DummySwitch') evaluated as '1'
1320393107 INFO Rule : Rule DummyTest evaluated as 1, prev value was 1
1320393107 INFO FilePersistentStorage : Writing log'on' for object 'DummySwitch'
Because of the of "evaluated as 1, previous value was 1", the rule behind here is not executed.
I understand the problem, because this could create infinite loops, but is there a was to for the execution of the Rule "DummyTest" whenever I receive a "on" signal?
For several reasons I can not set the DummySwitch to off after the evaluation of the rule.
Thanks….Netsrac
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hi,
following analysis I made a mistake it's the opposite:
1) <actionlist type="if-true"> => is execute when the condition is true (don't look the previous value)
2) the default <actionlist type="on-true"> => is execute when the condition change in false to true the second
you have to use <actionlist type="if-true">
sorry ;-)
bye,
Anthony.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey Guys,
this is something that has happened to me a thousand times and I try to understand it.
I do have a rule which is running fine - just as an example:
<rule id="DummyTest">
<condition type="object" id="DummySwitch" value="on" trigger="true" />
<actionlist>
<action type="set-value" id="DummyLamp" value="on" />
</actionlist>
</rule>
This works fine for the first "on" I got on the bus. But if I press "on" a second time, all I got in the log is the following:
1320393107 INFO Object : New value on for object DummySwitch (type: 1.001)
1320393107 INFO Rule : Evaluate rule DummyTest
1320393107 INFO ObjectValue : SwitchingObjectValue: Compare value_m='1' to value='1'
1320393107 INFO Condition : ObjectCondition (id='DummySwitch') evaluated as '1'
1320393107 INFO Rule : Rule DummyTest evaluated as 1, prev value was 1
1320393107 INFO FilePersistentStorage : Writing log'on' for object 'DummySwitch'
Because of the of "evaluated as 1, previous value was 1", the rule behind here is not executed.
I understand the problem, because this could create infinite loops, but is there a was to for the execution of the Rule "DummyTest" whenever I receive a "on" signal?
For several reasons I can not set the DummySwitch to off after the evaluation of the rule.
Thanks….Netsrac
hi,
there is 2 type of <actionlist>
1) the default <actionlist type="if-true">
2) and <actionlist type="on-true">
the first is execute when the condition change in false to true
the second is execute when the condition is true (don't look the previous value)
i think for you, you have to use :
Anthony
hi,
following analysis I made a mistake it's the opposite:
1) <actionlist type="if-true"> => is execute when the condition is true (don't look the previous value)
2) the default <actionlist type="on-true"> => is execute when the condition change in false to true the second
you have to use <actionlist type="if-true">
sorry ;-)
bye,
Anthony.
Perfect…thanks, this works fine…
I love all those undocumented features…I should better read the code itself :-)
I have added this to documentation. Also re-arranged the section regarding rules for this and other things to be more explanatory.