[SOLVED] A simple rule for turning off power (=heating)


I am running Openhabian on a RPi 3 B+.

The following is my first rules attempt to turn off the power on my home office at 10 PM. The variable GF_Office_Power variable is an ON/OFF switch defined in items as well as sitemap

 import java.util.Random
/* This is a test rule which will turn off office power if time > 22:00 
rule "Office Off"
    Time cron "45 22 * * * ?"

My question is what in this short test rule that is incorrect. Thank you!

Please use the code fences when publishing code:

What is your question?

You cron statement is incorrect.
openHAB uses a cron format that includes seconds
so everyday at 22:45 would be: "0 45 22 ? * * *"

Please see:


@vzorglub: Thank you!! It worked at 22:55 with your help!

1 Like

@yves I tried to make it clearer in the update