motion detection and timeout

Moderator: leecollings

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

motion detection and timeout

Post by necrofrost »

Hi all,

I'm trying to create a small "security" enhancement to my new domoticz raspberry pi (bought a new one). Whenever my APIR-2150 (motion detector) is triggered, I want to set the garden light to on for an X amount of time. But for some reason my Blockly doesn't work properly. And since I want to try to avoid as much LUA as possible.... I'm asking here for advise.

This is my blockly
2019-03-20 23_09_43-Domoticz.png
2019-03-20 23_09_43-Domoticz.png (34.55 KiB) Viewed 1391 times
I've used the variable "garden motion detected" as a variable to store an integer in order to not keep on sending notifications. But that also doesn't work. The variable doesn't get set to 1.

if you guys need anymore information, please let me know

Henk
User avatar
kuifje
Posts: 36
Joined: Wednesday 25 October 2017 16:38
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Heemskerk
Contact:

Re: motion detection and timeout

Post by kuifje »

Henk
I think you need to use the if else blocky .
IF " gardenmotion detected=0 and time< sunset and movement = on
SET " gardenmotion detected = 1
SET " garden lights on
IF " gardenmotion detection = 1
SET" garden lights off after 1 minute.

Kuifje
Attachments
Knipsel.JPG
Knipsel.JPG (28.79 KiB) Viewed 1349 times
necrofrost
Posts: 5
Joined: Tuesday 02 February 2016 15:48
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: motion detection and timeout

Post by necrofrost »

Thanks for your response Kuifje.

Yesterday I had the PIR laying on the kitchen table and all of a sudden the garden lights turned on. after some time (I think it was the 60 seconds time out) the lights went out again. moving in the kitchen activated the light again. So apparently it works now. sometimes the pir doesn't get noticed by domoticz it looks like. very strange.
User avatar
kuifje
Posts: 36
Joined: Wednesday 25 October 2017 16:38
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Heemskerk
Contact:

Re: motion detection and timeout

Post by kuifje »

OK
good for you

kuifje
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest