Page 1 of 1

motion sensor triggers script to often

Posted: Sunday 24 August 2025 11:40
by AriePiet
Hi guys,

I have a motion sensor (pir) connected to a wemos, it sends t's dat to Domoticz, works perfect. On Domoticz i havesetup a switc (motion sensor) and when activated it should run a script.
The script start a camera record for 5 minutes. So far so good!

But when during this 5 minutes the switch is activated again, the scripts runs again after the first run.

Is there a way to surpress this? Thus after the inital trigger the motion sensor should be ignored for a predfined time?

Re: motion sensor triggers script to often

Posted: Sunday 24 August 2025 12:03
by jvdz
What is the script that you use?
You could test in the script for the time passed since the last change and when that is less than 5 minutes you skip the recording.

Re: motion sensor triggers script to often

Posted: Sunday 24 August 2025 15:45
by waltervl
And you can do that for example with code example:

Code: Select all

if (domoticz.devices('My PIR').lastUpdate.minutesAgo > 5) then
      -- your code to record camera for 5 minutes
end