This item is “read only” for openhab.It should only listen for events.
Rule
Based on this item I have a simple rule which should trigger when the item value is switched to ON (by the KNX Bus)
So very simple:
rule 'lueftung'
when
Item Sammelklingel_Mobotix changed from OFF to ON
then
logInfo('klingel', 'Es hat geklingelt.')
Problem
The rule does NOT trigger. Very rarely it works(can’t tell exactly when). But in any case after a OH restart it stops working, which sucks.
Analysis
What I’ve checked so far is that the item actually GETS changed in openhab. I’ve used the openhab console to verify that like this:
openhab> smarthome:status Sammelklingel_Mobotix
OFF
When the item gets switched by KNX I can see an ‘ON’ value here for 2 seconds. So openHab sees this change which is good but I don’t understand why my rule is not reliable triggering.
KNX bind config
My binding config is as simple as this:
I guess the item is a door bell? Then I would assume the behaviour going into state ON for 2 sec and then falling back to OFF as logical. Could that behaviour be ok? Did you monitor the KNX bus with ETS or a similar tool?
I did often struggle with the file coding. I work from Windows and often the file coding UTF-8 is not recognized and the file gets saved in ANSI coding. Then the rule is parsed without error but it is somehow not recognized.
I´m now using notepad++ as an editor and turned on UTF-8 w/o BOM as default.
Maybe you have a similar problem? Pls check the file coding.
I’ve not check then OH log yet. I will do that.
I thought it would be enough verification to see the value change in the OH console.
I will take a look in the logs asap.
Here is the corresponding openhab log with KNX DEBUG enabled:
2017-04-22 12:47:25.715 [DEBUG] [tuwien.auto.calimero ] - calimero.link.224.0.23.12:3671: indication from 1.0.52
2017-04-22 12:47:26.991 [DEBUG] [tuwien.auto.calimero ] - calimero.link.224.0.23.12:3671: indication from 1.0.63
2017-04-22 12:47:26.997 [INFO ] [tuwien.auto.calimero ] - calimero.link.224.0.23.12:3671: send message to 0/4/3, wait for confirmation
2017-04-22 12:47:26.998 [DEBUG] [tuwien.auto.calimero ] - calimero.link.224.0.23.12:3671: cEMI L-Data.ind from 0.0.1 to 0/4/3, low priority hop count 6 tpdu 00 81
2017-04-22 12:47:26.999 [DEBUG] [tuwien.auto.calimero ] - KNXnet/IP Routing 224.0.23.12:3671: add to multicast loopback frame buffer: L-Data.ind from 0.0.1 to 0/4/3, low priority hop count 6 tpdu 00 81
2017-04-22 12:47:27.002 [DEBUG] [tuwien.auto.calimero ] - KNXnet/IP Routing 224.0.23.12:3671: sending cEMI frame seq 0, non-blocking, attempt 1 (channel 0) 06 10 05 30 00 11 29 00 bc e0 00 01 04 03 01 00 81
2017-04-22 12:47:27.005 [DEBUG] [tuwien.auto.calimero ] - calimero.link.224.0.23.12:3671: send to 0/4/3 succeeded
2017-04-22 12:47:27.005 [DEBUG] [tuwien.auto.calimero ] - process 224.0.23.12:3671: group write to 0/4/3 succeeded
2017-04-22 12:47:27.006 [DEBUG] [tuwien.auto.calimero ] - KNXnet/IP Routing 224.0.23.12:3671: discard multicast loopback cEMI frame: L-Data.ind from 0.0.1 to 0/4/3, low priority hop count 6 tpdu 00 81
2017-04-22 12:47:27.466 [DEBUG] [tuwien.auto.calimero ] - calimero.link.224.0.23.12:3671: indication from 15.15.255
2017-04-22 12:47:27.472 [INFO ] [tuwien.auto.calimero ] - calimero.link.224.0.23.12:3671: send message to 0/4/1, wait for confirmation
2017-04-22 12:47:27.473 [DEBUG] [tuwien.auto.calimero ] - calimero.link.224.0.23.12:3671: cEMI L-Data.ind from 0.0.1 to 0/4/1, low priority hop count 6 tpdu 00 80
2017-04-22 12:47:27.473 [DEBUG] [tuwien.auto.calimero ] - KNXnet/IP Routing 224.0.23.12:3671: add to multicast loopback frame buffer: L-Data.ind from 0.0.1 to 0/4/1, low priority hop count 6 tpdu 00 80
2017-04-22 12:47:27.475 [DEBUG] [tuwien.auto.calimero ] - KNXnet/IP Routing 224.0.23.12:3671: sending cEMI frame seq 0, non-blocking, attempt 1 (channel 0) 06 10 05 30 00 11 29 00 bc e0 00 01 04 01 01 00 80
2017-04-22 12:47:27.475 [DEBUG] [tuwien.auto.calimero ] - calimero.link.224.0.23.12:3671: send to 0/4/1 succeeded
2017-04-22 12:47:27.476 [DEBUG] [tuwien.auto.calimero ] - process 224.0.23.12:3671: group write to 0/4/1 succeeded
2017-04-22 12:47:27.477 [DEBUG] [tuwien.auto.calimero ] - KNXnet/IP Routing 224.0.23.12:3671: discard multicast loopback cEMI frame: L-Data.ind from 0.0.1 to 0/4/1, low priority hop count 6 tpdu 00 80
2017-04-22 12:47:29.387 [DEBUG] [tuwien.auto.calimero ] - calimero.link.224.0.23.12:3671: indication from 1.1.3
2017-04-22 12:47:29.945 [DEBUG] [tuwien.auto.calimero ] - calimero.link.224.0.23.12:3671: indication from 1.0.63
2017-04-22 12:47:29.950 [INFO ] [tuwien.auto.calimero ] - calimero.link.224.0.23.12:3671: send message to 0/4/3, wait for confirmation
2017-04-22 12:47:29.951 [DEBUG] [tuwien.auto.calimero ] - calimero.link.224.0.23.12:3671: cEMI L-Data.ind from 0.0.1 to 0/4/3, low priority hop count 6 tpdu 00 80
2017-04-22 12:47:29.955 [DEBUG] [tuwien.auto.calimero ] - KNXnet/IP Routing 224.0.23.12:3671: add to multicast loopback frame buffer: L-Data.ind from 0.0.1 to 0/4/3, low priority hop count 6 tpdu 00 80
2017-04-22 12:47:29.955 [DEBUG] [tuwien.auto.calimero ] - KNXnet/IP Routing 224.0.23.12:3671: sending cEMI frame seq 0, non-blocking, attempt 1 (channel 0) 06 10 05 30 00 11 29 00 bc e0 00 01 04 03 01 00 80
2017-04-22 12:47:29.956 [DEBUG] [tuwien.auto.calimero ] - calimero.link.224.0.23.12:3671: send to 0/4/3 succeeded
2017-04-22 12:47:29.957 [DEBUG] [tuwien.auto.calimero ] - process 224.0.23.12:3671: group write to 0/4/3 succeeded
2017-04-22 12:47:29.959 [DEBUG] [tuwien.auto.calimero ] - KNXnet/IP Routing 224.0.23.12:3671: discard multicast loopback cEMI frame: L-Data.ind from 0.0.1 to 0/4/3, low priority hop count 6 tpdu 00 80
As you can see at 12:47:28,071 the KNX Group address 0/4/3 received an ‘ON’ from the device 1.0.63(KNX actuator) in the KNX Monitor.
In the OH log I can see an entry ‘indication from 1.0.63’ a bit later.
Anyways - as stated already I can the that OH received this information since I can see the value change in the OH console:
__ _____ ____
____ ____ ___ ____ / / / / | / __ )
/ __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __ |
/ /_/ / /_/ / __/ / / / __ / ___ |/ /_/ /
\____/ .___/\___/_/ /_/_/ /_/_/ |_/_____/
/_/ 2.0.0
Release Build
Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown openHAB.
openhab> smarthome:status Sammelklingel_Mobotix
OFF
openhab> smarthome:status Sammelklingel_Mobotix
ON
openhab> smarthome:status Sammelklingel_Mobotix
ON
openhab> smarthome:status Sammelklingel_Mobotix
ON
openhab> smarthome:status Sammelklingel_Mobotix
OFF
So - I think that is an undisputed fact that OH does receive the event.
Now back to the issue: Why is the rule not triggering ? Is this a bug ?