Search found 13 matches

by AriePiet
Saturday 04 October 2025 14:06
Forum: Other questions and discussions
Topic: motion sensor triggers script to often
Replies: 11
Views: 349

Re: motion sensor triggers script to often

It's up and running now for some time and it seems to do exactly what i want.

I think the issue was, that in the orignal script i worked with a pid file for the whole script, where in the new script the PID is created only for the FFMPEG process. This way the process runs in the background and ...
by AriePiet
Wednesday 24 September 2025 14:24
Forum: Other questions and discussions
Topic: motion sensor triggers script to often
Replies: 11
Views: 349

Re: motion sensor triggers script to often

@lost

I think i got it, it's running now like it should, but with some other issues not related to my initial problem.
I am going to adjust my script and extend it with other things and fix other things too.

@habahabahaba

Regarding; Lua/dzVent, no idea howto do/use it :-(

Thank you for the ...
by AriePiet
Tuesday 23 September 2025 19:35
Forum: Other questions and discussions
Topic: motion sensor triggers script to often
Replies: 11
Views: 349

Re: motion sensor triggers script to often

If i try that, then the script stops (or hangs) after fmpeg finishes i gues at the the point of the & or right after that.

I changed my script to:

/usr/bin/ffmpeg -i rtsp://$Loginname:$Password@$IP:554/Streaming/Channels/101/ -vcodec copy -t $Rec_Time -y $PATH/$FILENAME &
[ $? -eq 0 ] && echo -n ...
by AriePiet
Tuesday 23 September 2025 16:04
Forum: Other questions and discussions
Topic: motion sensor triggers script to often
Replies: 11
Views: 349

Re: motion sensor triggers script to often

Sorry for the late reply, was away for my work.

Anyway, my script looks like below. Any idea how to use your suggestion into that?
To make sure that the scrpit does not start during a current run, i use the PID file option, which works great.

#!/bin/bash ...
by AriePiet
Sunday 24 August 2025 11:40
Forum: Other questions and discussions
Topic: motion sensor triggers script to often
Replies: 11
Views: 349

motion sensor triggers script to often

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 ...
by AriePiet
Sunday 14 April 2024 10:27
Forum: Switches and Scenes
Topic: Mutliple events
Replies: 14
Views: 4091

Re: Mutliple events

Hi Haba,

Sorry for the late response.
Here you have the basic for the script:

#!/bin/bash
# VoordeurBelCam-vid.sh
# ==============
# |Author: JvdB|
# ==============
# Take video with the SmartWares IP WiFi camera..!
# With this script you save a live video from any camera using rtsp, mine is a ...
by AriePiet
Wednesday 03 April 2024 20:17
Forum: Switches and Scenes
Topic: Mutliple events
Replies: 14
Views: 4091

Re: Mutliple events

@haba

Tears of joy and happiness here, it looks like it's working!

Not sure about you example, but i had to uncheck the 'Ignore Interval' option:
Schermafbeelding 2024-04-03 201233.png
Schermafbeelding 2024-04-03 201233.png (62.46 KiB) Viewed 3938 times
by AriePiet
Tuesday 02 April 2024 19:49
Forum: Switches and Scenes
Topic: Mutliple events
Replies: 14
Views: 4091

Re: Mutliple events


So, like this:

cnt=`ps x | grep "VoordeurBelCam-vid.sh"|grep -cv grep`
echo $cnt
if [ $cnt -gt 1 ]
then
echo "Process already running"
exit
fi
--- rest of your script
./VoordeurBelCam-vid.sh &

Although this looks very promising and i'll definately will use it, wouldn't it be better to ...
by AriePiet
Sunday 31 March 2024 21:35
Forum: Switches and Scenes
Topic: Mutliple events
Replies: 14
Views: 4091

Re: Mutliple events

Thanks Haba,

I will look into this also, not really played with Dzevents before.
by AriePiet
Sunday 31 March 2024 14:18
Forum: Switches and Scenes
Topic: Mutliple events
Replies: 14
Views: 4091

Re: Mutliple events

So, like this:

cnt=`ps x | grep "VoordeurBelCam-vid.sh"|grep -cv grep`
echo $cnt
if [ $cnt -gt 1 ]
then
echo "Process already running"
exit
fi
--- rest of your script
./VoordeurBelCam-vid.sh &

Although this looks very promising and i'll definately will use it, wouldn't it be better to prevent ...
by AriePiet
Sunday 31 March 2024 13:46
Forum: Switches and Scenes
Topic: Mutliple events
Replies: 14
Views: 4091

Re: Mutliple events

First thanks for your quick replies!

Not sure why this would work, but worth a try.

I have created a new script, which is started by the Domo switch event:

cnt=`ps x | grep "Pre-VoordeurBel.sh"|grep -cv grep`
echo $cnt
if [ $cnt -gt 1 ]
then
echo "Process already running"
exit
fi
--- rest of ...
by AriePiet
Sunday 31 March 2024 11:26
Forum: Switches and Scenes
Topic: Mutliple events
Replies: 14
Views: 4091

Re: Mutliple events

Hi jvdz,

In the script i already prevent it from running more then once, that's not the problem.

The problem is that, somewhere (Domoticz, Espeasy) each press is remembered and handled after the first press and thus the script starts again.
by AriePiet
Saturday 30 March 2024 13:00
Forum: Switches and Scenes
Topic: Mutliple events
Replies: 14
Views: 4091

Mutliple events

Hi Guys,

I am posting this here, as it's switch related.

I am having an issue where a specifi bash script is triggered to run more than once. I know why, but not how to surpress it.

I have several EspEasy devices, with all kinds of sensors and they all work flawlessly except for the one with a ...