Hi!
The state of my switch item SleepingHours did not get updated this morning, which should have happened at 9am. I included the rule below. It is suppoed to enable sleeping hours between 10pm and 8am at working days and 10pm and 9am at weekends. I use it e.g. to control roller shutters which do not go up automatically during sleeping hours.
Here is the last log entry concerning SleepingHours:
2018-03-24 22:00:00.047 [vent.ItemStateChangedEvent] - SleepingHours changed from OFF to ON
There is no newer entry, which would indicate that the rule didn’t trigger (as it is designed to post an update in any case).
For context: The state of the switch item WorkingDay (which is involved in the rule) changed to OFF at the start of the weekend as it should be. Last log entry:
2018-03-24 00:00:00.054 [vent.ItemStateChangedEvent] - WorkingDay changed from ON to OFF
Since summer time started today, I am a bit suspicious that this could be related. Has anyone experienced similar problems? I think there is nothing wrong with the rule, because it has been working as expected for quite a while.
I am running openHAB 2.2.0~20171125131803-1 (Build #1098) on a Raspberry Pi 3.
rule "Sleeping Hours"
when
System started or
Time cron "0 0 8,9,22 * * ? *" or
Item WorkingDay changed
then
// This is safe, because Yoda time always returns copies
val startOfDay = now.withTimeAtStartOfDay
SleepingHours.postUpdate([|
if (WorkingDay.state == ON &&
(now.isAfter(startOfDay.plusHours(22)) ||
now.isBefore(startOfDay.plusHours(8)))) {
return ON
}
if (WorkingDay.state == OFF &&
(now.isAfter(startOfDay.plusHours(22)) ||
now.isBefore(startOfDay.plusHours(9)))) {
return ON
}
return OFF
].apply())
end
Thanks a lot in advance.
Jens