Script being repeated every few minutes

Moderator: leecollings

Post Reply
stuiow
Posts: 139
Joined: Saturday 18 April 2015 18:56
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.6857
Location: Isle of Wight, United Kingdom.
Contact:

Script being repeated every few minutes

Post by stuiow »

Hi all,
I have a blocky going for when a shed door is opened.
I want it to go off just the once, but it seems to repeat setting everything off again every 3-5 minutes, (not timed it, damn annoying).

What command can i pop in there so it only occurs the once (when triggered)?
https://drive.google.com/open?id=0B9Tgf ... mR3XzhLX1U
Regards

Stuart
Now setup on a RPI3.
Also using Evohome HGI80, RFXTRX433E and a Aeotec Gen5 stick. Mainly a Gen5 Z-Wave system.
My weather (Davis vantage Pro2) data is obtained by weatherunderground
Now collecting rtl_433 data from Apollo Ultrasonic meter
Lebo2d9
Posts: 139
Joined: Tuesday 06 September 2016 20:39
Target OS: Raspberry Pi / ODroid
Domoticz version: L stab
Location: Belgium
Contact:

Re: Script being repeated every few minutes

Post by Lebo2d9 »

Hi Stuart,
Is the sensor not sending it status each 3-5 minutes. Maybe you can add an extra dummy with the previous state of your sensor.
If you sensor state and the previous state is equal then nothing should happen. If the sensor state and the previous staet is different that you preform your actions and also update the state of you dummy switch to the new state.
Domoicz on RPI3 (wifi) directly connected 3x ds18b20 for CV temp, Evohome (9 zone), 1 remote 220V switch based on ESP-12. RFXtrx433E, 16x AMST-606, 5 Somfy RTS motors
Domoticz on RPI3(wifi) as slave for terraruim control
More to come
stuiow
Posts: 139
Joined: Saturday 18 April 2015 18:56
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.6857
Location: Isle of Wight, United Kingdom.
Contact:

Re: Script being repeated every few minutes

Post by stuiow »

Ive a similar blocky script involving windows, but doesnt contain anything about times, that works fine. This script is a real pain for repeatinly sounding alarm and lighting lights.
I like your thought on the dummy switch, i'll look into that. Cheers

Sent from my SM-G925F using Tapatalk
Now setup on a RPI3.
Also using Evohome HGI80, RFXTRX433E and a Aeotec Gen5 stick. Mainly a Gen5 Z-Wave system.
My weather (Davis vantage Pro2) data is obtained by weatherunderground
Now collecting rtl_433 data from Apollo Ultrasonic meter
gerardvs
Posts: 81
Joined: Sunday 04 January 2015 0:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest-1
Location: /dev/null
Contact:

Re: Script being repeated every few minutes

Post by gerardvs »

By design scripts have no knowledge of previous activity. The status could be stored in a dummy switch as stated in an earlier post or you could use a "user variable" to store the actual status. In your script you could check the status and take action.... or not.
halaran
Posts: 1
Joined: Thursday 08 June 2017 15:19
Target OS: Windows
Domoticz version:
Contact:

Re: Script being repeated every few minutes

Post by halaran »

Haha :lol: ... "Or not".... Buy the way thanx for your advices and tips
I like to listen orchestra music. Because I feel the melody and style of playing on different instruments
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest