Rule only acting between two hours


Migrating from my old “Pi1 with EIBD/Linknx” to a new Pi3 with Openhab2, I am looking for helpwith some time based rules.

I want to have a rule that turn off a light on the following trigger, but only if time is between 9am and 6pm

  • Ligth is on at 9am or come on between time interval
  • rollershutter is open (not 100%) at 9am or is open during time interval

I found that using cron, i can check the condition @ 9am, but how to explain in the rule that I take action if light goes on or rollershutter go up during the timelaps 9am to 6pm ???

Thanks for your help,


  • Platform information:
    • Hardware: Raspberry Pi3
    • OS: Openhabian
    • Java Runtime Environment: which java platform is used and what version
    • openHAB version: 2.3

Tackling this kind of problem in OpenHAB is usually a case of restating the task.
Trigger your rule(s) from light/shutter actions, and check within the rule what the current time is.

When you have a few time of day situations to deal with, it can be useful to use this method