-
Hardware: A very old Mac Mini
-
OS: Debian GNU/Linux 10
-
Java Runtime Environment: Zulu11
-
openHAB version: 3.3.0
-
Issue of the topic:
I have a cron rule that disconnects my house’s solar backup system from utility power 5 minutes before an expected power outage occurs. That rule is working.
When disconnecting the solar system, I want to check if it is evening or not. If it is evening, I want to switch on an outdoor light.
My code to disconnect the house is working. In the example below, I get the “Loadshedding Phase 1” notification. However, no matter what the time of the day, I never get the “Buitelig aan” notification.
- Please post configurations (if applicable):
when Time cron "0 55 7 30 * ? *"
or Time cron "0 55 15 31 * ? *"
then
if (loadshedding.state.toString == "1" || loadshedding.state.toString == "2" || loadshedding.state.toString == "3" || load$
{
//This part is working
sendBroadcastNotification("Loadshedding Phase 1")
val mqttActions = getActions("mqtt","mqtt:broker:number")
mqttActions.publishMQTT("W/anothernumber/vebus/261/Mode",'{"value": 2}')
//This part is not working
if(now.getHourOfDay() > 16 || now.getHourOfDay() < 6)
{
sendBroadcastNotification("Buitelig aan")
Buitelig.sendCommand(ON)
}
}
end
“Buitelig” is a Tasmota flashed Sonoff switch. It works perfectly with manual switching.