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 :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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 :)
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