I have a outside shed light on a pir.
I have a pleg that turns on the kitchen light as soon as the outside light is on. Great.
How do I turn the kitchen off though in case it’s a mouse etc.
I would like to wait 5mins then, if the back door or the kitchen pir sensor hasn’t tripped, then turn the kitchen light off.
Define a Schedule with OnType: SelfReTrigger and OffType: Interval, 00:05:00
In the Actions for the Condition that turns on the light, add one for PLEG to start the new timer.
Add a Condition that checks if the timer has stopped and whether the motion detectors have tripped recently. Set the Action for that to turn off the kitchen light.
Actions for Condition: WorktopsOn
Device Actions:
Immediate
Device Action Arguments
Worktops SetTarget newTargetValue=1
outdoor light do kitchen StartTimer timerName=s1 intervalTime=00:05:00
Getting there.
Yes, i’m on UI5, hated UI7 and the thermostat issue is a deal breaker for me.
So i have the outside light triggering the inside worktop/kitchen light.
After 5 mins, the kitchen light will go off. Perfect.
How do add the conditions though?
If the back door opens, or there is motion in the kitchen, another scene triggers the worktops to go on.
I don’t want the worktops to switch off after 5 mins if i’m still in the room or opened the back door.
Is there a way to cancel the timer and don’t turn off the light if there is kitchen motion or back door opens within the 5 mins?
Sorry, it’s just i don’t understand that 2nd condition, so i was trying to make it work with my BBC BASIC programming.
Triggers
Name Description
shedon Shed Light is turned on
Schedules
Name On Type On Time On Days Random On Delay Off After Type Off Time Off Days Random Off Delay
s1 Self ReTrigger None Interval 05:00 None
Device Properties
Name Device Name Device Variable
bdoor Back Door Tripped
coffer RFx Coffer Status
knmotion Fib Sensor LastTrip
lighten Shed Light Status
loungeOR Lounge LightORide Status
Conditions
Name Repeat Expression
WorktopsOn No (shedon==1)
Timeout No !s1 AND (WorktopsOn; !s1) AND (knmotion; !s1 < 5:00)
Lounge No (coffer==0) AND (shedon==1) AND (loungeOR==0)
Actions
Quote
!s1 AND (WorktopsOn; !s1) AND (knmotion; !s1 < 5:00)
Doesn't seem to be working.
If you switch the worktop lights on by other means, you need to have logic to detect that in the Condition. Try something like this:
!s1 AND (WorktopsOn; !s1) AND (knmotion; !s1 > 5:00) AND (bdoor; !s1 > 5:00)
Explanation:
This expression becomes true when the timer s1 has ended, it ended after the Condition WorktopsOn last became true (which started the timer), it ended at least 5 minutes since knmotion was last true and it ended at least five minutes after bdoor last became true.
If you place the logic to turn on the worktop lights when the door opens or motion is detected in the same PLEG, you could simplify this a little.
Best Home Automation shopping experience. Shop at Ezlo!