Hi Jean-Francois,
I found an error in the time-counter condition.
When I use a time-counter with a "0" threshold, then the "on-false" is never executed.
i.e.:
Write from 0.0.0 to 10/5/15: 01
2010-11-27 23:16:58,555 INFO > Object - New value on for object Test_Switch1 (type: 1.001)
2010-11-27 23:16:58,555 DEBUG > Object - Calling onChange on listener for Test_Switch1
2010-11-27 23:16:58,556 INFO > SwitchingObject - SwitchingObject (id=Test_Switch1): Compare value_m='1' to value='1'
2010-11-27 23:16:58,556 INFO > Condition - ObjectCondition (id='Test_Switch1') evaluated as '1'
2010-11-27 23:16:58,556 INFO > Action - Execute SetValueAction with value on
2010-11-27 23:16:58,556 INFO > KnxConnection - write(gad=21776, buf, len=2):
Send request
2010-11-27 23:16:58,556 INFO > Object - New value on for object Test_Switch2 (type: 1.001)
Write from 0.0.0 to 10/5/16: 01
2010-11-27 23:16:58,557 INFO > Object - New value on for object Test_Switch2 (type: 1.001)
..........
Write from 0.0.0 to 10/5/15: 00
2010-11-27 23:17:19,453 INFO > Object - New value off for object Test_Switch1 (type: 1.001)
2010-11-27 23:17:19,453 DEBUG > Object - Calling onChange on listener for Test_Switch1
2010-11-27 23:17:19,453 INFO > SwitchingObject - SwitchingObject (id=Test_Switch1): Compare value_m='0' to value='1'
2010-11-27 23:17:19,453 INFO > Condition - ObjectCondition (id='Test_Switch1') evaluated as '0'
2010-11-27 23:17:19,453 INFO > FixedTimeTask - Rescheduled at 2010-11-27 23:17:40 (1290896260)
...
2010-11-27 23:17:40,204 INFO > TimerManager - TimerTask execution. 1290896260
2010-11-27 23:17:40,204 INFO > SwitchingObject - SwitchingObject (id=Test_Switch1): Compare value_m='0' to value='1'
2010-11-27 23:17:40,205 INFO > Condition - ObjectCondition (id='Test_Switch1') evaluated as '0'
2010-11-27 23:17:40,206 INFO > FixedTimeTask - Not rescheduled
everything works well: (especially for the "on-false" branch
Write from 0.0.0 to 10/5/15: 01
2010-11-27 23:07:09,475 INFO > Object - New value on for object Test_Switch1 (type: 1.001)
2010-11-27 23:07:09,475 DEBUG > Object - Calling onChange on listener for Test_Switch1
2010-11-27 23:07:09,475 INFO > SwitchingObject - SwitchingObject (id=Test_Switch1): Compare value_m='1' to value='1'
2010-11-27 23:07:09,475 INFO > Condition - ObjectCondition (id='Test_Switch1') evaluated as '1'
2010-11-27 23:07:09,475 INFO > FixedTimeTask - Rescheduled at 2010-11-27 23:7:11 (1290895631)
..........
2010-11-27 23:07:11,963 INFO > TimerManager - TimerTask execution. 1290895631
2010-11-27 23:07:11,964 INFO > SwitchingObject - SwitchingObject (id=Test_Switch1): Compare value_m='1' to value='1'
2010-11-27 23:07:11,964 INFO > Condition - ObjectCondition (id='Test_Switch1') evaluated as '1'
2010-11-27 23:07:11,964 INFO > Condition - TimeCounterCondition: counter is now '2'
2010-11-27 23:07:11,964 INFO > FixedTimeTask - Not rescheduled
2010-11-27 23:07:11,964 INFO > Action - Execute SetValueAction with value on
2010-11-27 23:07:11,964 INFO > KnxConnection - write(gad=21776, buf, len=2):
Send request
2010-11-27 23:07:11,966 INFO > Object - New value on for object Test_Switch2 (type: 1.001)
Write from 0.0.0 to 10/5/16: 01
2010-11-27 23:07:11,967 INFO > Object - New value on for object Test_Switch2 (type: 1.001)
....................
Write from 0.0.0 to 10/5/15: 00
2010-11-27 23:07:23,289 INFO > Object - New value off for object Test_Switch1 (type: 1.001)
2010-11-27 23:07:23,290 DEBUG > Object - Calling onChange on listener for Test_Switch1
2010-11-27 23:07:23,290 INFO > SwitchingObject - SwitchingObject (id=Test_Switch1): Compare value_m='0' to value='1'
2010-11-27 23:07:23,290 INFO > Condition - ObjectCondition (id='Test_Switch1') evaluated as '0'
2010-11-27 23:07:23,290 INFO > FixedTimeTask - Rescheduled at 2010-11-27 23:7:44 (1290895664)
..........
2010-11-27 23:07:44,023 INFO > TimerManager - TimerTask execution. 1290895664
2010-11-27 23:07:44,025 INFO > SwitchingObject - SwitchingObject (id=Test_Switch1): Compare value_m='0' to value='1'
2010-11-27 23:07:44,025 INFO > Condition - ObjectCondition (id='Test_Switch1') evaluated as '0'
2010-11-27 23:07:44,025 INFO > FixedTimeTask - Not rescheduled
2010-11-27 23:07:44,026 INFO > Action - Execute SetValueAction with value off
2010-11-27 23:07:44,026 INFO > KnxConnection - write(gad=21776, buf, len=2):
Send request
2010-11-27 23:07:44,032 INFO > Object - New value off for object Test_Switch2 (type: 1.001)
Write from 0.0.0 to 10/5/16: 00
2010-11-27 23:07:44,033 INFO > Object - New value off for object Test_Switch2 (type: 1.001)
I have not yet found the reason - probably you are faster :-)
Thank you very much,
best Regards, Jens
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I don't know this condition type (time-counter)…
Where can I found english or french documentation about it?
(I tried to read german posts… too difficult for me ;-))
Thanks,
Ben
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Jean-François,
I guess I found the reason for the problem and uploaded a patch, which - IMHO - should work.
I tested it here in a VM and it seems to do what is expected.
Can you please check???
Thanks, Best Regards, Jens
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Jean-Francois,
I found an error in the time-counter condition.
When I use a time-counter with a "0" threshold, then the "on-false" is never executed.
i.e.:
gives the following log:
when I use a threshold >0:
everything works well: (especially for the "on-false" branch
I have not yet found the reason - probably you are faster :-)
Thank you very much,
best Regards, Jens
Hi Jens,
I don't know this condition type (time-counter)…
Where can I found english or french documentation about it?
(I tried to read german posts… too difficult for me ;-))
Thanks,
Ben
Hi,
Jean-Francois, if it is OK for you, I have added explanation on the "condition's syntax" page.
https://sourceforge.net/apps/mediawiki/linknx/index.php?title=Condition%27s_Syntax
I wrote BETA on it…
BR, Jens
Hi Jean-François,
I guess I found the reason for the problem and uploaded a patch, which - IMHO - should work.
I tested it here in a VM and it seems to do what is expected.
Can you please check???
Thanks, Best Regards, Jens