I was wondering whether
Code: Select all
on = {
timer = {'every minute, every 2 minutes'},
},Thank you
Moderator: leecollings
Code: Select all
on = {
timer = {'every minute, every 2 minutes'},
},The on = timer section is evaluated once a minute by dzVents and if any of the rules evaluates to true, the script is triggered.Number8 wrote: Friday 08 May 2020 10:11 My understanding is that 'every 2 minutes' is concurrent to 'every minute' and cannot be served.
Code: Select all
return
{
on =
{
timer =
{
'every 2 minutes',
'every 3 minutes',
'every 1 minutes',
'every 4 minutes',
},
},
logging =
{
level = domoticz.LOG_DEBUG,
},
execute = function(dz, item)
dz.log('this script was triggered by timer rule: ' .. item.trigger,dz.LOG_DEBUG )
if dz.time.matchesRule('every 2 minutes') then
dz.log('Doing all the every 2 minute actions here... ',dz.LOG_DEBUG )
-- 2 minutes actions start
-- 2 minutes actions end
end
dz.log('Doing all the every minute work here... ',dz.LOG_DEBUG )
end
}
[code]Code: Select all
timer =
{
'every 4 minutes',
'every 3 minutes',
'every 2 minutes',
'every 1 minute',
},
},The timer section here was just an example. The only rule you need there for you requirement is ' every 1 minute' (or 'every minute' what does the same).Number8 wrote: Friday 08 May 2020 16:19 Oh I see. But if I take the example to the letter, the 4 minutes trigger will never be seen. Should we code ?
Users browsing this forum: No registered users and 1 guest