Menu

perform actions based on trends / performance

Help
Fraxinas
2012-01-30
2012-12-14
  • Fraxinas

    Fraxinas - 2012-01-30

    hi i've been running linknx for my entire domotic system for 2 years and i am very happy with it. now i've got something a little tricky… i want to analyze the variation of a certain temperature value in time and execute actions based on that. so basically if it rises by a certain amount of degrees in a certain time, an action will be triggered. so i'd have to calculate the first derivative and compare that value to a constant, but i'm not sure how i can accomplish that with lua… i guess it would require keeping a last value in a variable or something?
    maybe anybody here has an idea :)

     
  • jef2000

    jef2000 - 2012-05-15

    Hi,

    I didn't test it, but I think you should be able to do it with the following condition (only supported since v 0.0.1.30):
    <condition type="threshold" id="temp_xyz" delta-up="2" delta-low="3" trigger="true">
        <resetcondition type="timer" trigger="true">
            <every>10m</every>
        </resetcondition>
    </condition>
    Every 10 minutes, the actual value of object temp_xyz is stored and the condition will switch to "true" if the actual value is more than 2 degrees higher or 3 degrees lower than the stored value. At the end of the 10 minutes interval, the condition is always reset to "false".

    Regards,

    Jean-François

     

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.