Motion / lighting piston triggering randomly at night

light
motion
piston

#1

Hi Peeps my partner is starting to get well miffed with our lights turning on randomly throughout the night, any advice help would be greatly appreciated.

1) Give a description of the problem
2No. hue lights turning on randomly through out the night,

2) What is the expected behaviour?
After 11pm the piston should remain inactive until 2 hours before next sunrise.

3) What is happening/not happening?
The piston works fine during the allotted time frame and behaves as expected

**4) Post a Green Snapshot of the piston

5) Attach logs after turning logging level to Full

`/8/2020, 8:32:24 AM +111ms
+1ms 	╔Received event [Home].time = 1591601545586 with a delay of -1475ms
+127ms 	║RunTime Analysis CS > 22ms > PS > 38ms > PE > 67ms > CE
+129ms 	║Runtime (39187 bytes) successfully initialized in 38ms (v0.3.110.20191009) (127ms)
+130ms 	║╔Execution stage started
+149ms 	║║Executed physical command [Hue color lamp 1].setLevel([0]) (15ms)
+151ms 	║║Fast executing schedules, waiting for 1351ms to sync up
+1518ms 	║║Executed physical command [Hue color lamp 2].setLevel([0]) (13ms)
+1519ms 	║║Fast executing schedules, waiting for 56ms to sync up
+1590ms 	║║Executed physical command [Hue color lamp 1].setLevel([0]) (10ms)
+1592ms 	║║Fast executing schedules, waiting for 9ms to sync up
+1615ms 	║║Executed physical command [Hue color lamp 2].setLevel([0]) (10ms)
+1629ms 	║╚Execution stage complete. (1499ms)
+1630ms 	╚Event processed successfully (1630ms)
6/8/2020, 8:30:25 AM +138ms
+0ms 	╔Received event [Home].time = 1591601426092 with a delay of -955ms
+310ms 	║RunTime Analysis CS > 88ms > PS > 164ms > PE > 58ms > CE
+312ms 	║Runtime (39188 bytes) successfully initialized in 164ms (v0.3.110.20191009) (311ms)
+314ms 	║╔Execution stage started
+357ms 	║║Executed physical command [Hue color lamp 1].setLevel([1]) (16ms)
+449ms 	║║Executed virtual command [Hue color lamp 1].fadeLevel (112ms)
+473ms 	║║Executed physical command [Hue color lamp 2].setLevel([1]) (18ms)
+475ms 	║║Executed virtual command [Hue color lamp 2].fadeLevel (23ms)
+477ms 	║║Requesting a wake up for Mon, Jun 8 2020 @ 8:32:25 AM BST (in 120.1s)
+483ms 	║╚Execution stage complete. (170ms)
+486ms 	║Setting up scheduled job for Mon, Jun 8 2020 @ 8:32:25 AM BST (in 119.963s), with 4 more jobs pending
+496ms 	╚Event processed successfully (496ms)
6/8/2020, 8:25:25 AM +923ms
+1ms 	╔Received event [Motion Sensor Bedroom 2].motion = inactive with a delay of 67ms
+101ms 	║RunTime Analysis CS > 20ms > PS > 32ms > PE > 50ms > CE
+103ms 	║Runtime (39203 bytes) successfully initialized in 32ms (v0.3.110.20191009) (102ms)
+104ms 	║╔Execution stage started
+146ms 	║║Comparison (time) 30326032 is_between (datetime) 1591647900000 .. (time) 82800000 = false (7ms)
+148ms 	║║Condition #2 evaluated false (39ms)
+149ms 	║║Condition group #1 evaluated false (state did not change) (41ms)
+154ms 	║║Comparison (enum) inactive changes_to (string) inactive = true (0ms)
+156ms 	║║Cancelling condition #9's schedules...
+157ms 	║║Condition #9 evaluated true (6ms)
+158ms 	║║Cancelling condition #8's schedules...
+159ms 	║║Condition group #8 evaluated true (state changed) (8ms)
+161ms 	║║Cancelling statement #10's schedules...
+167ms 	║║Executed virtual command [Hue color lamp 1, Hue color lamp 2].wait (0ms)
+168ms 	║║Requesting a wake up for Mon, Jun 8 2020 @ 8:30:26 AM BST (in 300.0s)
+172ms 	║╚Execution stage complete. (68ms)
+174ms 	║Setting up scheduled job for Mon, Jun 8 2020 @ 8:30:26 AM BST (in 299.996s)
+185ms 	╚Event processed successfully (186ms)
6/8/2020, 8:25:23 AM +994ms
+1ms 	╔Received event [Motion Sensor Bedroom].motion = inactive with a delay of 65ms
+111ms 	║RunTime Analysis CS > 18ms > PS > 31ms > PE > 61ms > CE
+113ms 	║Runtime (39201 bytes) successfully initialized in 31ms (v0.3.110.20191009) (111ms)
+114ms 	║╔Execution stage started
+157ms 	║║Comparison (time) 30324113 is_between (datetime) 1591647900000 .. (time) 82800000 = false (7ms)
+159ms 	║║Condition #2 evaluated false (40ms)
+160ms 	║║Condition group #1 evaluated false (state did not change) (42ms)
+169ms 	║║Condition #9 evaluated false (5ms)
+170ms 	║║Condition group #8 evaluated false (state did not change) (8ms)
+172ms 	║╚Execution stage complete. (58ms)
+174ms 	╚Event processed successfully (173ms)
6/8/2020, 8:25:10 AM +226ms
+1ms 	╔Received event [Motion Sensor Bedroom].motion = active with a delay of 70ms
+115ms 	║RunTime Analysis CS > 22ms > PS > 31ms > PE > 61ms > CE
+117ms 	║Runtime (39199 bytes) successfully initialized in 31ms (v0.3.110.20191009) (115ms)
+118ms 	║╔Execution stage started
+161ms 	║║Comparison (time) 30310349 is_between (datetime) 1591647900000 .. (time) 82800000 = false (7ms)
+163ms 	║║Condition #2 evaluated false (39ms)
+164ms 	║║Condition group #1 evaluated false (state did not change) (41ms)
+172ms 	║║Condition #9 evaluated false (6ms)
+173ms 	║║Condition group #8 evaluated false (state did not change) (7ms)
+175ms 	║╚Execution stage complete. (57ms)
+176ms 	╚Event processed successfully (176ms)
6/8/2020, 8:25:05 AM +884ms
+1ms 	╔Received event [Motion Sensor Bedroom 2].motion = active with a delay of 53ms
+88ms 	║RunTime Analysis CS > 15ms > PS > 25ms > PE > 48ms > CE
+91ms 	║Runtime (39197 bytes) successfully initialized in 25ms (v0.3.110.20191009) (89ms)
+92ms 	║╔Execution stage started
+129ms 	║║Comparison (time) 30305980 is_between (datetime) 1591647900000 .. (time) 82800000 = false (6ms)
+131ms 	║║Condition #2 evaluated false (35ms)
+132ms 	║║Condition group #1 evaluated false (state did not change) (36ms)
+137ms 	║║Comparison (enum) active changes_to (string) inactive = false (1ms)
+139ms 	║║Cancelling condition #9's schedules...
+139ms 	║║Condition #9 evaluated false (5ms)
+140ms 	║║Cancelling condition #8's schedules...
+141ms 	║║Condition group #8 evaluated false (state changed) (7ms)
+144ms 	║╚Execution stage complete. (52ms)
+145ms 	╚Event processed successfully (145ms)
6/8/2020, 8:24:50 AM +294ms
+1ms 	╔Received event [Motion Sensor Bedroom 2].motion = inactive with a delay of 67ms
+103ms 	║RunTime Analysis CS > 18ms > PS > 32ms > PE > 52ms > CE
+105ms 	║Runtime (39203 bytes) successfully initialized in 32ms (v0.3.110.20191009) (103ms)
+106ms 	║╔Execution stage started
+144ms 	║║Comparison (time) 30290404 is_between (datetime) 1591647900000 .. (time) 82800000 = false (6ms)
+145ms 	║║Condition #2 evaluated false (35ms)
+146ms 	║║Condition group #1 evaluated false (state did not change) (36ms)
+152ms 	║║Comparison (enum) inactive changes_to (string) inactive = true (1ms)
+153ms 	║║Cancelling condition #9's schedules...
+154ms 	║║Condition #9 evaluated true (5ms)
+155ms 	║║Cancelling condition #8's schedules...
+156ms 	║║Condition group #8 evaluated true (state changed) (8ms)
+158ms 	║║Cancelling statement #10's schedules...
+164ms 	║║Executed virtual command [Hue color lamp 1, Hue color lamp 2].wait (0ms)
+165ms 	║║Requesting a wake up for Mon, Jun 8 2020 @ 8:29:50 AM BST (in 300.0s)
+170ms 	║╚Execution stage complete. (64ms)
+172ms 	║Setting up scheduled job for Mon, Jun 8 2020 @ 8:29:50 AM BST (in 299.995s)
+179ms 	╚Event processed successfully (179ms)
6/8/2020, 8:24:07 AM +19ms
+1ms 	╔Received event [Motion Sensor Bedroom].motion = inactive with a delay of 58ms
+99ms 	║RunTime Analysis CS > 17ms > PS > 31ms > PE > 51ms > CE
+102ms 	║Runtime (39200 bytes) successfully initialized in 31ms (v0.3.110.20191009) (100ms)
+103ms 	║╔Execution stage started
+145ms 	║║Comparison (time) 30247127 is_between (datetime) 1591647900000 .. (time) 82800000 = false (7ms)
+147ms 	║║Condition #2 evaluated false (39ms)
+149ms 	║║Condition group #1 evaluated false (state did not change) (41ms)
+157ms 	║║Condition #9 evaluated false (6ms)
+158ms 	║║Condition group #8 evaluated false (state did not change) (7ms)
+161ms 	║╚Execution stage complete. (57ms)
+162ms 	╚Event processed successfully (162ms)
6/8/2020, 8:23:56 AM +910ms
+1ms 	╔Received event [Motion Sensor Bedroom].motion = active with a delay of 59ms
+98ms 	║RunTime Analysis CS > 18ms > PS > 28ms > PE > 52ms > CE
+101ms 	║Runtime (39198 bytes) successfully initialized in 28ms (v0.3.110.20191009) (99ms)
+102ms 	║╔Execution stage started
+141ms 	║║Comparison (time) 30237017 is_between (datetime) 1591647900000 .. (time) 82800000 = false (6ms)
+143ms 	║║Condition #2 evaluated false (37ms)
+144ms 	║║Condition group #1 evaluated false (state did not change) (38ms)
+153ms 	║║Condition #9 evaluated false (6ms)
+154ms 	║║Condition group #8 evaluated false (state did not change) (8ms)
+156ms 	║╚Execution stage complete. (54ms)
+157ms 	╚Event processed successfully (157ms)
6/8/2020, 8:23:30 AM +986ms
+0ms 	╔Received event [Motion Sensor Bedroom].motion = inactive with a delay of 123ms
+87ms 	║RunTime Analysis CS > 16ms > PS > 24ms > PE > 47ms > CE
+89ms 	║Runtime (39201 bytes) successfully initialized in 24ms (v0.3.110.20191009) (88ms)
+90ms 	║╔Execution stage started
+128ms 	║║Comparison (time) 30211081 is_between (datetime) 1591647900000 .. (time) 82800000 = false (7ms)
+130ms 	║║Condition #2 evaluated false (36ms)
+131ms 	║║Condition group #1 evaluated false (state did not change) (37ms)
+140ms 	║║Condition #9 evaluated false (6ms)
+141ms 	║║Condition group #8 evaluated false (state did not change) (8ms)
+143ms 	║╚Execution stage complete. (53ms)
+144ms 	╚Event processed successfully (145ms)
6/8/2020, 8:23:20 AM +564ms
+1ms 	╔Received event [Motion Sensor Bedroom].motion = active with a delay of 70ms
+112ms 	║RunTime Analysis CS > 20ms > PS > 33ms > PE > 58ms > CE
+114ms 	║Runtime (39199 bytes) successfully initialized in 33ms (v0.3.110.20191009) (112ms)
+115ms 	║╔Execution stage started
+159ms 	║║Comparison (time) 30200684 is_between (datetime) 1591647900000 .. (time) 82800000 = false (7ms)
+161ms 	║║Condition #2 evaluated false (41ms)
+162ms 	║║Condition group #1 evaluated false (state did not change) (43ms)
+172ms 	║║Condition #9 evaluated false (7ms)
+173ms 	║║Condition group #8 evaluated false (state did not change) (8ms)
+176ms 	║╚Execution stage complete. (60ms)
+177ms 	╚Event processed successfully (177ms)
6/8/2020, 8:23:17 AM +130ms
+2ms 	╔Received event [Motion Sensor Bedroom].motion = inactive with a delay of 78ms
+122ms 	║RunTime Analysis CS > 18ms > PS > 36ms > PE > 68ms > CE
+125ms 	║Runtime (39201 bytes) successfully initialized in 36ms (v0.3.110.20191009) (121ms)
+126ms 	║╔Execution stage started
+174ms 	║║Comparison (time) 30197262 is_between (datetime) 1591647900000 .. (time) 82800000 = false (7ms)
+176ms 	║║Condition #2 evaluated false (44ms)
+177ms 	║║Condition group #1 evaluated false (state did not change) (46ms)
+186ms 	║║Condition #9 evaluated false (6ms)
+187ms 	║║Condition group #8 evaluated false (state did not change) (7ms)
+190ms 	║╚Execution stage complete. (65ms)
+191ms 	╚Event processed successfully (191ms)
6/8/2020, 8:23:01 AM +522ms
+2ms 	╔Received event [Motion Sensor Bedroom].motion = active with a delay of 67ms
+120ms 	║RunTime Analysis CS > 15ms > PS > 33ms > PE > 72ms > CE
+123ms 	║Runtime (39199 bytes) successfully initialized in 33ms (v0.3.110.20191009) (120ms)
+123ms 	║╔Execution stage started
+165ms 	║║Comparison (time) 30181650 is_between (datetime) 1591647900000 .. (time) 82800000 = false (7ms)
+167ms 	║║Condition #2 evaluated false (39ms)
+168ms 	║║Condition group #1 evaluated false (state did not change) (40ms)
+176ms 	║║Condition #9 evaluated false (6ms)
+177ms 	║║Condition group #8 evaluated false (state did not change) (7ms)
+179ms 	║╚Execution stage complete. (56ms)
+180ms 	╚Event processed successfully (180ms)
6/8/2020, 8:23:01 AM +15ms
+1ms 	╔Received event [Motion Sensor Bedroom 2].motion = active with a delay of 72ms
+123ms 	║RunTime Analysis CS > 21ms > PS > 35ms > PE > 66ms > CE
+125ms 	║Runtime (39203 bytes) successfully initialized in 35ms (v0.3.110.20191009) (123ms)
+126ms 	║╔Execution stage started
+170ms 	║║Comparison (time) 30181146 is_between (datetime) 1591647900000 .. (time) 82800000 = false (7ms)
+172ms 	║║Condition #2 evaluated false (41ms)
+173ms 	║║Condition group #1 evaluated false (state did not change) (42ms)
+180ms 	║║Comparison (enum) active changes_to (string) inactive = false (0ms)
+181ms 	║║Condition #9 evaluated false (5ms)
+183ms 	║║Condition group #8 evaluated false (state did not change) (7ms)
+185ms 	║╚Execution stage complete. (59ms)
+187ms 	╚Event processed successfully (186ms)
6/8/2020, 8:16:30 AM +171ms
+0ms 	╔Received event [Home].time = 1591600591643 with a delay of -1473ms
+166ms 	║RunTime Analysis CS > 45ms > PS > 54ms > PE > 67ms > CE
+168ms 	║Runtime (39192 bytes) successfully initialized in 54ms (v0.3.110.20191009) (167ms)
+170ms 	║╔Execution stage started
+171ms 	║╚Execution stage complete. (2ms)
+172ms 	╚Event processed successfully (172ms)
6/8/2020, 8:11:32 AM +356ms
+1ms 	╔Received event [Motion Sensor Bedroom].motion = inactive with a delay of 54ms
+100ms 	║RunTime Analysis CS > 15ms > PS > 25ms > PE > 60ms > CE
+102ms 	║Runtime (39198 bytes) successfully initialized in 25ms (v0.3.110.20191009) (101ms)
+103ms 	║╔Execution stage started
+142ms 	║║Comparison (time) 29492464 is_between (datetime) 1591647900000 .. (time) 82800000 = false (6ms)
+144ms 	║║Condition #2 evaluated false (36ms)
+145ms 	║║Condition group #1 evaluated false (state did not change) (38ms)
+153ms 	║║Cancelling condition #9's schedules...
+154ms 	║║Condition #9 evaluated false (6ms)
+155ms 	║║Cancelling condition #8's schedules...
+155ms 	║║Condition group #8 evaluated false (state changed) (8ms)
+158ms 	║╚Execution stage complete. (54ms)
+159ms 	╚Event processed successfully (159ms)
6/8/2020, 8:11:31 AM +442ms
+1ms 	╔Received event [Motion Sensor Bedroom 2].motion = inactive with a delay of 61ms
+122ms 	║RunTime Analysis CS > 18ms > PS > 29ms > PE > 75ms > CE
+124ms 	║Runtime (39203 bytes) successfully initialized in 29ms (v0.3.110.20191009) (122ms)
+125ms 	║╔Execution stage started
+172ms 	║║Comparison (time) 29491572 is_between (datetime) 1591647900000 .. (time) 82800000 = false (10ms)
+174ms 	║║Condition #2 evaluated false (43ms)
+175ms 	║║Condition group #1 evaluated false (state did not change) (45ms)
+183ms 	║║Comparison (enum) inactive changes_to (string) inactive = true (1ms)
+185ms 	║║Cancelling condition #9's schedules...
+187ms 	║║Condition #9 evaluated true (7ms)
+188ms 	║║Cancelling condition #8's schedules...
+189ms 	║║Condition group #8 evaluated true (state changed) (10ms)
+192ms 	║║Cancelling statement #10's schedules...
+198ms 	║║Executed virtual command [Hue color lamp 1, Hue color lamp 2].wait (1ms)
+200ms 	║║Requesting a wake up for Mon, Jun 8 2020 @ 8:16:31 AM BST (in 300.0s)
+206ms 	║╚Execution stage complete. (81ms)
+208ms 	║Setting up scheduled job for Mon, Jun 8 2020 @ 8:16:31 AM BST (in 299.994s)
+219ms 	╚Event processed successfully (219ms)
6/8/2020, 8:11:06 AM +240ms
+1ms 	╔Received event [Motion Sensor Bedroom].motion = active with a delay of 66ms
+108ms 	║RunTime Analysis CS > 21ms > PS > 35ms > PE > 51ms > CE
+110ms 	║Runtime (39199 bytes) successfully initialized in 35ms (v0.3.110.20191009) (108ms)
+111ms 	║╔Execution stage started
+151ms 	║║Comparison (time) 29466356 is_between (datetime) 1591647900000 .. (time) 82800000 = false (6ms)
+152ms 	║║Condition #2 evaluated false (37ms)
+153ms 	║║Condition group #1 evaluated false (state did not change) (38ms)
+162ms 	║║Condition #9 evaluated false (6ms)
+163ms 	║║Condition group #8 evaluated false (state did not change) (7ms)
+165ms 	║╚Execution stage complete. (54ms)
+166ms 	╚Event processed successfully (166ms)
6/8/2020, 8:10:03 AM +359ms
+1ms 	╔Received event [Motion Sensor Bedroom 2].motion = active with a delay of 67ms
+102ms 	║RunTime Analysis CS > 20ms > PS > 32ms > PE > 50ms > CE
+104ms 	║Runtime (39198 bytes) successfully initialized in 32ms (v0.3.110.20191009) (102ms)
+105ms 	║╔Execution stage started
+148ms 	║║Comparison (time) 29403469 is_between (datetime) 1591647900000 .. (time) 82800000 = false (6ms)
+150ms 	║║Condition #2 evaluated false (41ms)
+151ms 	║║Condition group #1 evaluated false (state did not change) (42ms)
+157ms 	║║Comparison (enum) active changes_to (string) inactive = false (0ms)
+158ms 	║║Cancelling condition #9's schedules...
+159ms 	║║Condition #9 evaluated false (5ms)
+160ms 	║║Cancelling condition #8's schedules...
+161ms 	║║Condition group #8 evaluated false (state changed) (8ms)
+163ms 	║╚Execution stage complete. (58ms)
+164ms 	╚Event processed successfully (164ms)
6/8/2020, 8:09:56 AM +562ms
+1ms 	╔Received event [Motion Sensor Bedroom 2].motion = inactive with a delay of 62ms
+100ms 	║RunTime Analysis CS > 18ms > PS > 31ms > PE > 51ms > CE
+103ms 	║Runtime (39203 bytes) successfully initialized in 31ms (v0.3.110.20191009) (101ms)
+104ms 	║╔Execution stage started
+142ms 	║║Comparison (time) 29396670 is_between (datetime) 1591647900000 .. (time) 82800000 = false (6ms)
+143ms 	║║Condition #2 evaluated false (35ms)
+144ms 	║║Condition group #1 evaluated false (state did not change) (36ms)
+150ms 	║║Comparison (enum) inactive changes_to (string) inactive = true (1ms)
+151ms 	║║Cancelling condition #9's schedules...
+152ms 	║║Condition #9 evaluated true (5ms)
+153ms 	║║Cancelling condition #8's schedules...
+154ms 	║║Condition group #8 evaluated true (state changed) (7ms)
+156ms 	║║Cancelling statement #10's schedules...
+161ms 	║║Executed virtual command [Hue color lamp 1, Hue color lamp 2].wait (0ms)
+163ms 	║║Requesting a wake up for Mon, Jun 8 2020 @ 8:14:56 AM BST (in 300.0s)
+167ms 	║╚Execution stage complete. (64ms)
+168ms 	║Setting up scheduled job for Mon, Jun 8 2020 @ 8:14:56 AM BST (in 299.995s)
+180ms 	╚Event processed successfully (180ms)
6/8/2020, 8:09:08 AM +968ms
+1ms 	╔Received event [Motion Sensor Bedroom 2].motion = active with a delay of 67ms
+211ms 	║RunTime Analysis CS > 21ms > PS > 121ms > PE > 70ms > CE
+214ms 	║Runtime (39200 bytes) successfully initialized in 121ms (v0.3.110.20191009) (211ms)
+215ms 	║╔Execution stage started
+260ms 	║║Comparison (time) 29349188 is_between (datetime) 1591647900000 .. (time) 82800000 = false (7ms)
+262ms 	║║Condition #2 evaluated false (42ms)
+264ms 	║║Condition group #1 evaluated false (state did not change) (43ms)
+271ms 	║║Comparison (enum) active changes_to (string) inactive = false (1ms)
+274ms 	║║Cancelling condition #9's schedules...
+276ms 	║║Condition #9 evaluated false (8ms)
+277ms 	║║Cancelling condition #8's schedules...
+279ms 	║║Condition group #8 evaluated false (state changed) (12ms)
+282ms 	║╚Execution stage complete. (67ms)
+284ms 	╚Event processed successfully (283ms)
6/8/2020, 8:08:47 AM +435ms
+1ms 	╔Received event [Motion Sensor Bedroom 2].motion = inactive with a delay of 68ms
+104ms 	║RunTime Analysis CS > 19ms > PS > 32ms > PE > 52ms > CE
+106ms 	║Runtime (39203 bytes) successfully initialized in 32ms (v0.3.110.20191009) (104ms)
+107ms 	║╔Execution stage started
+150ms 	║║Comparison (time) 29327547 is_between (datetime) 1591647900000 .. (time) 82800000 = false (7ms)
+152ms 	║║Condition #2 evaluated false (40ms)
+153ms 	║║Condition group #1 evaluated false (state did not change) (42ms)
+159ms 	║║Comparison (enum) inactive changes_to (string) inactive = true (1ms)
+160ms 	║║Cancelling condition #9's schedules...
+161ms 	║║Condition #9 evaluated true (5ms)
+162ms 	║║Cancelling condition #8's schedules...
+163ms 	║║Condition group #8 evaluated true (state changed) (8ms)
+165ms 	║║Cancelling statement #10's schedules...
+170ms 	║║Executed virtual command [Hue color lamp 1, Hue color lamp 2].wait (0ms)
+172ms 	║║Requesting a wake up for Mon, Jun 8 2020 @ 8:13:47 AM BST (in 300.0s)
+176ms 	║╚Execution stage complete. (69ms)
+177ms 	║Setting up scheduled job for Mon, Jun 8 2020 @ 8:13:47 AM BST (in 299.995s)
+187ms 	╚Event processed successfully (187ms)
6/8/2020, 8:08:37 AM +399ms
+1ms 	╔Received event [Motion Sensor Bedroom 2].motion = active with a delay of 62ms
+97ms 	║RunTime Analysis CS > 19ms > PS > 31ms > PE > 48ms > CE
+99ms 	║Runtime (39197 bytes) successfully initialized in 31ms (v0.3.110.20191009) (98ms)
+100ms 	║╔Execution stage started
+139ms 	║║Comparison (time) 29317504 is_between (datetime) 1591647900000 .. (time) 82800000 = false (6ms)
+141ms 	║║Condition #2 evaluated false (37ms)
+142ms 	║║Condition group #1 evaluated false (state did not change) (38ms)
+147ms 	║║Comparison (enum) active changes_to (string) inactive = false (1ms)
+148ms 	║║Cancelling condition #9's schedules...
+149ms 	║║Condition #9 evaluated false (5ms)
+150ms 	║║Cancelling condition #8's schedules...
+151ms 	║║Condition group #8 evaluated false (state changed) (7ms)
+153ms 	║╚Execution stage complete. (53ms)
+154ms 	╚Event processed successfully (154ms)
6/8/2020, 8:08:36 AM +478ms
+1ms 	╔Received event [Motion Sensor Bedroom 2].motion = inactive with a delay of 127ms
+112ms 	║RunTime Analysis CS > 20ms > PS > 32ms > PE > 60ms > CE
+114ms 	║Runtime (39204 bytes) successfully initialized in 32ms (v0.3.110.20191009) (112ms)
+115ms 	║╔Execution stage started
+155ms 	║║Comparison (time) 29316598 is_between (datetime) 1591647900000 .. (time) 82800000 = false (7ms)
+157ms 	║║Condition #2 evaluated false (38ms)
+158ms 	║║Condition group #1 evaluated false (state did not change) (39ms)
+164ms 	║║Comparison (enum) inactive changes_to (string) inactive = true (1ms)
+165ms 	║║Cancelling condition #9's schedules...
+166ms 	║║Condition #9 evaluated true (5ms)
+167ms 	║║Cancelling condition #8's schedules...
+168ms 	║║Condition group #8 evaluated true (state changed) (8ms)
+171ms 	║║Cancelling statement #10's schedules...
+176ms 	║║Executed virtual command [Hue color lamp 1, Hue color lamp 2].wait (1ms)
+177ms 	║║Requesting a wake up for Mon, Jun 8 2020 @ 8:13:36 AM BST (in 300.0s)
+182ms 	║╚Execution stage complete. (67ms)
+184ms 	║Setting up scheduled job for Mon, Jun 8 2020 @ 8:13:36 AM BST (in 299.995s)
+195ms 	╚Event processed successfully (195ms)
6/8/2020, 8:08:25 AM +450ms
+1ms 	╔Received event [Motion Sensor Bedroom 2].motion = active with a delay of 65ms
+103ms 	║RunTime Analysis CS > 21ms > PS > 32ms > PE > 51ms > CE
+106ms 	║Runtime (39198 bytes) successfully initialized in 32ms (v0.3.110.20191009) (105ms)
+107ms 	║╔Execution stage started
+147ms 	║║Comparison (time) 29305561 is_between (datetime) 1591647900000 .. (time) 82800000 = false (6ms)
+148ms 	║║Condition #2 evaluated false (37ms)
+149ms 	║║Condition group #1 evaluated false (state did not change) (38ms)
+154ms 	║║Comparison (enum) active changes_to (string) inactive = false (0ms)
+156ms 	║║Cancelling condition #9's schedules...
+156ms 	║║Condition #9 evaluated false (4ms)
+157ms 	║║Cancelling condition #8's schedules...
+158ms 	║║Condition group #8 evaluated false (state changed) (7ms)
+160ms 	║╚Execution stage complete. (54ms)
+161ms 	╚Event processed successfully (161ms)
6/8/2020, 8:08:18 AM +78ms
+1ms 	╔Received event [Motion Sensor Bedroom 2].motion = inactive with a delay of 66ms
+114ms 	║RunTime Analysis CS > 17ms > PS > 27ms > PE > 70ms > CE
+117ms 	║Runtime (39203 bytes) successfully initialized in 27ms (v0.3.110.20191009) (115ms)
+119ms 	║╔Execution stage started
+164ms 	║║Comparison (time) 29298202 is_between (datetime) 1591647900000 .. (time) 82800000 = false (8ms)
+166ms 	║║Condition #2 evaluated false (42ms)
+167ms 	║║Condition group #1 evaluated false (state did not change) (44ms)
+174ms 	║║Comparison (enum) inactive changes_to (string) inactive = true (1ms)
+176ms 	║║Cancelling condition #9's schedules...
+177ms 	║║Condition #9 evaluated true (6ms)
+178ms 	║║Cancelling condition #8's schedules...
+179ms 	║║Condition group #8 evaluated true (state changed) (9ms)
+182ms 	║║Cancelling statement #10's schedules...
+187ms 	║║Executed virtual command [Hue color lamp 1, Hue color lamp 2].wait (0ms)
+188ms 	║║Requesting a wake up for Mon, Jun 8 2020 @ 8:13:18 AM BST (in 300.0s)
+193ms 	║╚Execution stage complete. (74ms)
+194ms 	║Setting up scheduled job for Mon, Jun 8 2020 @ 8:13:18 AM BST (in 299.995s)
+204ms 	╚Event processed successfully (204ms)
6/8/2020, 8:07:46 AM +930ms
+1ms 	╔Received event [Motion Sensor Bedroom].motion = inactive with a delay of 55ms
+109ms 	║RunTime Analysis CS > 24ms > PS > 32ms > PE > 54ms > CE
+112ms 	║Runtime (39201 bytes) successfully initialized in 32ms (v0.3.110.20191009) (110ms)
+114ms 	║╔Execution stage started
+166ms 	║║Comparison (time) 29267049 is_between (datetime) 1591647900000 .. (time) 82800000 = false (9ms)
+169ms 	║║Condition #2 evaluated false (50ms)
+171ms 	║║Condition group #1 evaluated false (state did not change) (52ms)
+182ms 	║║Condition #9 evaluated false (6ms)
+183ms 	║║Condition group #8 evaluated false (state did not change) (9ms)
+186ms 	║╚Execution stage complete. (72ms)
+187ms 	╚Event processed successfully (187ms)
6/8/2020, 8:07:31 AM +41ms
+1ms 	╔Received event [Motion Sensor Bedroom].motion = active with a delay of 78ms
+124ms 	║RunTime Analysis CS > 20ms > PS > 34ms > PE > 69ms > CE
+126ms 	║Runtime (39199 bytes) successfully initialized in 34ms (v0.3.110.20191009) (124ms)
+128ms 	║╔Execution stage started
+174ms 	║║Comparison (time) 29251175 is_between (datetime) 1591647900000 .. (time) 82800000 = false (7ms)
+176ms 	║║Condition #2 evaluated false (42ms)
+178ms 	║║Condition group #1 evaluated false (state did not change) (45ms)
+187ms 	║║Condition #9 evaluated false (6ms)
+188ms 	║║Condition group #8 evaluated false (state did not change) (7ms)
+191ms 	║╚Execution stage complete. (64ms)
+192ms 	╚Event processed successfully (192ms)
6/8/2020, 8:07:11 AM +404ms
+1ms 	╔Received event [Motion Sensor Bedroom].motion = inactive with a delay of 67ms
+111ms 	║RunTime Analysis CS > 18ms > PS > 35ms > PE > 57ms > CE
+113ms 	║Runtime (39201 bytes) successfully initialized in 35ms (v0.3.110.20191009) (111ms)
+114ms 	║╔Execution stage started
+158ms 	║║Comparison (time) 29231523 is_between (datetime) 1591647900000 .. (time) 82800000 = false (6ms)
+159ms 	║║Condition #2 evaluated false (40ms)
+160ms 	║║Condition group #1 evaluated false (state did not change) (41ms)
+171ms 	║║Condition #9 evaluated false (8ms)
+172ms 	║║Condition group #8 evaluated false (state did not change) (9ms)
+174ms 	║╚Execution stage complete. (60ms)
+175ms 	╚Event processed successfully (175ms)
6/8/2020, 8:06:56 AM +716ms
+1ms 	╔Received event [Motion Sensor Bedroom].motion = active with a delay of 67ms
+109ms 	║RunTime Analysis CS > 19ms > PS > 33ms > PE > 56ms > CE
+111ms 	║Runtime (39199 bytes) successfully initialized in 33ms (v0.3.110.20191009) (109ms)
+112ms 	║╔Execution stage started
+152ms 	║║Comparison (time) 29216833 is_between (datetime) 1591647900000 .. (time) 82800000 = false (6ms)
+154ms 	║║Condition #2 evaluated false (37ms)
+155ms 	║║Condition group #1 evaluated false (state did not change) (38ms)
+163ms 	║║Condition #9 evaluated false (5ms)
+164ms 	║║Condition group #8 evaluated false (state did not change) (7ms)
+166ms 	║╚Execution stage complete. (54ms)
+167ms 	╚Event processed successfully (167ms)
6/8/2020, 8:05:02 AM +383ms
+1ms 	╔Received event [Motion Sensor Bedroom 2].motion = active with a delay of 56ms
+98ms 	║RunTime Analysis CS > 17ms > PS > 25ms > PE > 55ms > CE
+100ms 	║Runtime (39197 bytes) successfully initialized in 25ms (v0.3.110.20191009) (98ms)
+101ms 	║╔Execution stage started
+140ms 	║║Comparison (time) 29102489 is_between (datetime) 1591647900000 .. (time) 82800000 = false (6ms)
+142ms 	║║Condition #2 evaluated false (36ms)
+144ms 	║║Condition group #1 evaluated false (state did not change) (38ms)
+149ms 	║║Comparison (enum) active changes_to (string) inactive = false (0ms)
+151ms 	║║Cancelling condition #9's schedules...
+152ms 	║║Condition #9 evaluated false (6ms)
+153ms 	║║Cancelling condition #8's schedules...
+154ms 	║║Condition group #8 evaluated false (state changed) (8ms)
+156ms 	║╚Execution stage complete. (55ms)
+157ms 	╚Event processed successfully (157ms)
6/8/2020, 8:05:00 AM +312ms
+1ms 	╔Received event [Motion Sensor Bedroom 2].motion = inactive with a delay of 57ms
+100ms 	║RunTime Analysis CS > 18ms > PS > 28ms > PE > 53ms > CE
+103ms 	║Runtime (39203 bytes) successfully initialized in 28ms (v0.3.110.20191009) (100ms)
+104ms 	║╔Execution stage started
+148ms 	║║Comparison (time) 29100421 is_between (datetime) 1591647900000 .. (time) 82800000 = false (7ms)
+150ms 	║║Condition #2 evaluated false (41ms)
+151ms 	║║Condition group #1 evaluated false (state did not change) (43ms)
+158ms 	║║Comparison (enum) inactive changes_to (string) inactive = true (1ms)
+160ms 	║║Cancelling condition #9's schedules...
+161ms 	║║Condition #9 evaluated true (7ms)
+162ms 	║║Cancelling condition #8's schedules...
+164ms 	║║Condition group #8 evaluated true (state changed) (9ms)
+166ms 	║║Cancelling statement #10's schedules...
+172ms 	║║Executed virtual command [Hue color lamp 1, Hue color lamp 2].wait (1ms)
+173ms 	║║Requesting a wake up for Mon, Jun 8 2020 @ 8:10:00 AM BST (in 300.0s)
+178ms 	║╚Execution stage complete. (74ms)
+180ms 	║Setting up scheduled job for Mon, Jun 8 2020 @ 8:10:00 AM BST (in 299.995s)
+190ms 	╚Event processed successfully (190ms)
6/8/2020, 8:04:39 AM +831ms
+2ms 	╔Received event [Motion Sensor Bedroom 2].motion = active with a delay of 71ms
+136ms 	║RunTime Analysis CS > 21ms > PS > 34ms > PE > 81ms > CE
+139ms 	║Runtime (39198 bytes) successfully initialized in 34ms (v0.3.110.20191009) (136ms)
+140ms 	║╔Execution stage started
+190ms 	║║Comparison (time) 29079977 is_between (datetime) 1591647900000 .. (time) 82800000 = false (8ms)
+192ms 	║║Condition #2 evaluated false (46ms)
+194ms 	║║Condition group #1 evaluated false (state did not change) (47ms)
+201ms 	║║Comparison (enum) active changes_to (string) inactive = false (1ms)
+203ms 	║║Cancelling condition #9's schedules...
+204ms 	║║Condition #9 evaluated false (7ms)
+206ms 	║║Cancelling condition #8's schedules...
+207ms 	║║Condition group #8 evaluated false (state changed) (10ms)
+211ms 	║╚Execution stage complete. (71ms)
+213ms 	╚Event processed successfully (213ms)
6/8/2020, 8:04:37 AM +968ms
+1ms 	╔Received event [Motion Sensor Bedroom 2].motion = inactive with a delay of 74ms
+154ms 	║RunTime Analysis CS > 21ms > PS > 31ms > PE > 103ms > CE
+157ms 	║Runtime (39204 bytes) successfully initialized in 31ms (v0.3.110.20191009) (155ms)
+158ms 	║╔Execution stage started
+214ms 	║║Comparison (time) 29078133 is_between (datetime) 1591647900000 .. (time) 82800000 = false (9ms)
+217ms 	║║Condition #2 evaluated false (51ms)
+218ms 	║║Condition group #1 evaluated false (state did not change) (53ms)
+227ms 	║║Comparison (enum) inactive changes_to (string) inactive = true (1ms)
+229ms 	║║Cancelling condition #9's schedules...
+230ms 	║║Condition #9 evaluated true (8ms)
+232ms 	║║Cancelling condition #8's schedules...
+233ms 	║║Condition group #8 evaluated true (state changed) (11ms)
+237ms 	║║Cancelling statement #10's schedules...
+244ms 	║║Executed virtual command [Hue color lamp 1, Hue color lamp 2].wait (1ms)
+246ms 	║║Requesting a wake up for Mon, Jun 8 2020 @ 8:09:38 AM BST (in 300.0s)
+255ms 	║╚Execution stage complete. (97ms)
+258ms 	║Setting up scheduled job for Mon, Jun 8 2020 @ 8:09:38 AM BST (in 299.991s)
+271ms 	╚Event processed successfully (270ms)
6/8/2020, 8:03:36 AM +649ms
+1ms 	╔Received event [Motion Sensor Bedroom].motion = inactive with a delay of 72ms
+131ms 	║RunTime Analysis CS > 16ms > PS > 33ms > PE > 81ms > CE
+133ms 	║Runtime (39201 bytes) successfully initialized in 33ms (v0.3.110.20191009) (131ms)
+134ms 	║╔Execution stage started
+183ms 	║║Comparison (time) 29016789 is_between (datetime) 1591647900000 .. (time) 82800000 = false (7ms)
+185ms 	║║Condition #2 evaluated false (45ms)
+186ms 	║║Condition group #1 evaluated false (state did not change) (47ms)`

#2

On your second IF block, I would use a Time condition like before, although worded slightly differently here:

IF Time is NOT between (sunrise -120min) and 11 PM

(that time is intentionally inverted, and will be true from 11pm thru sunrise-2hr)


Note: I edited your post so your log is a bit easier to read.


#3

The logs seem to be showing the time restrictions working fine and most of the five minute waits being cancelled by more motion. Only at the end is there a fade, which initially sets the level to 1 and then to 0 two minutes later.

What I do find interesting is that you turn the lights on when one motion sensor goes active and turn them off with another one.


#4

thx for the edit, i will give that a try and see if it resolves the issue.


#5

the idea behind the two motion sensors is our bedroom is in a loft conversion, motion sensor 1 is positioned at the top of the stairs and triggers when someone either starts to climb the stairs or moves to the area at the bottom of the bed. sensor 2 is up high in the room so can see us if sitting on the bed. I was using just sensor 1 for the longest time and just had the lights turn off after no motion for 30mins but with the windows open lots of beasties would fly in, another nag from the misses, so with the second sensor ive reduced the inactivity time and she is happy that the lights go out fairly quickly after no one is in the room. hope that ramble makes sense.


#6

It does, thank you. Always on the look out for ideas.


#7

OK so if I could trouble someone again,
lights have come on randomly again tonight, I checked smartthings groove and it is definitely only this piston that is triggering the lights, time stamp match when the lights coming on and no other activities logged. Below is the most recent full log from the piston. I have implemented WCmore suggestions of adding the time constraints to the second if.

Logs

08/06/2020, 23:40:36 +119ms
+1ms ╔Received event [Home].time = 1591656037285 with a delay of -1167ms
+133ms ║RunTime Analysis CS > 28ms > PS > 42ms > PE > 64ms > CE
+136ms ║Runtime (39796 bytes) successfully initialized in 42ms (v0.3.110.20191009) (134ms)
+137ms ║╔Execution stage started
+282ms ║║Executed physical command [Hue color lamp 1].setLevel([0]) (140ms)
+284ms ║║Fast executing schedules, waiting for 908ms to sync up
+1211ms ║║Executed physical command [Hue color lamp 2].setLevel([0]) (15ms)
+1213ms ║║Fast executing schedules, waiting for 52ms to sync up
+1280ms ║║Executed physical command [Hue color lamp 1].setLevel([0]) (11ms)
+1282ms ║║Fast executing schedules, waiting for 9ms to sync up
+1315ms ║║Executed physical command [Hue color lamp 2].setLevel([0]) (19ms)
+1334ms ║╚Execution stage complete. (1197ms)
+1336ms ╚Event processed successfully (1335ms)
08/06/2020, 23:40:06 +145ms
+0ms ╔Received event [Home].time = 1591656007284 with a delay of -1139ms
+220ms ║RunTime Analysis CS > 74ms > PS > 88ms > PE > 57ms > CE
+222ms ║Runtime (39796 bytes) successfully initialized in 88ms (v0.3.110.20191009) (221ms)
+223ms ║╔Execution stage started
+243ms ║║Executed physical command [Hue color lamp 1].setLevel([1]) (15ms)
+245ms ║║Fast executing schedules, waiting for 922ms to sync up
+1185ms ║║Executed physical command [Hue color lamp 2].setLevel([1]) (13ms)
+1187ms ║╚Execution stage complete. (964ms)
+1189ms ║Setting up scheduled job for Mon, Jun 8 2020 @ 11:40:37 PM BST (in 29.952s), with 4 more jobs pending
+1198ms ╚Event processed successfully (1198ms)
08/06/2020, 23:39:36 +80ms
+0ms ╔Received event [Home].time = 1591655977284 with a delay of -1205ms
+153ms ║RunTime Analysis CS > 28ms > PS > 56ms > PE > 70ms > CE
+157ms ║Runtime (39796 bytes) successfully initialized in 56ms (v0.3.110.20191009) (155ms)
+158ms ║╔Execution stage started
+183ms ║║Executed physical command [Hue color lamp 1].setLevel([2]) (17ms)
+187ms ║║Fast executing schedules, waiting for 1044ms to sync up
+1250ms ║║Executed physical command [Hue color lamp 2].setLevel([2]) (15ms)
+1253ms ║╚Execution stage complete. (1095ms)
+1256ms ║Setting up scheduled job for Mon, Jun 8 2020 @ 11:40:07 PM BST (in 29.948s), with 6 more jobs pending
+1264ms ╚Event processed successfully (1264ms)


#8

Please post an image of the piston as seen at the time of the log above so we know what we are looking at.


#9

Again the logs seem to be showing the fade down to 0 over two minutes. You can see them doing a setLevel(2), followed by a setLevel(1) and then setLevel(0) at thirty second intervals.

I have no experience with dimmers, though I have seen that different handlers and lights can behave differently. So I have to defer to others.

To me it seems like the lights have been turned off while at level ‘X’ and the piston is then fading from ‘X’ to ‘0’ which results in the lights being turned on at level ‘X’ first. Is that plausible behaviour?

Maybe just testing if the lights are on before fading them to 0 will help?


#10


apologies, snapshot of the correct piston now.


#11

Thx, the fade is a recent change and i was having the same issues before but i will revert to just on / off so I can post logs.


#13

Thank you for the partial log. (it did not show the original event, only the continuing fade)


For what it’s worth, instead of an instant trigger followed by a WAIT, I usually code the WAIT inside the trigger… For example, your second IF block can be something like:

IF Sensor 4's motion STAYS inactive for 5 minutes
   and 
   Time is not between $sunset -2hr and 11PM
   Then
      IF Any of RBG1 and RGB2's switch is on
      Then
         Turn off command goes here
      END IF
END IF

Please note that I used “Turn off” instead of “Fade” in this example, (for consistency), but feel free to experiment.

Also, worth considering if you want to program action for an empty room during those evening hours…


#14

WCmore thanks allot for the advice its really appreciated.
What is the reasoning for coding within the trigger rather than action? is it best practice to do this for all my timed events?
piston now looks like this

have cleared the logs and also set up the trace. fingers crossed it has resolved it.

last night was weird. the piston triggered both the lights on at around 2340hrs although one came on red (which is my night time setting piston and had also been triggered before this 2340hrs so that was fine.) and the other came on at a soft white like in my evening piston. I turned them off within the ST app but they came back on again instantly. this happened 3 times in a row before they stayed off.


#15

Your last piston looks real good. One small thing to consider:

If someone walks past the motion sensor at 10:59pm, the lights will come on… but 5 minutes later at 11:04, the lights will not turn off.

You can resolve this by increasing the time a bit on line 33 to 11:06.
(or you can reduce the time on line 18 to 10:54)


#16

grand, thx will implement now.


#17

So after 4 or so nights it looks like the problem has been resolved. Big thanks to @WCmore and @orangebucket for your help👍


#18

Glad to be able to help. We gotta keep the Wife Acceptance Factor in check, LOL

Thanks for coming back to update us.

Perhaps you can solution one of our posts above as the solution?