Page 1 of 1

Timer issues

Posted: Friday 07 February 2020 19:23
by arjan93
Hello all,

I am new with programming through dzvents and run into some problems with the timers.
I try to understand how it works and have made a script that is as simple as possible, but even that doesn't work yet. Can someone tell me what I am doing wrong?

This is the script i made:

return {
on = {
timer = {'every minute'},
},

execute = function(domoticz, timer)
if dz.time.matchesRule('at 19:13') then
domoticz.devices('Dummy lamp 1').switchOn()
end
end
}

Re: Timer issues

Posted: Friday 07 February 2020 22:58
by waaren

arjan93 wrote:Can someone tell me what I am doing wrong?

dz.time.matchesRule('at 19:13')
}
Here you should use domoticz.time.matchesrule





Re: Timer issues

Posted: Saturday 08 February 2020 11:54
by arjan93
waaren wrote: Friday 07 February 2020 22:58
arjan93 wrote:Can someone tell me what I am doing wrong?

dz.time.matchesRule('at 19:13')
}
Here you should use domoticz.time.matchesrule
Thanks for the answer but unfortunately it still doesn't work. I don't know what I'm doing wrong.
The dummy lamp 1 switch does not switch on.

Re: Timer issues

Posted: Saturday 08 February 2020 12:18
by boum
You're also not very helpful ;)
You should post some logs of what happens.
Have you read https://www.domoticz.com/wiki/DzVents:_ ... h_Domoticz ? It's a good start. You should also add domoticz.log calls in your script to help debugging.