[SOLVED] Homematic Button Channels in rules not working anymore

Since a month I have a problem with two of my rules,
they don’t get triggered.

The involved items are working and controllable per sitemap.
The Homematic thing HM-RC-2-PBU-FM is listed and online in the PaperUI

The Log when i save the rule:

2019-03-23 22:28:27.464 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model 'Treppenbeleuchtung.rules', using it anyway:
The method getCalendar() from the type DateTimeType is deprecated
The method getCalendar() from the type DateTimeType is deprecated
The method getCalendar() from the type DateTimeType is deprecated
The method getCalendar() from the type DateTimeType is deprecated
2019-03-23 22:28:27.630 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'Treppenbeleuchtung.rules'

Changes with no success.

  1. Use “…” instead of ‘…’
  2. “…#BUTTON” triggered SHORT_PRESS instead of “…#PRESS” triggered SHORT
  3. any combination of the two above

The “Treppenbeleuchtung” rule is working.
The logDebug is not executed.

The rule file “Treppenbeleuchtung.rules”

import java.util.Calendar

var counterSeitenlicht = 0
var counterOberlicht = 0

rule "Treppenbeleuchtung Init"
when
    System started
then
    if(Nachtlicht_Treppe_AusZeitStunde.state == NULL){
        Nachtlicht_Treppe_AusZeitStunde.postUpdate(7);
    }
    if(Nachtlicht_Treppe_AusZeitMinute.state == NULL){
        Nachtlicht_Treppe_AusZeitMinute.postUpdate(0);
    }
    if(Nachtlicht_Treppe_AnZeitStunde.state == NULL){
        Nachtlicht_Treppe_AnZeitStunde.postUpdate(21);
    }
    if(Nachtlicht_Treppe_AnZeitMinute.state == NULL){
        Nachtlicht_Treppe_AnZeitMinute.postUpdate(0);
    }
    if(Nachtlicht_Treppe_Modus.state == NULL){
        Nachtlicht_Treppe_Modus.postUpdate("ASTRO");
    }
end

rule "Treppenbeleuchtung"
when
    Time cron "0 0/5 * * * ?" or
    Item Nachtlicht_Treppe_AusZeitStunde changed or
    Item Nachtlicht_Treppe_AusZeitMinute changed or
    Item Nachtlicht_Treppe_AnZeitStunde changed or
    Item Nachtlicht_Treppe_AnZeitMinute changed or
    Item Nachtlicht_Treppe_Modus changed or
    Item SunriseTime changed or
    Item SunsetTime changed
then
    var int OffTime
    var int OnTime
    var int CurrentTime

    if(Nachtlicht_Treppe_Modus.state.toString == "ASTRO"){
        OffTime = (SunriseTime.state as DateTimeType).getCalendar.get(Calendar.HOUR_OF_DAY).intValue * 60 + (SunriseTime.state as DateTimeType).getCalendar.get(Calendar.MINUTE).intValue
        OnTime = (SunsetTime.state as DateTimeType).getCalendar.get(Calendar.HOUR_OF_DAY).intValue * 60 + (SunsetTime.state as DateTimeType).getCalendar.get(Calendar.MINUTE).intValue
    } else if(Nachtlicht_Treppe_Modus.state.toString == "TIME"){
        OffTime = (Nachtlicht_Treppe_AusZeitStunde.state as Number).intValue * 60 + (Nachtlicht_Treppe_AusZeitMinute.state as Number).intValue
        OnTime = (Nachtlicht_Treppe_AnZeitStunde.state as Number).intValue * 60 + (Nachtlicht_Treppe_AnZeitMinute.state as Number).intValue
    }
    
    CurrentTime = now.getHourOfDay * 60 + now.getMinuteOfHour

    if(OnTime < OffTime){
        if(CurrentTime <= OffTime && CurrentTime >= OnTime){
            Nachtlicht_Treppe.sendCommand(ON)
        } else {
            Nachtlicht_Treppe.sendCommand(OFF)
        }
    } else {
        if(CurrentTime <= OffTime || CurrentTime >= OnTime){
            Nachtlicht_Treppe.sendCommand(ON)
        } else {
            Nachtlicht_Treppe.sendCommand(OFF)
        }    
    }
end

rule "Seitenlicht"
when
    Channel "homematic:HM-RC-2-PBU-FM:NEQ1573894:OEQ1215879:1#PRESS" triggered SHORT or
    Channel "homematic:HM-RC-2-PBU-FM:NEQ1573894:NEQ1318291:1#PRESS" triggered SHORT
then
    logDebug("Treppenhausbeleuchtung.rules", "Seitenlicht Start")

    if(counterSeitenlicht < 3){
        counterSeitenlicht = counterSeitenlicht + 1
        if(counterSeitenlicht == 1){
            Seitenlicht_Treppe_links.sendCommand(ON)
            Seitenlicht_Treppe_rechts.sendCommand(OFF)
        } else if(counterSeitenlicht == 2){
            Seitenlicht_Treppe_links.sendCommand(ON)
            Seitenlicht_Treppe_rechts.sendCommand(ON)
        } else {
            Seitenlicht_Treppe_links.sendCommand(OFF)
            Seitenlicht_Treppe_rechts.sendCommand(ON)
        }
    } else {
        counterSeitenlicht = 0
        Seitenlicht_Treppe_links.sendCommand(OFF)
        Seitenlicht_Treppe_rechts.sendCommand(OFF)
    }
end

rule "Oberlicht"
when
    Channel "homematic:HM-RC-2-PBU-FM:NEQ1573894:OEQ1215879:2#PRESS" triggered SHORT or
    Channel "homematic:HM-RC-2-PBU-FM:NEQ1573894:NEQ1318291:2#PRESS" triggered SHORT
then
    logDebug("Treppenhausbeleuchtung.rules", "Oberlicht Start")

    if(counterOberlicht == 0){
        counterOberlicht = counterOberlicht + 1
        Oberlicht_Treppe.sendCommand(ON)
    } else {
        counterOberlicht = 0;
        Oberlicht_Treppe.sendCommand(OFF)
    }
end

System:
Hardware: AMD A4-5300/8GB/5x2TB (Raid5)
OS: Ubuntu 18.10 (4.18.0-16-generic)
Java Runtime Environment: Java™ SE Runtime Environment (build 1.8.0_201-b09)
openHAB version: 2.4.0 (Build)

Do you see any events regarding the buttons in the event.log?

You can also enable the trace or debug mode for the Homematic binding. Then you can see in the openhab.log what happens and whether pressing a button is recognized by the binding.

BTW: which Homematic version are you using?

@MHerbst
My CCU is running 2.41.5 but i will update it today.

Thanks, for the event.log advice.
The triggered event name changed a lot in the past months.

From
#PRESS triggered SHORT
to
#BUTTON triggered SHORT_PRESSED

And the documentation says
#BUTTON triggered SHORT_PRESS

The documentation was probably not kept up to date.