Page 1 of 1

condition when manually activated

Posted: Friday 31 May 2019 9:39
by necrofrost
Hi all,

I've got a motion sensor in the garden which triggers the lights in my garden after sunset for 2 minutes. Always handy when you come home during the night. But I also sometimes activate the lights manually in the garden through my klikaanklikuit remote.

The issue is that if I activate the lights manually during the evening, and someone activates the motions sensor, after 2 minutes the lights go off. But I don't want blocky to put out the lights in the garden while being manually activated. So I thought about using a custom variable. But for some reason this doesn't work.

does someone have a good tip for me on how to achieve this? here is my blocky and the custom variable

Image

---- and the custom variable

Image

regards,
Henk

Re: condition when manually activated

Posted: Friday 31 May 2019 10:39
by tozzke
I think this'll do the trick:

Code: Select all

If [ [Time > [Sunset]] or [Time < [Sunrise]] ] and [Garden movement] = [On] and [Garden lights] = [Off]
Do [Set [Garden lights] = [On]]
   [Set [Garden lights] = [Off] After [120] seconds]
When you've turned on the 'Garden lights' manually, the motion sensor won't trigger this event. It'll only trigger when the 'Garden lights' are off at the moment of movement.
So you'll only simply have to add the 'and [Garden lights] = [Off]' to your if statement

Re: condition when manually activated

Posted: Friday 31 May 2019 15:21
by necrofrost
WOW.... why didn't I think of this @tozzke Sometimes the things are just easy.

I'll implement it and report back. Thanks