Toggle Function or Siren Off for Minutes in Blocky

Moderator: leecollings

Post Reply
WBTech
Posts: 23
Joined: Saturday 08 July 2017 12:36
Target OS: Windows
Domoticz version:
Contact:

Toggle Function or Siren Off for Minutes in Blocky

Post by WBTech »

Hi, I am using a PIR/Microwave Outdoor Motion-detector to prevent failure alarm. The Motion-detector alarm signal is connected to a Fibaro Universal Binary Switch which gives alarm to a AEON Siren Gen5. This works fine, but as the Motion-detector has multiple areas I get a lot of signals if somebody is passing the whole area. My Question: Is it possible by using only Blocky to switch off the Siren after some seconds for some minutes after the first alarm signal ? I tried to switch off the siren for 2 minutes by Blocky, but the siren will be armed every time again (within the 2 Minutes) the Fibaro Universal Binary sensor gives a new signal. (sometimes 10 times and more within one minute).

If a "Toggle" option would be available in Blocky it should work. My idea: Switch On the siren after the first alarm signal for some seconds and then switch off the siren for some minutes after the sensor starts to toggle.

Maybe someone has a idea how to solve this only by Blocky. In the Forum I only could find some solutions by programming.

Thanks and best regards

WBTech

ps: I could not add my Blocky example to the Forum by using copy&paste
User avatar
K3rryBlue
Posts: 77
Joined: Tuesday 07 February 2017 22:13
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10xx
Location: Netherlands
Contact:

Re: Toggle Function or Siren Off for Minutes in Blocky

Post by K3rryBlue »

you can use a custom var. Didn't test it.
In this case after triggering the custom var is set to 1 for a certain amount of time, which causes the IF to fail.
You need to define the lenght in seconds. Prob the time that the PIR keeps pushing signals.

IF PIR = On and custom var = 0
DO Alarm = ON
Set Alarm = Off after 60 seconds
Custom var = 1
Set Custom var = 0 after 240 seconds
Domoticz V4.10717, RPi2 -> Linux raspberrypi 4.4.47-v7+ , RFXCOM - RFXtrx433 USB 433.92MHz ,RAZBERRY2 and OpenZWave USB Version: 1.4-2363-g1f10253-dirty
WBTech
Posts: 23
Joined: Saturday 08 July 2017 12:36
Target OS: Windows
Domoticz version:
Contact:

Re: Toggle Function or Siren Off for Minutes in Blocky

Post by WBTech »

Thanks, sounds good I will test it in the next days.
WBTech
Posts: 23
Joined: Saturday 08 July 2017 12:36
Target OS: Windows
Domoticz version:
Contact:

Re: Toggle Function or Siren Off for Minutes in Blocky

Post by WBTech »

Hi K3rryBlue, your suggestion worked fine ! I am new in Domoticz and had not yet worked with variables, but they are quite useful. I will use them also for other tasks in the future. Thanks and best reagrds
WBTech
User avatar
K3rryBlue
Posts: 77
Joined: Tuesday 07 February 2017 22:13
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10xx
Location: Netherlands
Contact:

Re: Toggle Function or Siren Off for Minutes in Blocky

Post by K3rryBlue »

you're welcome.

If you find maintaining these custom vars troublesome, you can also replace them with virtual switches. They give you a direct view on their value and easier to program with blockly. you might even use these switches to perform additional actions.
Domoticz V4.10717, RPi2 -> Linux raspberrypi 4.4.47-v7+ , RFXCOM - RFXtrx433 USB 433.92MHz ,RAZBERRY2 and OpenZWave USB Version: 1.4-2363-g1f10253-dirty
WBTech
Posts: 23
Joined: Saturday 08 July 2017 12:36
Target OS: Windows
Domoticz version:
Contact:

Re: Toggle Function or Siren Off for Minutes in Blocky

Post by WBTech »

Thanks for your additional information. The possibilities of virtual switches sounds interesting. I will do some tests to find out what is better working under special conditions. I am using Domoticz now for security reasons, home automation and solar.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests