Ankündigung

Einklappen
Keine Ankündigung bisher.

LinKnx 'if-true' rule triggers unexpected

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    LinKnx 'if-true' rule triggers unexpected

    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:

    Code:
    <object id="switch_volume" gad="0/4/7" type="1.001" init="persist" flags="cwtur">Lautstärke</object>
    Here the definition of the rule:

    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>
    Here the evaluation result from the linknx output:

    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'
    Here the vbusmonitor1 result:

    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
    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


    #2
    Hi

    KNX only triggers changes. When the light is on and you send "on" nothing hapens.
    Grüsse Bodo
    Fragen gehören ins Forum, und nicht in mein Postfach;
    EibPC-Fan; Wiregate-Fan; Timberwolf-Fan mit 30x 1-Wire Sensoren;

    Kommentar


      #3
      Hi,

      I agree with you, I also don't understand, why this is toggeling. But - I would have expected, that nothing happens after the first 'on', because you haven't set your object flags to "s", which is necessary if you want to have triggers on the same value again and again. So I would give it a try with an "s".

      Regards,
      Waldemar
      OpenKNX www.openknx.de

      Kommentar


        #4
        Hi Waldemar,

        thanks for the hint. The problem seems to have something to do with the flags. I always had the u=update flag set. That one causes linknx to trigger on changes only. I'm still not sure what happened in the above setting, with the alternating values, but after changing the flags to "cwtrf" if works as expected.
        I use the f flag as I believe the s is deprecated or means anyway the same thing.

        Thanks again for the help

        Kommentar

        Lädt...
        X