Blockly PIR motion detection lights control issue

Moderator: leecollings

Post Reply
raf1975
Posts: 5
Joined: Tuesday 02 February 2016 15:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Blockly PIR motion detection lights control issue

Post by raf1975 »

Hi,

I'm total noob with LUA hence I need to rely on Blockly. Here's the issue I'm experiencing:
- PIR sensor - Everspring SP103 PIR Motion Sensor
- LED flood light controlled by FIBARO System FGS222 Double Relay Switch 2x1.5kW

I have a blockly already created as follows:
Screen Shot 2016-10-20 at 21.32.35.png
Screen Shot 2016-10-20 at 21.32.35.png (74.01 KiB) Viewed 1652 times
The way that PIR sensor works is once there's a movement it stays active for 6 seconds.
What I need to achieve is:

- if there's a movement the floodlight stays on for 30 seconds (already done - 6 seconds + 24 = 30)
- if the floodlight is already turned on don't turn it off after 30 seconds, e.g. when we dine in the backgarden after sunset
- if the floodlight is off and there's a movement turn it on and when the movement reoccurs within that 30 seconds, reset the timer so the floodlight stays on.

LUA is too complex for me at this stage. Hence Blockly approach.

Thanks in advance,

Rafal
mattsjo
Posts: 8
Joined: Saturday 13 July 2013 22:27
Target OS: -
Domoticz version:
Location: Stockholm, Sweden
Contact:

Re: Blockly PIR motion detection lights control issue

Post by mattsjo »

Hi,
If you still have problems, try to remove the time>0 statement.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests