Thanks for the detailed explanation! I narrowed it down to the following error message in the events.log:
a1e15e08-5d3a-4212-abf1-bccde107cfba updated: UNINITIALIZED (HANDLER_INITIALIZING_ERROR): Getting handler ‘ephemeris.WeekdayCondition’ for module ‘3’ failed: Config parameter ‘offset’ is missing in the configuration of module ‘3’.
Actually I haven’t set an offset value (thinking it will default to zero), but even after explicitly setting the offset value to 0 (or 1) doesn’t help. Here’s the rule config:
{
"status":{
"status":"UNINITIALIZED",
"statusDetail":"HANDLER_INITIALIZING_ERROR",
"description":"Getting handler \u0027ephemeris.WeekdayCondition\u0027 for module \u00273\u0027 failed: Config parameter \u0027offset\u0027 is missing in the configuration of module \u00273\u0027.\n"
},
"triggers":[
{
"id":"1",
"label":"Morgens 6 Uhr",
"description":"Triggers at a specified time",
"configuration":{
"time":"06:00"
},
"type":"timer.TimeOfDayTrigger"
},
{
"id":"2",
"label":"Abends 18 Uhr",
"description":"Triggers at a specified time",
"configuration":{
"time":"18:00"
},
"type":"timer.TimeOfDayTrigger"
}
],
"conditions":[
{
"inputs":{
},
"id":"3",
"label":"It is a weekday",
"description":"Checks if the current day is not on the weekend.",
"configuration":{
"offset":0
},
"type":"ephemeris.WeekdayCondition"
},
{
"inputs":{
},
"id":"4",
"label":"Abwesenheit AUS",
"description":"Compares the item state with the given value",
"configuration":{
"itemName":"holiday_mode",
"state":"OFF",
"operator":"\u003d"
},
"type":"core.ItemStateCondition"
}
],
"actions":[
{
"inputs":{
},
"id":"5",
"label":"Pumpe AN",
"description":"Sends a command to a specified item.",
"configuration":{
"itemName":"pump",
"command":"ON"
},
"type":"core.ItemCommandAction"
}
],
"configuration":{
},
"configDescriptions":[
],
"uid":"a1e15e08-5d3a-4212-abf1-bccde107cfba",
"name":"Pumpe Wochentags AN",
"tags":[
],
"visibility":"VISIBLE"
}
For the time being I’ve created the following rules on a file basis:
rule "Circulation Pump ON (Weekends/Holidays)"
when
Time cron "0 30 7 1/1 * ? *" or // 7:30
Time cron "0 0 12 1/1 * ? *" or // 12:00
Time cron "0 30 18 1/1 * ? *" // 18:30
then
if((Ephemeris.isWeekend || Ephemeris.isBankHoliday) && holiday_mode.state == "OFF") {
pump.sendCommand(ON)
createTimer(now.plusHours(2), [ |
pump.sendCommand(OFF)
logInfo("notifications", "Circulation Pump (Weekend/Holiday) OFF.")
])
logInfo("notifications", "Circulation Pump (Weekend/Holiday) ON.")
}
end
rule "Circulation Pump ON (Weekdays)"
when
Time cron "0 0 6 1/1 * ? *" or // 6:00
Time cron "0 0 18 1/1 * ? *" // 18:00
then
if((!Ephemeris.isWeekend && !Ephemeris.isBankHoliday) && holiday_mode.state == "OFF") {
pump.sendCommand(ON)
createTimer(now.plusHours(2), [ |
pump.sendCommand(OFF)
logInfo("notifications", "Circulation Pump (Weekday) OFF.")
])
logInfo("notifications", "Circulation Pump (Weekday) ON.")
}
end
This however is untested for now and might be wrong though…