Re: Send notification after switch been off for 2h!!

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Send notification after switch been off for 2h!!

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

Re: Send notification after switch been off for 2h!!

Post 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
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest