Motionsensor refreshing?


#1

1) Give a description of the problem
Light comes on after motion, but turns off after the 1 minutemark when theres still motion, instead of extenting its time.

2) What is the expected behavior?
Light should come on upon motion and stay on whenever motion is there.

3) What is happening/not happening?
Everything is happening; motion --> light comes on --> turns off after 1 minute. However, lets say i stay in that room and the sensor notices my activity, it wont lengthen the time of the light being on. After one minute it turns off (and on quickly). How to i program the piston so that another minute of light is added to the timer?

**4) Post a Green Snapshot of the piston

5) Attach any logs (From ST IDE and by turning logging level to Full)
(23-8-2018 12:31:11 +97ms
+1ms ╔Received event [Sensor Overloop].motion = inactive with a delay of 77ms
+78ms ║RunTime Analysis CS > 27ms > PS > 28ms > PE > 24ms > CE
+89ms ║Runtime (35935 bytes) successfully initialized in 28ms (v0.2.0e1.20170728) (88ms)
+90ms ║╔Execution stage started
+98ms ║║Comparison (enum) inactive is (string) active = false (1ms)
+99ms ║║Cancelling condition #2’s schedules…
+100ms ║║Condition #2 evaluated false (5ms)
+101ms ║║Cancelling condition #1’s schedules…
+101ms ║║Condition group #1 evaluated false (state changed) (7ms)
+104ms ║╚Execution stage complete. (13ms)
+105ms ║Setting up scheduled job for Thu, Aug 23 2018 @ 12:32:06 PM CEST (in 55.547s)
+121ms ╚Event processed successfully (121ms)
23-8-2018 12:31:06 +434ms
+1ms ╔Received event [Sensor Overloop].motion = active with a delay of 97ms
+89ms ║RunTime Analysis CS > 29ms > PS > 38ms > PE > 23ms > CE
+247ms ║Runtime (35940 bytes) successfully initialized in 38ms (v0.2.0e1.20170728) (244ms)
+247ms ║╔Execution stage started
+258ms ║║Comparison (enum) active is (string) active = true (2ms)
+259ms ║║Cancelling condition #2’s schedules…
+260ms ║║Condition #2 evaluated true (6ms)
+264ms ║║Comparison (string) :4f5e4b0863b29651195c2e43df1878cb: is (string) :4f5e4b0863b29651195c2e43df1878cb: = true (2ms)
+265ms ║║Condition #3 evaluated true (5ms)
+266ms ║║Cancelling condition #1’s schedules…
+267ms ║║Condition group #1 evaluated true (state changed) (13ms)
+269ms ║║Cancelling statement #6’s schedules…
+292ms ║║Executed physical command [Overloop].on() (20ms)
+293ms ║║Executed [Overloop].on (21ms)
+304ms ║║Lights on overloop
+310ms ║║Executed virtual command [Overloop].log (11ms)
+313ms ║║Executed virtual command [Overloop].wait (1ms)
+314ms ║║Requesting a wake up for Thu, Aug 23 2018 @ 12:32:06 PM CEST (in 60.0s)
+322ms ║╚Execution stage complete. (75ms)
+324ms ║Setting up scheduled job for Thu, Aug 23 2018 @ 12:32:06 PM CEST (in 59.991s)
+344ms ╚Event processed successfully (343ms)
23-8-2018 12:31:05 +183ms
+4ms ╔Received event [Sanctuary].time = 1535020265734 with a delay of -560ms
+106ms ║RunTime Analysis CS > 38ms > PS > 38ms > PE > 35ms > CE
+125ms ║Runtime (35942 bytes) successfully initialized in 38ms (v0.2.0e1.20170728) (115ms)
+129ms ║╔Execution stage started
+230ms ║║Executed physical command [Overloop].off() (18ms)
+231ms ║║Executed [Overloop].off (23ms)
+259ms ║║Executed physical command [Overloop].refresh() (25ms)
+260ms ║║Executed [Overloop].refresh (28ms)
+270ms ║╚Execution stage complete. (145ms)
+287ms ╚Event processed successfully (288ms)
23-8-2018 12:30:10 +113ms
+1ms ╔Received event [Sensor Overloop].motion = inactive with a delay of 59ms
+81ms ║RunTime Analysis CS > 24ms > PS > 37ms > PE > 20ms > CE
+91ms ║Runtime (35935 bytes) successfully initialized in 37ms (v0.2.0e1.20170728) (89ms)
+92ms ║╔Execution stage started
+101ms ║║Comparison (enum) inactive is (string) active = false (1ms)
+102ms ║║Cancelling condition #2’s schedules…
+102ms ║║Condition #2 evaluated false (5ms)
+103ms ║║Cancelling condition #1’s schedules…
+103ms ║║Condition group #1 evaluated false (state changed) (7ms)
+106ms ║╚Execution stage complete. (14ms)
+107ms ║Setting up scheduled job for Thu, Aug 23 2018 @ 12:31:05 PM CEST (in 55.515s)
+124ms ╚Event processed successfully (123ms)
23-8-2018 12:30:05 +604ms
+2ms ╔Received event [Sensor Overloop].motion = active with a delay of 99ms
+73ms ║RunTime Analysis CS > 22ms > PS > 33ms > PE > 17ms > CE
+83ms ║Runtime (35940 bytes) successfully initialized in 33ms (v0.2.0e1.20170728) (81ms)
+84ms ║╔Execution stage started
+92ms ║║Comparison (enum) active is (string) active = true (1ms)
+93ms ║║Cancelling condition #2’s schedules…
+94ms ║║Condition #2 evaluated true (6ms)
+97ms ║║Comparison (string) :4f5e4b0863b29651195c2e43df1878cb: is (string) :4f5e4b0863b29651195c2e43df1878cb: = true (1ms)
+98ms ║║Condition #3 evaluated true (4ms)
+99ms ║║Cancelling condition #1’s schedules…
+99ms ║║Condition group #1 evaluated true (state changed) (11ms)
+101ms ║║Cancelling statement #6’s schedules…
+117ms ║║Executed physical command [Overloop].on() (13ms)
+117ms ║║Executed [Overloop].on (14ms)
+122ms ║║Lights on overloop
+127ms ║║Executed virtual command [Overloop].log (4ms)
+129ms ║║Executed virtual command [Overloop].wait (0ms)
+130ms ║║Requesting a wake up for Thu, Aug 23 2018 @ 12:31:05 PM CEST (in 60.0s)
+134ms ║╚Execution stage complete. (50ms)
+135ms ║Setting up scheduled job for Thu, Aug 23 2018 @ 12:31:05 PM CEST (in 59.996s)
+153ms ╚Event processed successfully (153ms))


#2

How long is your blind spot time. Ie, how long after the motion goes to inactive does it report active again. Many motion sensors go blind for a varying amount of time. By doing this they save battery life.

So, if your motion goes active, then immediately goes inactive. Then goes blind for 4 minutes, it won’t stay active. And your 1 minute timer will take affect and turn off your lights.

This is how I have mine setup, I changed the inactive time to 1 minute, but I usually have it set to 5 minutes. Just an FYI.


#3

Hey guys, at the moment im struggling with the response of this motionsensor. I was wondering if im doing something wrong here…sometimes it takes alot of seconds to actually trigger and refreshing is also a *&#%$. When im in the kitchen, and the lights do turn on they will automatically turn regardless whether if im moving in that area. Ive tried two motionsensors now, one Philips hue (dh) and one Xiaomi. Can someone help me out here?


#4

Two things.
1 why the if inside if the first if. It’s not checking anything just doing an action

  1. More importantly what is the blind time of your motion sensor. Many motion sensors will detect motion, then go inactive or stop looking for motion for a period of time. This saves battery. Some stay active for some time, others go inactive almost immediately.

If you have your wait statement set shorter than the blind time your lights are going to shut off, even if you are moving around.


#5

Hello there @Gopack2 thanks for your reply. i dont know what you mean with your first statement sadly. Second i dont know what the blindtime is for the philips hue motionsensor, i cant set it anywhere. Ive upped the wait to 5 minutes now. I was also thinking of implementing a ‘when motionsensor stays inactive for x minutes —> turn off’ But unfortunately i dont know how to do so.


#6

If you can wait a little I can write something fir you when I get home. I am mobile right now. So some time after 8 my time.

If you look in the classic snarttings app. Click on your motion device and look under the history tab. It should show the time it goes active and inactive. From there. You could stand in front of the motion sensor and watch that screen while moving around. Note the time it goes active and the time it goes active again. That is your blind time, the difference


#7

Thanks alot for helping me out. I dont see anything out of the ordinairy…looks like the blindspot is 1 minute(?) That can’t be true. Ive tried making something myself but it doesnt quite work out. Also, my biggest concern is the actual response time of the sensor, which leads me to think theres something more going on. Like, when i enter the kitchen it can sometimes take up to 5 seconds for the sensor to respond, and this also was the same deal with the other sensor, even though they where placed at the correct angle and distance.

this is what i have made now:


#8

If it’s taking 5 seconds or more it might be the motion sensor being sluggish. However you have tried 2 of them. What I would do is start simple.

If motion active turn single switch on
If motion inactive turn that switch off

From there build out your piston. Introduce a wait after the inactive motion to delay the turning the switch off.

Once you have that reasonably stable add another switch.


#9

Thanks for staying involved @Gopack2! The story so far; i was getting really tired and frankly irritated with the sensor in the kitchen. This morning again a buggy start. I began converting my pistons to ‘smart lighting’ smartapp native to Smartthings. Turns out, we’re back to the system as it was again, fast, smooth, no lags, no buggy performance. The only thing smartlighting (smartapp) cant do is dim the lights when motion stops, you just have the option of turning them off. For now im happy to take that as it is.

Once again thanks for your help and consult.

greetings Tim