After Migration to OH4 and Java 17 some of my Rules won´t work with error "null"

After updating openHAB to 4.0 (running on Debian 12 with zulu17) some of my rules just won´t get executed by themself (by the triggers in the rule), but work if i run them manually in the Webinterface.
The errors are the following:

│2023-07-25 21:14:00.004 [ERROR] [e.automation.internal.RuleEngineImpl] - Failed to execute rule 'rollladen-12': null                                              │
│2023-07-25 21:14:00.004 [ERROR] [e.automation.internal.RuleEngineImpl] - Failed to execute rule 'rollladen-15': null                                              │
│2023-07-25 21:14:00.004 [ERROR] [e.automation.internal.RuleEngineImpl] - Failed to execute rule 'rollladen-2': null                                               │
│2023-07-25 21:14:00.004 [ERROR] [e.automation.internal.RuleEngineImpl] - Failed to execute rule 'rollladen-18': null

I don´t know why there is no description why the rules fail to execute. Can someone help me?

One example rule with this error is this:

rule "Luftreiniger Küche Filter unter 10 Prozent Benachrichtigung"
    Time cron "0 0 18 1/1 * ? *"
    if (EG_Luftreiniger_Kueche_filterlife.state < 1) {
        executeCommandLine("/home/openhab/", "Verbleibende Filterlaufzeit in Luftreiniger Küche beträgt unter 1%", "+49123456789")


Isn’t the unit ( % ) missing in your comparison ? What type is being used for G_Luftreiniger_Kueche_filterlife ?

The Unit should not be neccesary as its not defined in the item itself:

Number EG_Luftreiniger_Kueche_filterlife			"Filter [%s %%]"								<cistern>														{channel="miio:basic:123:filterlife"}

Can somebody help me here please? I cannot find any problem.
It also seems to not happen after every restart of openhab, but if it happens, it continues for many rules.

Can i enable some sort of debug message to find the root of the problem?

Log Info state and check if this really a number only. Does your script works via CLI?
Openhab has rights to execute the script?

The script works if i run it manually via WebUI and its not the only rule.
This simple rule also throws this error:

rule "Timer JIB Trockner Keller zurücksetzten"
	Item KG_Trockner_JIB_status changed from ON to OFF

When running the same rule again, all works fine, but after every restart, this error happens when the trigger fires.

Only the first time or also next times?

The first run after every restart of openhab. If openhab runs for a week or two, then no more issues until i restart openhab.

Hi, I haven’t read logs at the moment but I have something similar. I’m using Docker and after moving from OH3 to OH4 I have issues with rules that I added years ago.
My rule has this syntax:

rule "Read Daikin State"
	Item DaikinMode changed

I’ve noted that it is triggered only by a command and not by an update.
In my case, if I’m changing the clima mode from OH it works, if I change the clima mode from Alexa (using official Daikin Skill) it does not trigger because OH only receives an update and not a command

I created an issue on github for my error:

1 Like