Your rule will be running for a very long time (30mins) and mostly sleeping. OpenHAB cannot run many rules in parallel, and you will run quickly out of rules threads. More details here:
EDIT: While the general advice in this article still applies (i.e. it’s always worth while to make short running rules), the problem described in this article only applies to OH 1.x and Rules DSL in OH 2.x. In OH 3 and beyond, this is no longer a problem so if your rules stop running in any version of OH released in the last two years (as of this edit in 1/2023) this is not your problem.
By way of explanation, in OH 3 each rule gets it’s own thread. It is no longer possible for a rule to starve…
I believe you can use timers for this, but I am not capable of giving you the code. This will give you a start though:
Edit: Update for OH 4
Please see Design Pattern: What is a Design Pattern and How Do I Use Them to understand the scope and purpose of this and other Design Patterns.
Problem Statement
Often one may require a loop in a Rule, to wait for some event to occur or some state to change before doing something. For example, if a door is opened for a long time to send an alert every hour until the door is closed.
Concept
[image]
Use a Timer that reschedules itself instead of a while loop or sleeps.
…