Menu

questions while updating documentation

Damago
2012-07-27
2012-12-14
  • Damago

    Damago - 2012-07-27

    I am in the process of updating wiki. I have some questions:

    * What is the syntax of "set-rule-active" to disable a given rule?

    * Is the syntax for "start-actionlist" like this correct? <action type="start-actionlist" rule-id="flashing_lights" />. Am I right that it will simly exectute the on-true and if-true action of a specifict rule? Or I am wrong here and it is additional section paralell to on-true, on-false etc. which is meant to be executed always?

    * What is the syntax for formula action? Any examples?

    * What are the stateless rules which are not executed at init? to be honest I do not really understand what is going on when the system is starting up. Generally there are no flaws, but sometimes there is a sudden flash of some lights or some rule triggers. Sometimes it is good - like rules for calculating garage_full objects (true if any light in garage is on), but sometimes not - if during calculation a garage_full will be sent to a bus.
    To be more precise:
    - which rules will be executed at startup, and which not?

    * What do you mean by addition of the "Read version string and optional feature set on xml interface"? Any examples?

     
  • Anthony

    Anthony - 2012-07-28

    Hi,

    > I am in the process of updating wiki.
    very good idea thanks
    for knxweb too ?

    > * What is the syntax of "set-rule-active" to disable a given rule?

    <action type="set-rule-active" active="no" rule-id="RULEID" ></action>
    <action type="set-rule-active" active="yes" rule-id="RULEID" ></action>

    > * Is the syntax for "start-actionlist" like this correct? <action
    > type="start-actionlist" rule-id="flashing_lights" />. Am I right that it will
    > simly exectute the on-true and if-true action of a specifict rule? Or I am wrong
    > here and it is additional section paralell to on-true, on-false etc. which is
    > meant to be executed always?

    <action type="start-actionlist" list="true" rule-id="RULEID"></action>
    execute actions "if-true" or "on-true" of the rule

    <action type="start-actionlist" list="false" rule-id="RULEID"></action>
    so execute actions "if-false" or "on-false" of the rule

    > * What is the syntax for formula action? Any examples?

    <action type="formula" id="object_id_result" n="1.0" m="2.0" c="3.0" b="4.0" a="5.0" y="object_id_y" x="object_id_x" ></action>
    Formula : id=a*x^m+b*y^n+c => object_id_result = 5*object_id_x^2+4*object_id_y^1+3

    > * What are the stateless rules which are not executed at init?

    for exemple if tou have a rule with a timer condition from 8h00 until 20h00 without trigger
    and on restart of linknx at 9h i think the rule will not be on the "good status" for this condition she's not "true"

    > To be more precise:
    > - which rules will be executed at startup, and which not?
    with the new attribut init="false" (default) of the rule if "true" the rule will be reevaluate on restart of linknx

    > * What do you mean by addition of the "Read version string and optional feature
    > set on xml interface"? Any examples?

    we can use on xml interface :
    <read><version/></read>

    response of linknx :
    <read status="success">
        <version>
            <value>0.0.1.30</value>
            <features>
                <sms />
                <e-mail />
                <mysql />
                <lua />
                <log4cpp />
            </features>
        </version>
    </read>
    here linknx 0.0.1.30 is configure with : sms, mysql, lua and log4cpp "function"

    thanks
    Anthony.

     
  • Othmar

    Othmar - 2012-08-18

    Hi,

    I just rechecked the Rules section in the wiki. I think the bullets describing the components of a rule don't match the syntax definition below. The result is a wrong understanding of "on-true" versus "if-true" from my viewpoint. To make it very clear the correct type could be added to each bullet point.

    Regards, Othmar

     

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.