I’ve migrated most of my existing OH1 rules and scripts across to OH2 and it all seems to be running quite happily. I have 1 scenario that I can’t get to work. In OH1 I had a rule to control starting a dehumidifier (called Artoo). There is also a matching off rule that follows the same format. This is actually the first thing I ever did in OH way back, so it has been working for a long time in OH1.
//Start Artoo
rule "Start Artoo"
when
Time cron "0 30 6 * * ? *" or //06:30 everyday
Time cron "0 30 18 * * ? *" //18:30 everyday
then
//turn Artoo on
sendCommand(Switch_FF_Guest_Artoo,ON)
Item_Notify_Message.postUpdate("Artoo On")
end
I moved this rule across to OH2, but no matter what, I cannot get the second instance time to fire. Artoo goes on quite happily at 06:30 and stops at 09:30 (as per second rule). Nothing happens at 18:30 (or 20:30) - Artoo doesn’t start and I get no indication in the logs that the rule has even been attempted at these times.
I’ve tried re-formatting the when statement:
Time cron "0 30 6 * * ? *" or Time cron "0 30 18 * * ? *" //06:30 and 18:30 everyday
I’ve tried different cases:
Time cron "0 30 6 * * ? *" OR Time cron "0 30 18 * * ? *" //06:30 and 18:30 everyday
Tried logical symbols in both layouts:
Time cron "0 30 6 * * ? *" || Time cron "0 30 18 * * ? *" //06:30 and 18:30 everyday
Removed the comments:
Time cron "0 30 6 * * ? *" or
Time cron "0 30 18 * * ? *"
Nothing fires the second instance. I pretty sure it’s not the cron as they both follow the same format.
What am I missing?