Menu

action an change condition

Help
Anonymous
2011-03-22
2012-12-14
  • Anonymous

    Anonymous - 2011-03-22

    Hi,
    I have a 5.xxx value and if this change it should  be performed an action. What condition must I define this?
    thanks
    Mario

     
  • Othmar

    Othmar - 2011-03-22

    Hi,
    you need to define a rule and a condition with some comparision and the trigger set to true and then the action list should be executed every time the value changes.

    <rule id="rulename">
      <condition type="object" id="objectname"  value=.... trigger="true"/>
      <actionlist type="if-true">
          <action type=.... .... .. />
      </actionlist>
    </rule>
    

    You need the "if-true" in actionlist if you want the action be executed every time the object changes. Without "if-true" the actions are only executed if the result of the condition changes. For the condition you can also chose something which is always true if you need that.
    Please read http://sourceforge.net/apps/mediawiki/linknx/index.php?title=Condition%27s_Syntax

     
  • jef2000

    jef2000 - 2011-03-22

    Hi,

    You can completely remove the value="…." parameter in this case. Without this parameter, the condition is always true, but that's ok because the "if-true" action list will be executed every time the trigger is fired.
    If the object that fires the trigger is stateless (it has the 's' flag), the rule will be executed every time the value is received from the KNX bus or internally set (by a rule, by knxweb, ….)
    If not (i.e. no 's' flag), the rule will be executed only if the value has changed.

    Jean-François

     
  • Anonymous

    Anonymous - 2011-03-25

    Great, thanks a lot. That helps

    Mario

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.