Hi all,
I seem to be facing a weird issue with OH 4.1.0. I’m pretty sure that the issue wasn’t present with 4.0.4, but I only had that running for a day or so before upgrading to 4.1.0.
I have a pretty extensive KNX installation and one function that I am using OH rules for is to aggregate some contacts into a summary state.
Let me give you an example: Here are some window and door contacts for my garage, and I am pushing a summary state for “is there any door left unlocked in the garage” back to the KNX bus using this rule:
rule Garage_Contacts
when
Item TuerNord changed or
Item TuerSued changed or
Item Fenster_EG2_Kipp changed or
Time cron "0 0/10 * ? * * *"
then
if ((TuerNord.state == OPEN) || (TuerSued.state == OPEN) || (Fenster_EG2_Kipp.state == OPEN)) {
logInfo("RULE Garage_Contacts open:","Nord: " + TuerNord.state.toString +", Sued: " + TuerSued.state.toString +", EG2: "+Fenster_EG2_Kipp.state.toString )
Garage_Tuerkontakt.sendCommand(OPEN)
} else {
logInfo("RULE Garagecontacts closed:","Nord: " + TuerNord.state.toString +", Sued: " + TuerSued.state.toString +", EG2: "+Fenster_EG2_Kipp.state.toString )
Garage_Tuerkontakt.sendCommand(CLOSED)
}
end
All items here are type “contact” items and they all link to KNX channels.
Example:
Contact Garage_Tuerkontakt "Garage Tuerkontakt" {channel="knx:device:bridge:OH2-contacts:Garage_Tuerkontakt"}
Here’s the things definition:
Type “contact” for the channels that get fed from the actual KNX binary input sensors:
Type contact : gGarage_TuerNord "Garage Tuer Nord unverriegelt" [ ga="5/5/12"]
Type contact : gGarage_TuerSued "Garage Tuer Sued unverriegelt" [ ga="5/5/13"]
Type contact : Fenster_EG2_Kipp "Fenster Garage gekippt" [ ga="5/5/101"]
Type “contact-control” for the item that I am using OH to generate
Type contact-control : Garage_Tuerkontakt "Ein Fenster oder Tuer in Garage offen" [ ga="5/5/100"]
The rule runs whenever the state of one of the items changes, or every 10 minutes. I have an LED display that visually tells me if everything is closed (green) or if there is a door open (red). It also monitors the knx address and if there isn’t any update within 30 minutes, it assumes communication is lost and it begins to flash red. This is exactly what is happening.
In my log, I can see the rule firing:
2023-12-25 09:40:00.939 [INFO ] [l.script.RULE Garagecontacts closed:] - Nord: CLOSED, Sued: CLOSED, EG2: CLOSED
Since I have two different log messages programmed in the rule, I can tell that it evaluated the contacts correctly and everything is closed, so I would expect it to send an update to the “Garage_Tuerkontakt” items with state “closed”.
I switched on event log debugging and can see that this actually happened as well:
2023-12-25 09:40:00.941 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Garage_Tuerkontakt' received command CLOSED
>2023-12-25 09:40:00.942 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Garage_Tuerkontakt' predicted to become CLOSED
>2023-12-25 09:40:00.942 [INFO ] [openhab.event.ItemStateEvent ] - Item 'Garage_Tuerkontakt' shall update to CLOSED
Yet, I can see no update actually being sent to the KNX bus and also KNX binding debug logging doesn’t show an update being triggered.
Any idea what might be going on? I have a ton of these rules basically collecting contact status of all the windows and doors and putting out group items for every room and so on. None of these seem to work right now. All are set up with a similar logic (update the status if an individual contact status changes or refresh every 10 minutes). A rule where I count the number of open windows and put out a number item to a knx channel works without a problem, so this seems to be isolated to contact type channels.
Cheers,
Tom