Hi All,
if I understand the 'if-true' condition right, it always triggers when the condition is true no matter what the value was before.
In my case I defined a switch that should trigger the 'if-true' condition when 'on' arrives on the bus, and the 'if-false' condition if 0 arrives.
But what happens is that the rule alternates from the 'if-true' condition to the 'if-false' condition even if I only receive 'on' on the bus.
Here the definition of the object:
Here the definition of the rule:
Here the evaluation result from the linknx output:
Here the vbusmonitor1 result:
As you see in the vbusmonitor1 result I only receive 01 values on the bus. The condition 'switch_volume' evaluates alternating from 0 to 1. I just do not understand why. I would expect that it evaluates to 1 every time.
Maybe someone can shade some light into my darkness and has a clue why this is not working how expected.
Thanks a lot
if I understand the 'if-true' condition right, it always triggers when the condition is true no matter what the value was before.
In my case I defined a switch that should trigger the 'if-true' condition when 'on' arrives on the bus, and the 'if-false' condition if 0 arrives.
But what happens is that the rule alternates from the 'if-true' condition to the 'if-false' condition even if I only receive 'on' on the bus.
Here the definition of the object:
Code:
<object id="switch_volume" gad="0/4/7" type="1.001" init="persist" flags="cwtur">Lautstärke</object>
Code:
<rule id="change_volume"> <condition type="object" id="switch_volume" value="on" trigger="true" /> <actionlist type="if-true"> <action type="shell-cmd" cmd="changevolume.php 'Z2volume' '+5'" /> </actionlist> <actionlist type="if-false"> <action type="shell-cmd" cmd="changevolume.php 'Z2volume' '-5'" /> </actionlist> </rule>
Code:
2015-03-26 20:33:23 [ INFO] Object: New value on for object switch_volume (type: 1.001) 2015-03-26 20:33:23 [ INFO] Rule: Evaluate rule change_volume 2015-03-26 20:33:23 [ INFO] ObjectValue: SwitchingObjectValue: Compare value_m='1' to value='1' 2015-03-26 20:33:23 [ INFO] Condition: ObjectCondition (id='switch_volume') evaluated as '1' 2015-03-26 20:33:23 [ INFO] Rule: Rule change_volume evaluated as 1, prev value was 0 2015-03-26 20:33:23 [ INFO] FilePersistentStorage: Writing 'on' for object 'switch_volume' 2015-03-26 20:33:23 [ INFO] Action: Execute ShellCommandAction: changevolume.php 'Z2volume' '+5' 2015-03-26 20:33:27 [ INFO] Object: New value off for object switch_volume (type: 1.001) 2015-03-26 20:33:27 [ INFO] Rule: Evaluate rule change_volume 2015-03-26 20:33:27 [ INFO] ObjectValue: SwitchingObjectValue: Compare value_m='0' to value='1' 2015-03-26 20:33:27 [ INFO] Condition: ObjectCondition (id='switch_volume') evaluated as '0' 2015-03-26 20:33:27 [ INFO] Rule: Rule change_volume evaluated as 0, prev value was 1 2015-03-26 20:33:27 [ INFO] FilePersistentStorage: Writing 'off' for object 'switch_volume' 2015-03-26 20:33:27 [ INFO] Action: Execute ShellCommandAction: changevolume.php 'Z2volume' '-5' 2015-03-26 20:33:30 [ INFO] Object: New value on for object switch_volume (type: 1.001) 2015-03-26 20:33:30 [ INFO] Rule: Evaluate rule change_volume 2015-03-26 20:33:30 [ INFO] ObjectValue: SwitchingObjectValue: Compare value_m='1' to value='1' 2015-03-26 20:33:30 [ INFO] Condition: ObjectCondition (id='switch_volume') evaluated as '1' 2015-03-26 20:33:30 [ INFO] Rule: Rule change_volume evaluated as 1, prev value was 0 2015-03-26 20:33:30 [ INFO] FilePersistentStorage: Writing 'on' for object 'switch_volume' 2015-03-26 20:33:30 [ INFO] Action: Execute ShellCommandAction: changevolume.php 'Z2volume' '+5' 2015-03-26 20:33:32 [ INFO] Object: New value off for object switch_volume (type: 1.001) 2015-03-26 20:33:32 [ INFO] Rule: Evaluate rule change_volume 2015-03-26 20:33:32 [ INFO] ObjectValue: SwitchingObjectValue: Compare value_m='0' to value='1' 2015-03-26 20:33:32 [ INFO] Condition: ObjectCondition (id='switch_volume') evaluated as '0' 2015-03-26 20:33:32 [ INFO] Rule: Rule change_volume evaluated as 0, prev value was 1 2015-03-26 20:33:32 [ INFO] FilePersistentStorage: Writing 'off' for object 'switch_volume' 2015-03-26 20:33:32 [ INFO] Action: Execute ShellCommandAction: changevolume.php 'Z2volume' '-5' 2015-03-26 20:33:34 [ INFO] Object: New value on for object switch_volume (type: 1.001) 2015-03-26 20:33:34 [ INFO] Rule: Evaluate rule change_volume 2015-03-26 20:33:34 [ INFO] ObjectValue: SwitchingObjectValue: Compare value_m='1' to value='1' 2015-03-26 20:33:34 [ INFO] Condition: ObjectCondition (id='switch_volume') evaluated as '1' 2015-03-26 20:33:34 [ INFO] Rule: Rule change_volume evaluated as 1, prev value was 0 2015-03-26 20:33:34 [ INFO] FilePersistentStorage: Writing 'on' for object 'switch_volume' 2015-03-26 20:33:34 [ INFO] Action: Execute ShellCommandAction: changevolume.php 'Z2volume' '+5'
Code:
LPDU: BC 10 58 04 07 E1 00 81 68 :L_Data low from 1.0.88 to 0/4/7 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 01 LPDU: BC 10 58 04 07 E1 00 81 68 :L_Data low from 1.0.88 to 0/4/7 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 01 LPDU: BC 10 58 04 07 E1 00 81 68 :L_Data low from 1.0.88 to 0/4/7 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 01 LPDU: BC 10 58 04 07 E1 00 81 68 :L_Data low from 1.0.88 to 0/4/7 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 01 LPDU: BC 10 58 04 07 E1 00 81 68 :L_Data low from 1.0.88 to 0/4/7 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 01
Maybe someone can shade some light into my darkness and has a clue why this is not working how expected.
Thanks a lot
Kommentar