Hi Everyone
I am recently starting learning about FHEM and I am facing some problems with the timer.
So what I want to do is that, I constructed a scenario when the reed switch is off AND the PIR sensor is showing noMotion, the HVAC will be off
define s2 notify PIR IF ([Reed] eq "off" && [PIR] eq "off") (set HVAC off)
But, I want to make it in a way that if there is no motion for 30 consecutive seconds the HVAC will be off
How can I do that
Thank you in advance
Hi, first of all: welcome to the FHEM forum.
Sounds like you are looking for some kind of watchdog functionality, so e.g.
define watchdog_PIR watchdog PIR:off 00:00:30 PIR:on { if (ReadingsVal('Reed','state','unknown') eq 'off') {fhem("set HVAC off") } }
attr watchdog_PIR autoRestart 1
Thist might need some tweaking in detail, but it's not that easy to help when just some short lines are provided.
Having a look on the opportunities the so called Event-Monitor offers: https://wiki.fhem.de/wiki/Event_monitor
PS.: please format code using code tags (the # symbol above the smilies) in the future :)