As a "proof of concept" for my project, I tried to create a simple rule based on an OR-condition: if one of two different lights is switched ON, a third light should switch ON as well.
(Below you find my full config file.)
When trying this, I start with all lights switched OFF and then run linknx.
Next, I switch one of the "source" lights ON. Linknx sees this change, but nothing else happens.
When I exit linknx (ctrl-C), suddenly the condition is evaluated and the "target" light switches ON.
You find a full transcript of console below -- blank lines and lines with ### were added manually.
$ # linknx -c/var/lib/linknx/test.xml1365969474 INFO Object : Configured object 'source 1': gad=1/0/7
1365969474 INFO Object : Configured object 'source 2': gad=1/0/2
1365969474 INFO Object : Configured object 'target': gad=1/0/3
1365969474 INFO Rule : Rule: Configuring test(active=1)1365969474 INFO Condition : ObjectCondition: configured value_m='on'1365969474 INFO Condition : ObjectCondition: configured value_m='on'1365969474 INFO Rule : ActionList: Configuring 'if-true' action list
1365969474 INFO Action : SetValueAction: Configured for object target with value on
1365969474 INFO Rule : ActionList: Configuring 'if-false' action list
1365969474 INFO Action : SetValueAction: Configured for object target with value off
1365969474 INFO Rule : Rule: Configuration done1365969474 INFO main : Config file loaded: /var/lib/linknx/test.xml
1365969474 INFO KnxConnection : KnxConnection: Group socket opened. Waiting for messages.
### push the button for 'source 2' ###1365969536 INFO Object : New value on for object source2(type: 1.001)1365969536 INFO Rule : Evaluate rule test1365969536 INFO KnxConnection : write(gad=1/0/7, buf, len=2)### quit linknx (ctrl-c) ###
^C1365969597 INFO Services : Stopping services
1365969597 INFO ObjectValue : SwitchingObjectValue: Compare value_m='0' to value='1'1365969597 INFO Condition : ObjectCondition (id='source 1') evaluated as '0'1365969597 INFO ObjectValue : SwitchingObjectValue: Compare value_m='1' to value='1'1365969597 INFO Condition : ObjectCondition (id='source 2') evaluated as '1'1365969597 INFO Rule : Rule test evaluated as 1, prev value was 01365969597 INFO Action : Execute SetValueAction: set target with value on
1365969597 INFO KnxConnection : write(gad=1/0/3, buf, len=2)1365969597 INFO Object : New value on for object target (type: 1.001)1365969597 INFO KnxConnection : Out of KnxConnection loop.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Self-reply:
It seems to be related to initialization of group address statuses. Once both "source" lights have been switched on or off, things work as expected.
I added init="request" to the object definitions (although that's the default value for the init attribute), but that did NOT help.
Any ideas, anyone?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all,
As a "proof of concept" for my project, I tried to create a simple rule based on an OR-condition: if one of two different lights is switched ON, a third light should switch ON as well.
(Below you find my full config file.)
When trying this, I start with all lights switched OFF and then run linknx.
Next, I switch one of the "source" lights ON. Linknx sees this change, but nothing else happens.
When I exit linknx (ctrl-C), suddenly the condition is evaluated and the "target" light switches ON.
You find a full transcript of console below -- blank lines and lines with ### were added manually.
Any ideas on what could be wrong??
thanks a lot!
geronimo
/var/lib/linknx/test.xml content
console output
Self-reply:
It seems to be related to initialization of group address statuses. Once both "source" lights have been switched on or off, things work as expected.
I added init="request" to the object definitions (although that's the default value for the init attribute), but that did NOT help.
Any ideas, anyone?
Another self-reply: downloading the latest sources from CVS (0.0.1.31) helped.