Page 1 of 1
Re: Send notification after switch been off for 2h!!
Posted: Thursday 17 October 2019 7:13
by Egregius
In pass2php quite simple:
Code: Select all
if ($d['lawnmower']['s']=='Off'&&past('lawnmower')>7200) {
alert('lawnmower', 'Lawnmower busy for more than '.converttohours(past('lawnmower')), 3600)
}
[Moderated] Topic start removed: it was a duplicate post with hidden phishing content
Re: Send notification after switch been off for 2h!!
Posted: Thursday 17 October 2019 9:41
by waaren
disputes wrote: Thursday 17 October 2019 0:15
When therese been Off received from the switch for more then 2h i will get the notification.
[/size]
I don't think this is possible without some scripting.
in dzVents it could look like
Code: Select all
return {
on = { timer = {'every 2 hours at daytime'}},
execute = function(dz)
local lawnMower = dz.devices('lawnMowerSwitch') -- Change to the name of your switch
if lawnMower.state == 'Off' and lawnMower.lastUpdate.minutesAgo > 120 then
dz.notify('Lawnmower alert', 'Where is my lawnmower. Have not seen it in ' .. lawnMower.lastUpdate.minutesAgo .. ' minutes')
end
end
}
[Moderated] Topic start removed: it was a duplicate post with hidden phishing content