Wall switch should disable motion triggered piston for 2 seconds


#1

I have a motion triggered Fibaro switch that is also connected to a wall switch (button with spring behind).

How can I disable the motion triggered Piston for a couple of seconds enabling me to leave the room? As it works now, the light switches on again some seconds after I leave the room.


#2

You should be able to do it by adding one condition to your top IF statement:

The only catch with that is it will ignore motion if you turned the switch ON within the past 5 seconds, too. If that creates an issue, just make a group IF statement:

If
Motion Sensor 1 is Active
AND
(
Switch has not changed in past 5 seconds
OR
Switch is on
)

That will get around it.


#3

Or you could change your condition to a trigger. Motion sensor 1 motion CHANGES TO ACTIVE.


#4

In this case, it wouldn’t change anything. That lightning bolt to the left of the IF condition means it’s subscribed to events for Motion Sensor 1… making it behave exactly the same way as a trigger.

If it hit the light switch and walked out of the room, the motion sensor would detect motion and turn the light on again.


#5

No, it would not. Not unless you moving around inside the room is not detected as motion. Trust me, I have all my motion sensors set up this way and it works perfectly. All motions sensors have a built in timer that keeps them active for a set period of time even if no motion is detected in the zone. Think of it this way, if they didn’t, it would change to inactive all the time. You aren’t moving around enough to trigger the motion sensor if you’re sitting watching TV, right? Changing the trigger to CHANGES TO requires that it go from INACTIVE to ACTIVE to trigger the event. So, if you’re already active, the lights won’t come on . Why not try it and see rather than just disagreeing with me?


#6

Take a deep breath, sport. Nobody insulted you… yet. :wink:

I’ve been on here long enough to know about motion sensors and their motion timeouts. I’ve also been helping people on here long enough to know that as much as you know YOUR system, you have no idea what some else’s is set up like. Motion sensor location, motion timeout (can be as low as one second on some DTH’s).

The only thing we know in this thread is the OP’s motion detector is picking him up leaving the room. It may just face the entrance to the room to pick up people coming or going, rather than being in the room. The solution I offered him will work regardless of the location of the motion sensor and its programmed timers.


#7

Yet? Wow, I’m shaking in my boots. My solution wold also work and is much simpler to implement.


#8

This is so strange. Seems like everything is arbitrary, sometimes the lights remain off, sometimes they are turned on again after some 10 seconds, and sometimes motion detection does not work after using the switch… :frowning:

This is my log:
Received event [Fibaro Motion Sensor TV Stue].motion = inactive with a delay of 52ms
+146ms â•‘Setting up scheduled job for Wed, Apr 25 2018 @ 10:49:37 PM CEST (in 599.996s)
+157ms â•šEvent processed successfully (157ms)
25.4.2018, 22:38:39 +501ms
+1ms â•”Received event [Dimmer TV stue].power = 0.0 with a delay of 83ms
+166ms â•‘Setting up scheduled job for Wed, Apr 25 2018 @ 10:48:39 PM CEST (in 599.995s)
+177ms â•šEvent processed successfully (177ms)
25.4.2018, 22:38:24 +151ms
+1ms â•”Received event [Dimmer TV stue].switch = on with a delay of 116ms
+10170ms â•‘Piston waited at a semaphore for 10064ms
+10226ms â•‘Setting up scheduled job for Wed, Apr 25 2018 @ 10:48:34 PM CEST (in 599.996s)
+10236ms â•šEvent processed successfully (10236ms)
25.4.2018, 22:38:29 +858ms
+1ms â•”Received event [Dimmer TV stue].switch = off with a delay of 148ms
+166ms â•‘Setting up scheduled job for Wed, Apr 25 2018 @ 10:48:30 PM CEST (in 599.996s)
+183ms â•šEvent processed successfully (183ms)
25.4.2018, 22:38:29 +580ms
+1ms â•”Received event [Dimmer TV stue].power = 29.7 with a delay of 109ms
+177ms â•‘Setting up scheduled job for Wed, Apr 25 2018 @ 10:48:29 PM CEST (in 599.996s)
+187ms â•šEvent processed successfully (186ms)
25.4.2018, 22:38:24 +38ms
+2ms â•”Received event [Dimmer TV stue].power = 2.0 with a delay of 108ms
+448ms â•‘Motion: Level to 30%
+451ms â•šEvent processed successfully (451ms)
25.4.2018, 22:38:22 +962ms
+1ms â•”Received event [Fibaro Motion Sensor TV Stue].motion = active with a delay of 167ms
+217ms â•‘Motion: Level to 30%
+220ms â•šEvent processed successfully (220ms)

and my modified Piston:


#9

You’ve got so many triggers in there the piston is being run every few seconds in your log.

25.4.2018, 22:38:39 +501ms
+1ms â•”Received event [Dimmer TV stue].power = 0.0 with a delay of 83ms
+166ms â•‘Setting up scheduled job for Wed, Apr 25 2018 @ 10:48:39 PM CEST (in 599.995s)
+177ms â•šEvent processed successfully (177ms)
25.4.2018, 22:38:24 +151ms
+1ms â•”Received event [Dimmer TV stue].switch = on with a delay of 116ms
+10170ms â•‘Piston waited at a semaphore for 10064ms
+10226ms â•‘Setting up scheduled job for Wed, Apr 25 2018 @ 10:48:34 PM CEST (in 599.996s)
+10236ms â•šEvent processed successfully (10236ms)
25.4.2018, 22:38:29 +858ms
+1ms â•”Received event [Dimmer TV stue].switch = off with a delay of 148ms
+166ms â•‘Setting up scheduled job for Wed, Apr 25 2018 @ 10:48:30 PM CEST (in 599.996s)
+183ms â•šEvent processed successfully (183ms)
25.4.2018, 22:38:29 +580ms
+1ms â•”Received event [Dimmer TV stue].power = 29.7 with a delay of 109ms
+177ms â•‘Setting up scheduled job for Wed, Apr 25 2018 @ 10:48:29 PM CEST (in 599.996s)
+187ms â•šEvent processed successfully (186ms)
25.4.2018, 22:38:24 +38ms
+2ms â•”Received event [Dimmer TV stue].power = 2.0 with a delay of 108ms
+448ms â•‘Motion: Level to 30%
+451ms â•šEvent processed successfully (451ms)
25.4.2018, 22:38:22 +962ms
+1ms â•”Received event [Fibaro Motion Sensor TV Stue].motion = active with a delay of 167ms
+217ms â•‘Motion: Level to 30%
+220ms â•šEvent processed successfully (220ms)

That’s six executions in 8 seconds from what I can tell… plus most of them are setting timers one minute in the future that will run again. With all those rapid-fire executions, it’s probably having some unintended consequences as it goes through your IF/Then/Else statements. Just guessing, but I think the only trigger you want is the Motion Sensor is Active.

Can you describe in plain English what you want this piston to do and in which situations you want it to execute? I can take a shot at importing it and cleaning it up then.


#10

Some of those trigger should be changed to conditions. Now at least we know why WebCore has been slower. You’re tying up all the resources with this piston!! LOL JK.

Try to move some of your trigger to Restrictions. This of it this way…your trigger should be anything you want to cause the action to happen, restrictions are the other limitations or states that would decide whether it actually happens or not.

For example, the power in line 26. You don’t want that to cause the light to go on. That should be a restriction not a trigger.


#11

Two things:
Firstly, I would like it to turn the lights on when I enter the room (motion) if the light is below 200 lux.

Secondly, this is a room where I watch TV so I would like to turn the lights off either by using the switch (which is of spring type), or automatically after 60 seconds (not 600, typo) when no motion is detected. The latter shall not happen if the TV is on (outlet 1 power)

Thanks and regards,
Tom


#12

Ok, that’s a pretty straight-forward one. I’ll post up something I think will suit your needs in a bit.


#13

I don’t have the devices you do, so I can’t verify the subscriptions to changes/conditions worked the way I want them to. Can you import this, select your devices, then post up a green snapshot of it? I think this will accomplish everything you were after in your original post…


#14

Ok, thanks, will try.

But this one will not turn off if motion stops?


#15

Right, good catch. I copied the functionality from the original piston but forgot to put that piece in.

Just change the “and power is less than 50W” to whatever minimum threshold you need to be sure the TV is on… it’s at 50W now which might be too high.


#16

Thank you so much, working now :smiley: