I run into a very strange problem, can anyone verify this please.
If two or more timers will end on the same time, not all of them are executed:
This works:
var Timer tRandomTimers01 = null
var Timer tRandomTimers02 = null
var Timer tRandomTimers03 = null
var Timer tRandomTimers04 = null
tRandomTimers01 = createTimer(now.plusSeconds(2),
[|
logInfo("TIMERCHECK", "RandomTimer for Item " + swRandomTimer01.label + " reached end. Action OFF executed.")
swRandomTimer01.sendCommand(OFF)
])
tRandomTimers02 = createTimer(now.plusSeconds(4),
[|
logInfo("TIMERCHECK", "RandomTimer for Item " + swRandomTimer02.label + " reached end. Action OFF executed.")
swRandomTimer02.sendCommand(OFF)
])
tRandomTimers03 = createTimer(now.plusSeconds(6),
[|
logInfo("TIMERCHECK", "RandomTimer for Item " + swRandomTimer03.label + " reached end. Action OFF executed.")
swRandomTimer03.sendCommand(OFF)
])
tRandomTimers04 = createTimer(now.plusSeconds(8),
[|
logInfo("TIMERCHECK", "RandomTimer for Item " + swRandomTimer04.label + " reached end. Action OFF executed.")
swRandomTimer04.sendCommand(OFF)
])
Log:
2018-02-24 13:24:49.118 [INFO ] [se.smarthome.model.script.TIMERCHECK] - RandomTimer for Item RandomTimer01 reached end. Action OFF executed.
2018-02-24 13:24:51.118 [INFO ] [se.smarthome.model.script.TIMERCHECK] - RandomTimer for Item RandomTimer02 reached end. Action OFF executed.
2018-02-24 13:24:53.118 [INFO ] [se.smarthome.model.script.TIMERCHECK] - RandomTimer for Item RandomTimer03 reached end. Action OFF executed.
2018-02-24 13:24:55.117 [INFO ] [se.smarthome.model.script.TIMERCHECK] - RandomTimer for Item RandomTimer04 reached end. Action OFF executed.
But this not, only difference is timer will end on the same time:
tRandomTimers01 = createTimer(now.plusSeconds(2),
[|
logInfo("TIMERCHECK", "RandomTimer for Item " + swRandomTimer01.label + " reached end. Action OFF executed.")
swRandomTimer01.sendCommand(OFF)
])
tRandomTimers02 = createTimer(now.plusSeconds(2),
[|
logInfo("TIMERCHECK", "RandomTimer for Item " + swRandomTimer02.label + " reached end. Action OFF executed.")
swRandomTimer02.sendCommand(OFF)
])
tRandomTimers03 = createTimer(now.plusSeconds(2),
[|
logInfo("TIMERCHECK", "RandomTimer for Item " + swRandomTimer03.label + " reached end. Action OFF executed.")
swRandomTimer03.sendCommand(OFF)
])
tRandomTimers04 = createTimer(now.plusSeconds(2),
[|
logInfo("TIMERCHECK", "RandomTimer for Item " + swRandomTimer04.label + " reached end. Action OFF executed.")
swRandomTimer04.sendCommand(OFF)
])
Log:
2018-02-24 13:31:09.089 [INFO ] [se.smarthome.model.script.TIMERCHECK] - RandomTimer for Item RandomTimer01 reached end. Action OFF executed.
2018-02-24 13:31:09.104 [INFO ] [se.smarthome.model.script.TIMERCHECK] - RandomTimer for Item RandomTimer04 reached end. Action OFF executed.