→ if I run it manually, the Powerplug switches off, but it never triggers automatically. Timezone is configured, correctly.
2nd I tried it with a DSL rule. I already have some much more complex ones. But this one, also doesn’t trigger:
rule “At 19:00 swtich PowerPlug OFF”
when
Time cron “0 0 19 ? * * *”
then
mqttActions.publishMQTT(“zigbee2mqtt/Outdoor Steckdose 01/set”,“OFF”, true)
logInfo(“Main.rules”, “Aussensteckdose wird zur definierten Uhrzeit ausgeschaltet”)
end
I did quite some fancy stuff with DSL rules, but I can’t get such a basic thing to work
Which timezone? Scheduler works off Java timezone, not openHABs. So does the logger, so its easy to check your openhab.log or events.log to see if timestamps are sensible,
You are right, I found that the log entries appear one hour later as what they are saying. Do you know how I can set the Java timezone? Even my Astro Binding Events (in other rules) are delayed for one hour.
Sorry to hijack this topic, but I have a similar problem.
I have a time based rule which simply doesn’t trigger:
rule "Set Muell Countdown"
when
Time cron "0 0 12 ? * * *"
then
logInfo("TEST","Müllkalender Testmeldung")
if ((muellCal_next_Date.state as DateTimeType).zonedDateTime.minusHours(muellCal_hours) < ZonedDateTime.now()) {
muell_Text = muellCal_next.state.toString
if ((muellCal_next_Date2.state as DateTimeType).zonedDateTime.minusHours(muellCal_hours) < ZonedDateTime.now()) {
muell_Text = muell_Text + " & " + muellCal_next2.state.toString
}
muellCal.postUpdate( muell_Text)
} else {
muellCal.postUpdate( "")
}
end
Another rule though does get triggered every night:
rule "Elternbad Nachtschaltung - Aktivierung"
when
Time cron "0 0 1 * * ?"
then
// var Timer NightLightTimer
Licht_Elternbad_Night.sendCommand( ON)
createTimer(ZonedDateTime.now.plusHours(5)) [|
Licht_Elternbad_Night.sendCommand( OFF)
]
if (Licht_Elternbad_Spiegel.state === ON) Licht_Elternbad_Spiegel.sendCommand( OFF)
end
rule "Elternbad Nachtschaltung - Beeinflussung"
when
Item Licht_Elternbad_dim changed from 0
then
if (Licht_Elternbad_Night.state === ON) {
Licht_Elternbad_dim.sendCommand( 30)
}
end
Also the timestamps in openhab.log and events.log are correct.
I had the “other” format before: “0 0 12 * * ?”
But this didn’t trigger either. That’s why I started to dig in, found the hint for FreeFormatter.com and thought that solved it. But it didn’t.
Your second question made me thinking whether I played around with that rule in PaperUI as well.
Well, seems I did. The rule was disabled there - for whatever reason.