I have configured a time rule to control my Espresso maker, but the timer rule does not trigger as expected. Any hint what is wrong with my setup would be highly appreciated:
<!-- Espressmaschine --><ruleid="Espressomaschine"><conditiontype="or"><conditiontype="timer"trigger="true"><athour="6"min="30"wdays="12345"exception="no"/><untilhour="8"min="30"/></condition><conditiontype="timer"trigger="true"><athour="10"min="00"wdays="12345"exception="no"/><untilhour="11"min="30"/></condition><conditiontype="timer"trigger="true"><athour="14"min="30"wdays="12345"exception="no"/><untilhour="16"min="30"/></condition><conditiontype="timer"trigger="true"><athour="8"min="00"wdays="67"exception="no"/><untilhour="10"min="30"/></condition><conditiontype="timer"trigger="true"><athour="14"min="45"wdays="67"exception="no"/><untilhour="16"min="30"/></condition><conditiontype="timer"trigger="true"><athour="8"min="0"exception="yes"/><untilhour="10"min="0"/></condition><conditiontype="timer"trigger="true"><athour="14"min="45"exception="yes"/><untilhour="16"min="30"/></condition></condition><!-- or --><actionlisttype="if-true"><actiontype="set-value"id="Espresso_Maschine"value="on"/></actionlist><actionlisttype="if-false"><actiontype="set-value"id="Espresso_Maschine"value="off"/></actionlist></rule>
I would expect to timer rule to switch the machine off at 11:30 this morning, but this didn't happen:
20120513 11:30:00,922 DEBUG PeriodicTask : PeriodicTask::onTimer Sun May 13 11:30:00 2012 (owner: Es
pressomaschine)
20120513 11:30:00,922 INFO Rule : Evaluate rule Espressomaschine
20120513 11:30:00,922 INFO Condition : TimerCondition evaluated as '0'
20120513 11:30:00,923 DEBUG Condition :
<TimerCondition::evaluatetype="timer"trigger="true"><athour="6"min="30"exception="no"wdays="12345"/><untilhour="8"min="30"/><STATUStype="timer"trigger="true"next-exec="2012-05-14 6:30:00"value_m="false"owner="Espressomaschine"/></TimerCondition::evaluate>
20120513 11:30:00,923 INFO Condition : TimerCondition evaluated as '0'
20120513 11:30:00,924 DEBUG Condition :
<TimerCondition::evaluatetype="timer"trigger="true"><athour="10"min="0"exception="no"wdays="12345"/><untilhour="11"min="30"/><STATUStype="timer"trigger="true"next-exec="2012-05-13 11:30:00"value_m="false"owner="Espressomaschine"/></TimerCondition::evaluate>
20120513 11:30:00,924 INFO Condition : TimerCondition evaluated as '1'
20120513 11:30:00,925 DEBUG Condition :
<TimerCondition::evaluatetype="timer"trigger="true"><athour="14"min="30"exception="no"wdays="12345"/><untilhour="16"min="30"/><STATUStype="timer"trigger="true"next-exec="2012-05-13 16:30:00"value_m="true"owner="Espressomaschine"/></TimerCondition::evaluate>
20120513 11:30:00,925 INFO Rule : Rule Espressomaschine evaluated as 1, prev value was 1
20120513 11:30:00,926 DEBUG Rule : Action list 'true' executed for rule Espressomaschine
20120513 11:30:00,928 DEBUG Rule :
<Rule::evaluateid="Espressomaschine"><conditiontype="or"><conditiontype="timer"trigger="true"><athour="6"min="30"exception="no"wdays="12345"/><untilhour="8"min="30"/></condition><conditiontype="timer"trigger="true"><athour="10"min="0"exception="no"wdays="12345"/><untilhour="11"min="30"/></condition><conditiontype="timer"trigger="true"><athour="14"min="30"exception="no"wdays="12345"/><untilhour="16"min="30"/></condition><conditiontype="timer"trigger="true"><athour="8"min="0"exception="no"wdays="67"/><untilhour="10"min="30"/></condition><conditiontype="timer"trigger="true"><athour="14"min="45"exception="no"wdays="67"/><untilhour="16"min="30"/></condition><conditiontype="timer"trigger="true"><athour="8"min="0"exception="yes"/><untilhour="10"min="0"/></condition><conditiontype="timer"trigger="true"><athour="14"min="45"exception="yes"/><untilhour="16"min="30"/></condition></condition><actionlisttype="if-true"><actiontype="set-value"id="Espresso_Maschine"value="on"/></actionlist><actionlisttype="if-false"><actiontype="set-value"id="Espresso_Maschine"value="off"/></actionlist><STATUSid="Espressomaschine"active="true"Stateless="ifTrue"state="true"><conditiontype="or"><conditiontype="timer"trigger="true"next-exec="2012-05-14 6:30:00"value_m="false"owner="Espressomaschine"/><conditiontype="timer"trigger="true"next-exec="2012-05-13 11:30:00"value_m="false"owner="Espressomaschine"/><conditiontype="timer"trigger="true"next-exec="2012-05-13 16:30:00"value_m="true"owner="Espressomaschine"/><conditiontype="timer"trigger="true"next-exec="2012-05-19 8:00:00"value_m="false"owner="Espressomaschine"/><conditiontype="timer"trigger="true"next-exec="2012-05-13 14:45:00"value_m="false"owner="Espressomaschine"/><conditiontype="timer"trigger="true"next-exec="2012-07-21 8:00:00"value_m="false"owner="Espressomaschine"/><conditiontype="timer"trigger="true"next-exec="2012-05-13 16:30:00"value_m="true"owner="Espressomaschine"/></condition></STATUS></Rule::evaluate>
20120513 11:30:00,929 DEBUG PeriodicTask : reschedule[Espressomaschine, 18:27:30.015]( Sun May 13 11:30:00 2012 ) nextExecTime_m = Sun May 13 11:30:00 2012 at_m=--::00:00 (wdays=31; exception=0) until_m=--::30:00 (wdays=0; exception=2), during_m = -1, after_m = -1, value_m = 0
20120513 11:30:00,929 INFO PeriodicTask : Rescheduled at 2012-05-14 10:00:00 (1336982400)
Any idea why at 11:30 (at the end of an 'until 11:30' statement) the rule does not switch the Espresso maker off?
Have a great weekend and please let me know any thoughts to solve this,
Klaus
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I know this timer problem, it's due to the initial value of the timer condition. At startup, linknx will try to guess what's the actual value. For this, it will look in the future and determine which one of the "at" or "until" part will occur first. If the "at" occurs first, it will initialize to "false", if the "until" occurs first, it will initialize to "true".
In your case:
<condition type="timer" trigger="true">
<at hour="14" min="30" exception="no" wdays="12345" />
<until hour="16" min="30" />
</condition>
It's sunday. The "at" will occur only on monday, while the "until" will occur sunday 4:30pm. That's why this condition will evaluate to "true" and cause the "or" condition to also stay "true" .
That's what you see with the following log messages
20120513 11:30:00,924 INFO Condition : TimerCondition evaluated as '1'
20120513 11:30:00,925 INFO Rule : Rule Espressomaschine evaluated as 1, prev value was 1
There is a parameter to set the condition initial value and avoid this "guess". You can add initval="false" to all the timers.
Like this:
<condition type="timer" trigger="true" initval="false">
<at hour="14" min="30" exception="no" wdays="12345" />
<until hour="16" min="30" />
</condition>
Of course with this initial value, if you start linknx between 14:30 and 16:30, nothing will happen and you'll have to wait the next day to see your espresso machine up.
Regards,
Jean-François
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have the same kind of problem. If I start linknx at a time where the timer should switch on, nothing happens.
<objecttype="1.001"id="lampe_terr_droite"gad="0/0/2"init="request">Lampe devant terasse droite</object><ruleid="Dummy_timer"><conditiontype="timer"trigger="true"><athour="5"min="0"/><untilhour="23"min="00"/></condition><actionlist><actiontype="set-value"id="lampe_terr_droite"value="on"/></actionlist></rule>
If I start linknx at e.g. 8 A.M. it does not switch on.
Hi everyone,
I have configured a time rule to control my Espresso maker, but the timer rule does not trigger as expected. Any hint what is wrong with my setup would be highly appreciated:
Object
Timer rule:
I would expect to timer rule to switch the machine off at 11:30 this morning, but this didn't happen:
Any idea why at 11:30 (at the end of an 'until 11:30' statement) the rule does not switch the Espresso maker off?
Have a great weekend and please let me know any thoughts to solve this,
Klaus
Hi,
try like this :
Regards,
Anthony.
Hi,
I know this timer problem, it's due to the initial value of the timer condition. At startup, linknx will try to guess what's the actual value. For this, it will look in the future and determine which one of the "at" or "until" part will occur first. If the "at" occurs first, it will initialize to "false", if the "until" occurs first, it will initialize to "true".
In your case:
<condition type="timer" trigger="true">
<at hour="14" min="30" exception="no" wdays="12345" />
<until hour="16" min="30" />
</condition>
It's sunday. The "at" will occur only on monday, while the "until" will occur sunday 4:30pm. That's why this condition will evaluate to "true" and cause the "or" condition to also stay "true" .
That's what you see with the following log messages
20120513 11:30:00,924 INFO Condition : TimerCondition evaluated as '1'
20120513 11:30:00,925 INFO Rule : Rule Espressomaschine evaluated as 1, prev value was 1
There is a parameter to set the condition initial value and avoid this "guess". You can add initval="false" to all the timers.
Like this:
<condition type="timer" trigger="true" initval="false">
<at hour="14" min="30" exception="no" wdays="12345" />
<until hour="16" min="30" />
</condition>
Of course with this initial value, if you start linknx between 14:30 and 16:30, nothing will happen and you'll have to wait the next day to see your espresso machine up.
Regards,
Jean-François
Hi,
I have the same kind of problem. If I start linknx at a time where the timer should switch on, nothing happens.
If I start linknx at e.g. 8 A.M. it does not switch on.
2012-12-15 07:43:58 [ INFO] Rule: Rule: Configuring Dummy_timer (active=1)
2012-12-15 07:43:58 [ INFO] TimeSpec: 1899-0--1 5:0:0 (wdays=0; exception=2)
2012-12-15 07:43:58 [ INFO] TimeSpec: 1899-0--1 9:0:0 (wdays=0; exception=2)
2012-12-15 07:43:58 [ INFO] PeriodicTask: Rescheduled at 2012-12-15 9:0:0 (1355558400)
2012-12-15 07:43:58 [ INFO] Rule: ActionList: Configuring 'on-true' action list
2012-12-15 07:43:58 [ INFO] Action: SetValueAction: Configured for object lampe_terr_droite with value on
2012-12-15 07:43:58 [ INFO] Rule: Rule: Configuration done
I am trying around since quite a while.
Any idea what's wrong.
Rainer