Page 1 of 1
HOW TO send an email after, for example, 3min.
Posted: Wednesday 04 April 2018 10:26
by hve22
IS there a way to send a email after, for example, 3 minutes when a switch is triggerd.
Re: HOW TO send an email after, for example, 3min.
Posted: Wednesday 04 April 2018 11:46
by waaren
There are probably more ways to accomplish this. My solution that works with dzVents >= 2.4.0 :
Code: Select all
--[[
Delayed Email test ( dzVents >= 2.4.0 )
]]--
return {
on = {
devices = { 'emailTestSwitch'} ,
variables = { 'emailTrigger'}
},
execute = function(domoticz, trigger)
if trigger.isVariable then
domoticz.email('Hey', 'The Switch state was updated', 'your Email adress')
domoticz.variables('emailTrigger').set(0).silent()
else
domoticz.variables('emailTrigger').set(1).afterSec(5)
end
end
}
Re: HOW TO send an email after, for example, 3min.
Posted: Wednesday 04 April 2018 21:13
by Derik
mmm is there a option to use this script for sending 1 mail instead of multiple.
I mean now i set my X sensor to send a mail when setpoint y is reached...
Only Domoticz kept sending mails.
I like to use a option to send a mail when setpoint x is reached.
And then perhaps after 10 minutes again when the setpoint is still reached.
Or net when the setpoint is lower then i want..
Hope
Thanks !!
Re: HOW TO send an email after, for example, 3min.
Posted: Wednesday 04 April 2018 23:13
by waaren
I am not quite sure that I understand what you want but from the sound of it, I guess it should be doable.
If settings -> notifications -> notification intervals does not serve your needs then please elaborate a bit more what you try to achieve