Timer issues

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
arjan93
Posts: 25
Joined: Friday 16 November 2018 11:58
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Timer issues

Post 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
}
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Timer issues

Post 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




Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
arjan93
Posts: 25
Joined: Friday 16 November 2018 11:58
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Timer issues

Post 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.
User avatar
boum
Posts: 135
Joined: Friday 18 January 2019 11:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Location: France
Contact:

Re: Timer issues

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest