condition when manually activated

Moderator: leecollings

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

condition when manually activated

Post 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
tozzke
Posts: 135
Joined: Friday 02 January 2015 9:22
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands
Contact:

Re: condition when manually activated

Post 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
necrofrost
Posts: 5
Joined: Tuesday 02 February 2016 15:48
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: condition when manually activated

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests