Posts: 57
Threads: 28
Joined: May 2018
Reputation:
1
Hello,
Is it possible to create/delete a scheduler with defined parameters (name, controlled object, events with their starting times/values...) with a script? if so, how?
Thanks in advance.
Posts: 57
Threads: 28
Joined: May 2018
Reputation:
1
Thanks for Your answer. Yes, I'm already aware of the possibility of modifiying schedulers with DB queries. In future would be very nice to see ability to create/delete schedulers from a script.
Posts: 1764
Threads: 6
Joined: Jul 2015
Reputation:
117
Hi,
FW 2.4.0 is just released and should be already or comming soon on our website.
in this version we added enabling schedulers by object.
BR,
Erwin
Posts: 411
Threads: 103
Joined: Oct 2016
Reputation:
9
Hi
I do the same thing. I've primary and backup LM.
My code for enabling/disabling schedulers is here:
Code:
function _clearschedulers()
local files = io.ls('/tmp')
for _, file in ipairs(files) do
if file:find('lm-scheduler-', 1, true) then
os.remove('/tmp/' .. file)
end
end
end
function ecl_enable_all_schedulers(ai)
-- ai must be 0 - inactivate 1 - activate
db:update('schedulers', {
active = ai
})
_clearschedulers()
end
LM5Lp, firmware: 2018.08.22 and 2021.12.15, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151 and 4.4.259
Posts: 32
Threads: 10
Joined: Jan 2016
Reputation:
0
02.08.2019, 14:52
(This post was last modified: 02.08.2019, 14:53 by equalizer.)
In the Schedule Events db entry what is the function of "offset_hour" "offset_min", do these advance and delay the timer? If so does it handle day rollover (if say off time is advanced beyond midnight)?
Posts: 7758
Threads: 42
Joined: Jun 2015
Reputation:
447
This only affects sunrise and sunset modes. Rollover cases are handled.