Night Light Not Working


#1

1) Give a description of the problem
Light turns on and off at various times.

2) What is the expected behavior?
Light turns on after motion and off after 2 min of no activity.

3) What is happening/not happening?
Light turns on sometimes with motion then never turns off until manually turned off.
**4) Post a Green Snapshot of the piston!

5) Attach any logs (From ST IDE and by turning logging level to Full)
3/23/2018, 10:57:45 PM +3ms
+2ms ╔Received event [Rene’s Motion Sensor].motion = inactive with a delay of 87ms
+109ms ║RunTime Analysis CS > 19ms > PS > 68ms > PE > 22ms > CE
+111ms ║Runtime (39069 bytes) successfully initialized in 68ms (v0.3.000.20180224) (109ms)
+112ms ║╔Execution stage started
+121ms ║║Comparison (enum) inactive is (string) active = false (1ms)
+123ms ║║Cancelling condition #6’s schedules…
+124ms ║║Condition #6 evaluated false (5ms)
+124ms ║║Cancelling condition #1’s schedules…
+125ms ║║Condition group #1 evaluated false (state changed) (8ms)
+128ms ║╚Execution stage complete. (16ms)
+129ms ║Setting up scheduled job for Sat, Mar 24 2018 @ 7:29:00 AM EDT (in 30674.868s)
+241ms ╚Event processed successfully (241ms)
3/23/2018, 10:56:41 PM +948ms
+1ms ╔Received event [The Marshall’s].time = 1521860202555 with a delay of -607ms
+111ms ║RunTime Analysis CS > 18ms > PS > 71ms > PE > 21ms > CE
+113ms ║Runtime (39068 bytes) successfully initialized in 71ms (v0.3.000.20180224) (111ms)
+114ms ║╔Execution stage started
+129ms ║║Skipped execution of physical command [Master Bedroom Night Light].off([]) because it would make no change to the device. (2ms)
+130ms ║║Executed [Master Bedroom Night Light].off (4ms)
+133ms ║╚Execution stage complete. (20ms)
+134ms ║Setting up scheduled job for Sat, Mar 24 2018 @ 7:29:00 AM EDT (in 30737.918s)
+145ms ╚Event processed successfully (145ms)


#2

The issue here comes from using a Trigger “changes” with a Wait in the piston.

Basically there are some special rules if you want to put those two things together.

There are several other methods of doing the same thing…take your pick of which one you want to use.

You could:
Add a Never cancel command to the “with” that turns off the light
OR
Change the Trigger to “is inactive” instead of "changes to inactive"
OR
Use the Trigger “stays inactive for 2 minutes” instead of changes
OR (yes, there are still more options…but that’s enough for now)

Essentially what happens is that an event is sent to the piston to tell it that your sensor has changed to Inactive. Then the piston waits for 2 minutes…and then when it executes again after the wait the motion sensor has no longer “changed” to inactive…it IS inactive. Thus “changes” and “waits” need some additional assistance to play well together.

Now, as for the light turning on…well, full logs might help understand what’s going on there. But that code looks fine.


#3

Thank you @Mike1616. That was some very enlightening information. I’m learning a lot each time I build a piston so thanks again for the tutelage.


#4

I think the misunderstanding arises out of the fact that, after the Wait(), the entire piston re-evaluates. If you’re just staring at the tasks, it looks like you Wait() and then you execute the next task. But, at least as far as I’ve been able to understand, that’s not what’s going on behind the curtain. Instead, the Wait() expires, and then the piston is run through again. And, in this case, at that time the sensor has no longer “changed”, but “is”, and so nothing happens.

Somebody who’s got this down better than I should correct me if I’m wrong, please. I don’t want to promulgate any fake news.


#5

Yep. That’s basically what’s going on. Take out the Wait and it works like you would expect…one line at a time…right after each other. But with a Wait in a piston if you look at the full logs you’ll see that the piston actually sets an event to rerun itself at the expiration time of the Wait.


#6

Staring at the logs is how I’ve come to that understanding. It’s comforting to know that they’re not lying! :slight_smile:


#7

It’s still not working correctly.


#8

Still not working correctly.


#9

got it @chickwebb @Mike1616


#10

I added new logs. What am I doing wrong. I tried everything. I took out the wait and it still didn’t work correctly.


#11

Still not working.


#12

Can you please look at this for me when you have some spare time? It’s kicking my butt. I seem to have tried everything and light will turn on and off, on regular basis. You will really save me with the wife factor because she is becoming quite irritated with the light turning on and not off in the middle of the night @Robin


#13

I’m not entirely sure why your current piston example is not working properly… but as you keep changing the image and logs in post 1 it’s hard to tell if they match (I’m fairly sure they don’t as the logs refer to ‘changes’ but snapshot is using ‘is’).

Please don’t revise posts like that as it messes up the flow of the thread… instead post updated versions of pistons and logs further down the thread so the ‘story’ reads properly.

Best logic for motion light is:

IF motion sensor’s motion IS active
THEN
turn on light
ELSE
wait 2 minutes
turn off light


#14

Thanks for explanation of how to update the thread as I am still a newbie and still learning the layout and law of the land. Thank you for your help. @Robin


#15

I had issues using between sunset and sunrise in my pistons. Edit this condition, show advanced settings and try setting subscription method to never. This way the lights won’t be triggered by time of day but only by the motion sensor. (best to set all conditions and triggers manually)

Also a better option would be to set time not between sunrise and sunset. The other way around could give problems after midnight when sunset is after sunrise.


#16

It’s still executes only once and then refuses to turn off.

3/27/2018, 5:42:18 PM +371ms
+1ms ╔Starting piston… (v0.3.104.20180323)
+607ms ║╔Subscribing to devices…
+617ms ║║Subscribing to Rene’s Motion Sensor.motion…
+725ms ║║Subscribing to Master Bedroom Night Light…
+726ms ║╚Finished subscribing (131ms)
+809ms ║Comparison (time) 63739118 is_not_between (time) 1522149840000 … (time) 1522194360000 = false (12ms)
+811ms ║Cancelling statement #10’s schedules…
+827ms ║Requesting time schedule wake up at Tue, Mar 27 2018 @ 7:16:00 PM EDT
+837ms ║Comparison (enum) inactive is (string) active = false (2ms)
+845ms ║Setting up scheduled job for Tue, Mar 27 2018 @ 7:16:00 PM EDT (in 5620.784s)
+878ms ╚Piston successfully started (878ms)
3/27/2018, 5:42:17 PM +743ms
+4ms ╔Starting piston… (v0.3.104.20180323)
+526ms ║╔Subscribing to devices…
+554ms ║║Subscribing to Rene’s Motion Sensor.motion…
+709ms ║║Subscribing to Master Bedroom Night Light…
+710ms ║╚Finished subscribing (202ms)
+791ms ║Comparison (time) 63738473 is_not_between (time) 1522149840000 … (time) 1522194360000 = false (10ms)
+795ms ║Cancelling statement #10’s schedules…
+805ms ║Requesting time schedule wake up at Tue, Mar 27 2018 @ 7:16:00 PM EDT
+819ms ║Comparison (enum) inactive is (string) active = false (3ms)
+833ms ║Setting up scheduled job for Tue, Mar 27 2018 @ 7:16:00 PM EDT (in 5621.424s)
+847ms ╚Piston successfully started (847ms)
3/27/2018, 5:39:59 PM +771ms
+2ms ╔Starting piston… (v0.3.104.20180323)
+273ms ║╔Subscribing to devices…
+286ms ║║Subscribing to Rene’s Motion Sensor.motion…
+367ms ║║Subscribing to Master Bedroom Night Light…
+368ms ║╚Finished subscribing (107ms)
+456ms ║Comparison (time) 63600163 is_not_between (time) 1522149840000 … (time) 1522194360000 = false (16ms)
+474ms ║Cancelling statement #10’s schedules…
+486ms ║Requesting time schedule wake up at Tue, Mar 27 2018 @ 7:16:00 PM EDT
+505ms ║Comparison (enum) inactive is (string) active = false (4ms)
+516ms ║Setting up scheduled job for Tue, Mar 27 2018 @ 7:16:00 PM EDT (in 5759.714s)
+529ms ╚Piston successfully started (529ms)
3/27/2018, 5:18:28 PM +138ms
+15ms ╔Starting piston… (v0.3.104.20180323)
+447ms ║╔Subscribing to devices…
+580ms ║║Subscribing to Rene’s Motion Sensor.motion…
+771ms ║║Subscribing to Master Bedroom Night Light…
+773ms ║╚Finished subscribing (343ms)
+1095ms ║Comparison (time) 62308972 is_not_between (time) 1522149840000 … (time) 1522194360000 = false (28ms)
+1123ms ║Cancelling statement #10’s schedules…
+1141ms ║Requesting time schedule wake up at Tue, Mar 27 2018 @ 7:16:00 PM EDT
+1185ms ║Comparison (enum) inactive is (string) active = false (7ms)
+1274ms ║Setting up scheduled job for Tue, Mar 27 2018 @ 7:16:00 PM EDT (in 7050.59s)
+1287ms ╚Piston successfully started (1277ms)
3/27/2018, 5:14:36 PM +581ms
+1ms ╔Starting piston… (v0.3.104.20180323)
+428ms ║╔Subscribing to devices…
+438ms ║║Subscribing to Rene’s Motion Sensor.motion…
+551ms ║║Subscribing to Master Bedroom Night Light…
+805ms ║╚Finished subscribing (385ms)
+887ms ║Comparison (time) 62077405 is_not_between (time) 1522149840000 … (time) 1522194360000 = false (12ms)
+892ms ║Cancelling statement #10’s schedules…
+902ms ║Requesting time schedule wake up at Tue, Mar 27 2018 @ 7:16:00 PM EDT
+913ms ║Comparison (enum) inactive is (string) active = false (1ms)
+936ms ║Setting up scheduled job for Tue, Mar 27 2018 @ 7:16:00 PM EDT (in 7282.484s)
+1106ms ╚Piston successfully started (1106ms)
3/27/2018, 10:51:45 AM +921ms
+1ms ╔Received event [The Marshall’s].time = 1522162306047 with a delay of -127ms
+190ms ║RunTime Analysis CS > 23ms > PS > 58ms > PE > 110ms > CE
+193ms ║Runtime (39371 bytes) successfully initialized in 58ms (v0.3.104.20180323) (191ms)
+194ms ║╔Execution stage started
+636ms ║║Skipped execution of physical command [Master Bedroom Night Light].off([]) because it would make no change to the device. (3ms)
+637ms ║║Executed [Master Bedroom Night Light].off (5ms)
+639ms ║║An error occurred while executing the event: java.lang.NullPointerException: Cannot invoke method hasCommand() on null object
+641ms ║╚Execution stage complete. (447ms)
+642ms ║Setting up scheduled job for Tue, Mar 27 2018 @ 7:16:00 PM EDT (in 30253.437s)
+649ms ╚Event processed successfully (649ms)
3/27/2018, 10:49:45 AM +467ms
+1ms ╔Received event [Rene’s Motion Sensor].motion = inactive with a delay of 123ms
+141ms ║RunTime Analysis CS > 19ms > PS > 49ms > PE > 73ms > CE
+143ms ║Runtime (39372 bytes) successfully initialized in 49ms (v0.3.104.20180323) (141ms)
+144ms ║╔Execution stage started
+189ms ║║Comparison (time) 38985616 is_not_between (time) 1522149840000 … (time) 1522194360000 = false (9ms)
+190ms ║║Condition #10 evaluated false (41ms)
+192ms ║║Cancelling statement #10’s schedules…
+200ms ║║Requesting time schedule wake up at Tue, Mar 27 2018 @ 7:16:00 PM EDT
+202ms ║║Condition group #2 evaluated false (state did not change) (53ms)
+205ms ║║Cancelling statement #3’s schedules…
+578ms ║║Executed virtual command [Master Bedroom Night Light, null].wait (1ms)
+579ms ║║Requesting a wake up for Tue, Mar 27 2018 @ 10:51:46 AM EDT (in 120.0s)
+584ms ║╚Execution stage complete. (440ms)
+586ms ║Setting up scheduled job for Tue, Mar 27 2018 @ 10:51:46 AM EDT (in 119.995s), with 1 more job pending
+680ms ╚Event processed successfully (679ms)
3/27/2018, 10:48:55 AM +645ms
+1ms ╔Received event [Rene’s Motion Sensor].motion = active with a delay of 110ms
+130ms ║RunTime Analysis CS > 18ms > PS > 44ms > PE > 68ms > CE
+132ms ║Runtime (39370 bytes) successfully initialized in 44ms (v0.3.104.20180323) (130ms)
+133ms ║╔Execution stage started
+174ms ║║Comparison (time) 38935783 is_not_between (time) 1522149840000 … (time) 1522194360000 = false (8ms)
+176ms ║║Condition #10 evaluated false (38ms)
+177ms ║║Cancelling statement #10’s schedules…
+185ms ║║Requesting time schedule wake up at Tue, Mar 27 2018 @ 7:16:00 PM EDT
+187ms ║║Condition group #2 evaluated false (state did not change) (49ms)
+189ms ║║Cancelling statement #3’s schedules…
+481ms ║║Executed virtual command [Master Bedroom Night Light, null].wait (0ms)
+482ms ║║Requesting a wake up for Tue, Mar 27 2018 @ 10:50:56 AM EDT (in 120.0s)
+486ms ║╚Execution stage complete. (354ms)
+488ms ║Setting up scheduled job for Tue, Mar 27 2018 @ 10:50:56 AM EDT (in 119.995s), with 1 more job pending
+496ms ╚Event processed successfully (497ms)
3/27/2018, 7:55:59 AM +639ms
+1ms ╔Received event [The Marshall’s].time = 1522151760140 with a delay of -501ms
+151ms ║RunTime Analysis CS > 19ms > PS > 55ms > PE > 76ms > CE
+153ms ║Runtime (39367 bytes) successfully initialized in 55ms (v0.3.104.20180323) (152ms)
+154ms ║╔Execution stage started
+564ms ║║Skipped execution of physical command [Master Bedroom Night Light].off([]) because it would make no change to the device. (2ms)
+565ms ║║Executed [Master Bedroom Night Light].off (4ms)
+567ms ║║An error occurred while executing the event: java.lang.NullPointerException: Cannot invoke method hasCommand() on null object
+569ms ║╚Execution stage complete. (415ms)
+570ms ║Setting up scheduled job for Tue, Mar 27 2018 @ 7:16:00 PM EDT (in 40799.791s)
+576ms ╚Event processed successfully (576ms)
3/27/2018, 7:53:59 AM +639ms
+0ms ╔Received event [The Marshall’s].time = 1522151640000 with a delay of -362ms
+132ms ║RunTime Analysis CS > 17ms > PS > 43ms > PE > 73ms > CE
+135ms ║Runtime (39366 bytes) successfully initialized in 43ms (v0.3.104.20180323) (134ms)
+136ms ║╔Execution stage started
+183ms ║║Comparison (time) 28439782 is_not_between (time) 1522149840000 … (time) 1522194360000 = false (10ms)
+185ms ║║Cancelling condition #10’s schedules…
+186ms ║║Condition #10 evaluated false (42ms)
+187ms ║║Cancelling statement #10’s schedules…
+197ms ║║Requesting time schedule wake up at Tue, Mar 27 2018 @ 7:16:00 PM EDT
+200ms ║║Condition group #2 evaluated false (state did not change) (58ms)
+202ms ║║Cancelling statement #3’s schedules…
+499ms ║║Executed virtual command [Master Bedroom Night Light, null].wait (0ms)
+501ms ║║Requesting a wake up for Tue, Mar 27 2018 @ 7:56:00 AM EDT (in 120.0s)
+506ms ║╚Execution stage complete. (371ms)
+508ms ║Setting up scheduled job for Tue, Mar 27 2018 @ 7:56:00 AM EDT (in 119.994s), with 1 more job pending
+515ms ╚Event processed successfully (515ms)
3/27/2018, 6:19:42 AM +892ms
+0ms ╔Received event [The Marshall’s].time = 1522145983479 with a delay of -588ms
+152ms ║RunTime Analysis CS > 17ms > PS > 47ms > PE > 89ms > CE
+155ms ║Runtime (39373 bytes) successfully initialized in 47ms (v0.3.104.20180323) (154ms)
+156ms ║╔Execution stage started
+486ms ║║Skipped execution of physical command [Master Bedroom Night Light].off([]) because it would make no change to the device. (3ms)
+487ms ║║Executed [Master Bedroom Night Light].off (5ms)
+488ms ║║An error occurred while executing the event: java.lang.NullPointerException: Cannot invoke method hasCommand() on null object
+490ms ║╚Execution stage complete. (334ms)
+492ms ║Setting up scheduled job for Tue, Mar 27 2018 @ 7:54:00 AM EDT (in 5656.616s)
+500ms ╚Event processed successfully (499ms)
3/27/2018, 6:17:42 AM +894ms
+2ms ╔Received event [Rene’s Motion Sensor].motion = inactive with a delay of 124ms
+137ms ║RunTime Analysis CS > 19ms > PS > 51ms > PE > 67ms > CE
+139ms ║Runtime (39368 bytes) successfully initialized in 51ms (v0.3.104.20180323) (136ms)
+140ms ║╔Execution stage started
+182ms ║║Comparison (time) 22663040 is_not_between (time) 1522149840000 … (time) 1522194360000 = true (8ms)
+183ms ║║Time restriction check passed
+184ms ║║Condition #10 evaluated true (39ms)
+185ms ║║Cancelling statement #10’s schedules…
+193ms ║║Requesting time schedule wake up at Tue, Mar 27 2018 @ 7:54:00 AM EDT
+199ms ║║Comparison (enum) inactive is (string) active = false (1ms)
+200ms ║║Cancelling condition #8’s schedules…
+201ms ║║Condition #8 evaluated false (5ms)
+202ms ║║Cancelling condition #2’s schedules…
+202ms ║║Condition group #2 evaluated false (state changed) (57ms)
+204ms ║║Cancelling statement #3’s schedules…
+584ms ║║Executed virtual command [Master Bedroom Night Light, null].wait (1ms)
+585ms ║║Requesting a wake up for Tue, Mar 27 2018 @ 6:19:43 AM EDT (in 120.0s)
+590ms ║╚Execution stage complete. (449ms)
+591ms ║Setting up scheduled job for Tue, Mar 27 2018 @ 6:19:43 AM EDT (in 119.994s), with 1 more job pending
+602ms ╚Event processed successfully (602ms)
3/27/2018, 6:17:03 AM +669ms
+0ms ╔Received event [Rene’s Motion Sensor].motion = active with a delay of 86ms
+101ms ║RunTime Analysis CS > 13ms > PS > 29ms > PE > 59ms > CE
+103ms ║Runtime (39372 bytes) successfully initialized in 29ms (v0.3.104.20180323) (102ms)
+104ms ║╔Execution stage started
+141ms ║║Comparison (time) 22623778 is_not_between (time) 1522149840000 … (time) 1522194360000 = true (8ms)
+142ms ║║Time restriction check passed
+144ms ║║Condition #10 evaluated true (35ms)
+145ms ║║Cancelling statement #10’s schedules…
+152ms ║║Requesting time schedule wake up at Tue, Mar 27 2018 @ 7:54:00 AM EDT
+158ms ║║Comparison (enum) active is (string) active = true (2ms)
+159ms ║║Cancelling condition #8’s schedules…
+160ms ║║Condition #8 evaluated true (6ms)
+161ms ║║Cancelling condition #2’s schedules…
+162ms ║║Condition group #2 evaluated true (state changed) (53ms)
+164ms ║║Cancelling statement #6’s schedules…
+304ms ║║Executed physical command [Master Bedroom Night Light].setColor([[hex: #87CEFA, hue:56, saturation:92, level:75]]) (6ms)
+305ms ║║Executed [Master Bedroom Night Light].setColor (7ms)
+306ms ║║An error occurred while executing the event: java.lang.NullPointerException: Cannot invoke method hasCommand() on null object
+308ms ║╚Execution stage complete. (205ms)
+310ms ║Setting up scheduled job for Tue, Mar 27 2018 @ 7:54:00 AM EDT (in 5816.022s)
+325ms ╚Event processed successfully (326ms)
3/27/2018, 6:00:41 AM +866ms
+1ms ╔Received event [The Marshall’s].time = 1522144842056 with a delay of -190ms
+158ms ║RunTime Analysis CS > 23ms > PS > 54ms > PE > 81ms > CE
+162ms ║Runtime (39373 bytes) successfully initialized in 54ms (v0.3.104.20180323) (159ms)
+163ms ║╔Execution stage started
+584ms ║║Skipped execution of physical command [Master Bedroom Night Light].off([]) because it would make no change to the device. (2ms)
+585ms ║║Executed [Master Bedroom Night Light].off (4ms)
+587ms ║║An error occurred while executing the event: java.lang.NullPointerException: Cannot invoke method hasCommand() on null object
+589ms ║╚Execution stage complete. (426ms)
+591ms ║Setting up scheduled job for Tue, Mar 27 2018 @ 7:54:00 AM EDT (in 6797.544s)
+597ms ╚Event processed successfully (596ms)
3/27/2018, 5:58:41 AM +572ms
+1ms ╔Received event [Rene’s Motion Sensor].motion = inactive with a delay of 107ms
+122ms ║RunTime Analysis CS > 17ms > PS > 43ms > PE > 63ms > CE
+124ms ║Runtime (39368 bytes) successfully initialized in 43ms (v0.3.104.20180323) (122ms)
+125ms ║╔Execution stage started
+166ms ║║Comparison (time) 21521703 is_not_between (time) 1522149840000 … (time) 1522194360000 = true (8ms)
+167ms ║║Time restriction check passed
+169ms ║║Condition #10 evaluated true (38ms)
+170ms ║║Cancelling statement #10’s schedules…
+178ms ║║Requesting time schedule wake up at Tue, Mar 27 2018 @ 7:54:00 AM EDT
+184ms ║║Comparison (enum) inactive is (string) active = false (2ms)
+185ms ║║Cancelling condition #8’s schedules…
+186ms ║║Condition #8 evaluated false (6ms)
+187ms ║║Cancelling condition #2’s schedules…
+188ms ║║Condition group #2 evaluated false (state changed) (58ms)
+190ms ║║Cancelling statement #3’s schedules…
+482ms ║║Executed virtual command [Master Bedroom Night Light, null].wait (0ms)
+484ms ║║Requesting a wake up for Tue, Mar 27 2018 @ 6:00:42 AM EDT (in 120.0s)
+489ms ║╚Execution stage complete. (364ms)
+491ms ║Setting up scheduled job for Tue, Mar 27 2018 @ 6:00:42 AM EDT (in 119.994s), with 1 more job pending
+500ms ╚Event processed successfully (500ms)
3/27/2018, 5:58:00 AM +579ms
+1ms ╔Received event [Rene’s Motion Sensor].motion = active with a delay of 92ms
+97ms ║RunTime Analysis CS > 13ms > PS > 30ms > PE > 53ms > CE
+99ms ║Runtime (39371 bytes) successfully initialized in 30ms (v0.3.104.20180323) (98ms)
+100ms ║╔Execution stage started
+136ms ║║Comparison (time) 21480684 is_not_between (time) 1522149840000 … (time) 1522194360000 = true (8ms)
+137ms ║║Time restriction check passed
+138ms ║║Condition #10 evaluated true (33ms)
+139ms ║║Cancelling statement #10’s schedules…
+146ms ║║Requesting time schedule wake up at Tue, Mar 27 2018 @ 7:54:00 AM EDT
+152ms ║║Comparison (enum) active is (string) active = true (1ms)
+154ms ║║Cancelling condition #8’s schedules…
+154ms ║║Condition #8 evaluated true (6ms)
+155ms ║║Cancelling condition #2’s schedules…
+156ms ║║Condition group #2 evaluated true (state changed) (51ms)
+158ms ║║Cancelling statement #6’s schedules…
+296ms ║║Executed physical command [Master Bedroom Night Light].setColor([[hex: #87CEFA, hue:56, saturation:92, level:75]]) (5ms)
+297ms ║║Executed [Master Bedroom Night Light].setColor (7ms)
+298ms ║║An error occurred while executing the event: java.lang.NullPointerException: Cannot invoke method hasCommand() on null object
+300ms ║╚Execution stage complete. (200ms)
+302ms ║Setting up scheduled job for Tue, Mar 27 2018 @ 7:54:00 AM EDT (in 6959.12s)
+345ms ╚Event processed successfully (345ms)
3/27/2018, 5:54:33 AM +930ms
+1ms ╔Received event [The Marshall’s].time = 1522144474447 with a delay of -517ms
+167ms ║RunTime Analysis CS > 25ms > PS > 78ms > PE > 63ms > CE
+169ms ║Runtime (39373 bytes) successfully initialized in 78ms (v0.3.104.20180323) (167ms)
+171ms ║╔Execution stage started
+624ms ║║Executed physical command [Master Bedroom Night Light].off() (15ms)
+625ms ║║Executed [Master Bedroom Night Light].off (17ms)
+627ms ║║An error occurred while executing the event: java.lang.NullPointerException: Cannot invoke method hasCommand() on null object
+630ms ║╚Execution stage complete. (460ms)
+633ms ║Setting up scheduled job for Tue, Mar 27 2018 @ 7:54:00 AM EDT (in 7165.438s)
+641ms ╚Event processed successfully (640ms)
3/27/2018, 5:52:34 AM +157ms
+1ms ╔Received event [Rene’s Motion Sensor].motion = inactive with a delay of 83ms
+93ms ║RunTime Analysis CS > 13ms > PS > 29ms > PE > 50ms > CE
+95ms ║Runtime (39366 bytes) successfully initialized in 29ms (v0.3.104.20180323) (93ms)
+96ms ║╔Execution stage started
+131ms ║║Comparison (time) 21154258 is_not_between (time) 1522149840000 … (time) 1522194360000 = true (8ms)
+132ms ║║Time restriction check passed
+134ms ║║Condition #10 evaluated true (32ms)
+135ms ║║Cancelling statement #10’s schedules…
+142ms ║║Requesting time schedule wake up at Tue, Mar 27 2018 @ 7:54:00 AM EDT
+148ms ║║Comparison (enum) inactive is (string) active = false (1ms)
+150ms ║║Cancelling condition #8’s schedules…
+150ms ║║Condition #8 evaluated false (6ms)
+151ms ║║Cancelling condition #2’s schedules…
+152ms ║║Condition group #2 evaluated false (state changed) (51ms)
+154ms ║║Cancelling statement #3’s schedules…
+288ms ║║Executed virtual command [Master Bedroom Night Light, null].wait (0ms)
+290ms ║║Requesting a wake up for Tue, Mar 27 2018 @ 5:54:34 AM EDT (in 120.0s)
+295ms ║╚Execution stage complete. (198ms)
+296ms ║Setting up scheduled job for Tue, Mar 27 2018 @ 5:54:34 AM EDT (in 119.994s), with 1 more job pending
+309ms ╚Event processed successfully (309ms)
3/27/2018, 5:51:50 AM +11ms
+1ms ╔Received event [Rene’s Motion Sensor].motion = active with a delay of 91ms
+95ms ║RunTime Analysis CS > 14ms > PS > 30ms > PE > 51ms > CE
+98ms ║Runtime (39371 bytes) successfully initialized in 30ms (v0.3.104.20180323) (96ms)
+99ms ║╔Execution stage started
+136ms ║║Comparison (time) 21110115 is_not_between (time) 1522149840000 … (time) 1522194360000 = true (8ms)
+137ms ║║Time restriction check passed
+139ms ║║Condition #10 evaluated true (34ms)
+140ms ║║Cancelling statement #10’s schedules…
+147ms ║║Requesting time schedule wake up at Tue, Mar 27 2018 @ 7:54:00 AM EDT
+153ms ║║Comparison (enum) active is (string) active = true (1ms)
+155ms ║║Cancelling condition #8’s schedules…
+155ms ║║Condition #8 evaluated true (6ms)
+156ms ║║Cancelling condition #2’s schedules…
+157ms ║║Condition group #2 evaluated true (state changed) (53ms)
+159ms ║║Cancelling statement #6’s schedules…
+303ms ║║Executed physical command [Master Bedroom Night Light].setColor([[hex: #87CEFA, hue:56, saturation:92, level:75]]) (6ms)
+304ms ║║Executed [Master Bedroom Night Light].setColor (8ms)
+305ms ║║An error occurred while executing the event: java.lang.NullPointerException: Cannot invoke method hasCommand() on null object
+308ms ║╚Execution stage complete. (209ms)
+310ms ║Setting up scheduled job for Tue, Mar 27 2018 @ 5:53:47 AM EDT (in 117.1s), with 1 more job pending
+387ms ╚Event processed successfully (387ms)
3/27/2018, 5:51:46 AM +858ms
+1ms ╔Received event [Rene’s Motion Sensor].motion = inactive with a delay of 125ms
+126ms ║RunTime Analysis CS > 20ms > PS > 53ms > PE > 53ms > CE
+128ms ║Runtime (39368 bytes) successfully initialized in 53ms (v0.3.104.20180323) (126ms)
+129ms ║╔Execution stage started
+167ms ║║Comparison (time) 21106992 is_not_between (time) 1522149840000 … (time) 1522194360000 = true (7ms)
+168ms ║║Time restriction check passed
+169ms ║║Condition #10 evaluated true (35ms)
+170ms ║║Cancelling statement #10’s schedules…
+177ms ║║Requesting time schedule wake up at Tue, Mar 27 2018 @ 7:54:00 AM EDT
+183ms ║║Comparison (enum) inactive is (string) active = false (2ms)
+184ms ║║Cancelling condition #8’s schedules…
+185ms ║║Condition #8 evaluated false (6ms)
+186ms ║║Cancelling condition #2’s schedules…
+187ms ║║Condition group #2 evaluated false (state changed) (52ms)
+189ms ║║Cancelling statement #3’s schedules…
+561ms ║║Executed virtual command [Master Bedroom Night Light, null].wait (0ms)
+562ms ║║Requesting a wake up for Tue, Mar 27 2018 @ 5:53:47 AM EDT (in 120.0s)
+566ms ║╚Execution stage complete. (437ms)
+568ms ║Setting up scheduled job for Tue, Mar 27 2018 @ 5:53:47 AM EDT (in 119.995s), with 1 more job pending
+578ms ╚Event processed successfully (579ms)
3/27/2018, 5:50:15 AM +475ms
+2ms ╔Received event [Rene’s Motion Sensor].motion = active with a delay of 201ms
+122ms ║RunTime Analysis CS > 18ms > PS > 52ms > PE > 51ms > CE
+124ms ║Runtime (39373 bytes) successfully initialized in 52ms (v0.3.104.20180323) (122ms)
+125ms ║╔Execution stage started
+164ms ║║Comparison (time) 21015605 is_not_between (time) 1522149840000 … (time) 1522194360000 = true (7ms)
+164ms ║║Time restriction check passed
+166ms ║║Condition #10 evaluated true (36ms)
+167ms ║║Cancelling statement #10’s schedules…
+174ms ║║Requesting time schedule wake up at Tue, Mar 27 2018 @ 7:54:00 AM EDT
+180ms ║║Comparison (enum) active is (string) active = true (1ms)
+182ms ║║Cancelling condition #8’s schedules…
+182ms ║║Condition #8 evaluated true (6ms)
+183ms ║║Cancelling condition #2’s schedules…
+184ms ║║Condition group #2 evaluated true (state changed) (54ms)
+186ms ║║Cancelling statement #6’s schedules…
+565ms ║║Executed physical command [Master Bedroom Night Light].setColor([[hex: #87CEFA, hue:56, saturation:92, level:75]]) (10ms)
+566ms ║║Executed [Master Bedroom Night Light].setColor (11ms)
+567ms ║║An error occurred while executing the event: java.lang.NullPointerException: Cannot invoke method hasCommand() on null object
+569ms ║╚Execution stage complete. (445ms)
+571ms ║Setting up scheduled job for Tue, Mar 27 2018 @ 7:54:00 AM EDT (in 7423.955s)
+581ms ╚Event processed successfully (580ms)
3/26/2018, 11:23:49 PM +825ms
+1ms ╔Received event [The Marshall’s].time = 1522121030073 with a delay of -248ms
+126ms ║RunTime Analysis CS > 17ms > PS > 47ms > PE > 62ms > CE
+129ms ║Runtime (39373 bytes) successfully initialized in 47ms (v0.3.104.20180323) (127ms)
+131ms ║╔Execution stage started
+464ms ║║Skipped execution of physical command [Master Bedroom Night Light].off([]) because it would make no change to the device. (4ms)
+466ms ║║Executed [Master Bedroom Night Light].off (6ms)
+467ms ║║An error occurred while executing the event: java.lang.NullPointerException: Cannot invoke method hasCommand() on null object
+469ms ║╚Execution stage complete. (339ms)
+471ms ║Setting up scheduled job for Tue, Mar 27 2018 @ 7:55:00 AM EDT (in 30669.705s)
+482ms ╚Event processed successfully (482ms)
3/26/2018, 11:21:49 PM +787ms
+1ms ╔Received event [Rene’s Motion Sensor].motion = inactive with a delay of 81ms
+91ms ║RunTime Analysis CS > 20ms > PS > 30ms > PE > 40ms > CE
+93ms ║Runtime (39366 bytes) successfully initialized in 30ms (v0.3.104.20180323) (91ms)
+94ms ║╔Execution stage started
+126ms ║║Comparison (time) 84109886 is_not_between (time) 1522063500000 … (time) 1522107900000 = true (7ms)
+127ms ║║Time restriction check passed
+129ms ║║Condition #10 evaluated true (30ms)
+130ms ║║Cancelling statement #10’s schedules…
+137ms ║║Requesting time schedule wake up at Tue, Mar 27 2018 @ 7:55:00 AM EDT
+143ms ║║Comparison (enum) inactive is (string) active = false (1ms)
+145ms ║║Cancelling condition #8’s schedules…
+145ms ║║Condition #8 evaluated false (6ms)
+146ms ║║Cancelling condition #2’s schedules…
+147ms ║║Condition group #2 evaluated false (state changed) (49ms)
+149ms ║║Cancelling statement #3’s schedules…
+285ms ║║Executed virtual command [Master Bedroom Night Light, null].wait (1ms)
+286ms ║║Requesting a wake up for Mon, Mar 26 2018 @ 11:23:50 PM EDT (in 120.0s)
+290ms ║╚Execution stage complete. (197ms)
+292ms ║Setting up scheduled job for Mon, Mar 26 2018 @ 11:23:50 PM EDT (in 119.994s), with 1 more job pending
+351ms ╚Event processed successfully (351ms)
3/26/2018, 11:21:17 PM +583ms
+1ms ╔Received event [Rene’s Motion Sensor].motion = active with a delay of 92ms
+95ms ║RunTime Analysis CS > 19ms > PS > 30ms > PE > 45ms > CE
+97ms ║Runtime (39371 bytes) successfully initialized in 30ms (v0.3.104.20180323) (95ms)
+98ms ║╔Execution stage started
+132ms ║║Comparison (time) 84077686 is_not_between (time) 1522063500000 … (time) 1522107900000 = true (9ms)
+134ms ║║Time restriction check passed
+136ms ║║Condition #10 evaluated true (33ms)
+137ms ║║Cancelling statement #10’s schedules…
+145ms ║║Requesting time schedule wake up at Tue, Mar 27 2018 @ 7:55:00 AM EDT
+151ms ║║Comparison (enum) active is (string) active = true (2ms)
+152ms ║║Cancelling condition #8’s schedules…
+153ms ║║Condition #8 evaluated true (6ms)
+154ms ║║Cancelling condition #2’s schedules…
+155ms ║║Condition group #2 evaluated true (state changed) (52ms)
+157ms ║║Cancelling statement #6’s schedules…
+297ms ║║Executed physical command [Master Bedroom Night Light].setColor([[hex: #87CEFA, hue:56, saturation:92, level:75]]) (6ms)
+298ms ║║Executed [Master Bedroom Night Light].setColor (8ms)
+299ms ║║An error occurred while executing the event: java.lang.NullPointerException: Cannot invoke method hasCommand() on null object
+301ms ║╚Execution stage complete. (203ms)
+303ms ║Setting up scheduled job for Tue, Mar 27 2018 @ 7:55:00 AM EDT (in 30822.115s)
+313ms ╚Event processed successfully (313ms)
3/26/2018, 11:12:26 PM +763ms
+1ms ╔Starting piston… (v0.3.104.20180323)
+260ms ║╔Subscribing to devices…
+271ms ║║Subscribing to Rene’s Motion Sensor.motion…
+351ms ║║Subscribing to Master Bedroom Night Light…
+521ms ║╚Finished subscribing (271ms)
+602ms ║Comparison (time) 83547311 is_not_between (time) 1522063500000 … (time) 1522107900000 = true (20ms)
+604ms ║Time restriction check passed
+609ms ║Cancelling statement #10’s schedules…
+625ms ║Requesting time schedule wake up at Tue, Mar 27 2018 @ 7:55:00 AM EDT
+638ms ║Comparison (enum) inactive is (string) active = false (1ms)
+671ms ║Setting up scheduled job for Tue, Mar 27 2018 @ 7:55:00 AM EDT (in 31352.567s)
+685ms ╚Piston successfully started (685ms)
3/26/2018, 10:55:33 PM +903ms
+1ms ╔Received event [The Marshall’s].time = 1522119334394 with a delay of -491ms
+98ms ║RunTime Analysis CS > 20ms > PS > 39ms > PE > 38ms > CE
+100ms ║Runtime (39379 bytes) successfully initialized in 39ms (v0.3.104.20180323) (98ms)
+101ms ║╔Execution stage started
+294ms ║║Executed physical command [Master Bedroom Night Light].off() (9ms)
+295ms ║║Executed [Master Bedroom Night Light].off (11ms)
+297ms ║║An error occurred while executing the event: java.lang.NullPointerException: Cannot invoke method hasCommand() on null object
+299ms ║╚Execution stage complete. (198ms)
+301ms ║Setting up scheduled job for Tue, Mar 27 2018 @ 7:55:00 AM EDT (in 32365.797s)
+310ms ╚Event processed successfully (310ms)
3/26/2018, 10:53:33 PM +840ms
+2ms ╔Received event [Rene’s Motion Sensor].motion = inactive with a delay of 104ms
+109ms ║RunTime Analysis CS > 19ms > PS > 50ms > PE > 40ms > CE
+112ms ║Runtime (39375 bytes) successfully initialized in 50ms (v0.3.104.20180323) (108ms)
+113ms ║╔Execution stage started
+148ms ║║Comparison (time) 82413958 is_not_between (time) 1522063500000 … (time) 1522107900000 = true (8ms)
+149ms ║║Time restriction check passed
+150ms ║║Condition #10 evaluated true (32ms)
+151ms ║║Cancelling statement #10’s schedules…
+159ms ║║Requesting time schedule wake up at Tue, Mar 27 2018 @ 7:55:00 AM EDT
+166ms ║║Comparison (enum) inactive is (string) active = false (1ms)
+167ms ║║Cancelling condition #8’s schedules…
+168ms ║║Condition #8 evaluated false (7ms)
+169ms ║║Cancelling condition #2’s schedules…
+170ms ║║Condition group #2 evaluated false (state changed) (51ms)
+172ms ║║Cancelling statement #3’s schedules…
+552ms ║║Executed virtual command [Master Bedroom Night Light, null].wait (1ms)
+553ms ║║Requesting a wake up for Mon, Mar 26 2018 @ 10:55:34 PM EDT (in 120.0s)
+559ms ║╚Execution stage complete. (447ms)
+561ms ║Setting up scheduled job for Mon, Mar 26 2018 @ 10:55:34 PM EDT (in 119.994s), with 1 more job pending
+571ms ╚Event processed successfully (571ms)
3/26/2018, 10:52:40 PM +114ms
+1ms ╔Received event [Rene’s Motion Sensor].motion = active with a delay of 76ms
+78ms ║RunTime Analysis CS > 13ms > PS > 31ms > PE > 34ms > CE
+80ms ║Runtime (39378 bytes) successfully initialized in 31ms (v0.3.104.20180323) (78ms)
+81ms ║╔Execution stage started
+114ms ║║Comparison (time) 82360201 is_not_between (time) 1522063500000 … (time) 1522107900000 = true (8ms)
+115ms ║║Time restriction check passed
+117ms ║║Condition #10 evaluated true (30ms)
+118ms ║║Cancelling statement #10’s schedules…
+126ms ║║Requesting time schedule wake up at Tue, Mar 27 2018 @ 7:55:00 AM EDT
+133ms ║║Comparison (enum) active is (string) active = true (2ms)
+134ms ║║Cancelling condition #8’s schedules…
+135ms ║║Condition #8 evaluated true (7ms)
+136ms ║║Cancelling condition #2’s schedules…
+137ms ║║Condition group #2 evaluated true (state changed) (51ms)
+139ms ║║Cancelling statement #6’s schedules…
+283ms ║║Executed physical command [Master Bedroom Night Light].setColor([[hex: #87CEFA, hue:56, saturation:92, level:75]]) (5ms)
+284ms ║║Executed [Master Bedroom Night Light].setColor (7ms)
+286ms ║║An error occurred while executing the event: java.lang.NullPointerException: Cannot invoke method hasCommand() on null object
+288ms ║╚Execution stage complete. (207ms)
+290ms ║Setting up scheduled job for Tue, Mar 27 2018 @ 7:55:00 AM EDT (in 32539.596s)
+300ms ╚Event processed successfully (300ms)
3/26/2018, 10:51:06 PM +706ms
+1ms ╔Received event [Rene’s Motion Sensor].motion = inactive with a delay of 99ms
+94ms ║RunTime Analysis CS > 17ms > PS > 46ms > PE > 31ms > CE
+96ms ║Runtime (39373 bytes) successfully initialized in 46ms (v0.3.104.20180323) (94ms)
+97ms ║╔Execution stage started
+130ms ║║Comparison (time) 82266809 is_not_between (time) 1522063500000 … (time) 1522107900000 = true (8ms)
+131ms ║║Time restriction check passed
+132ms ║║Condition #10 evaluated true (30ms)
+133ms ║║Cancelling statement #10’s schedules…
+141ms ║║Requesting time schedule wake up at Tue, Mar 27 2018 @ 7:55:00 AM EDT
+147ms ║║Comparison (enum) inactive is (string) active = false (2ms)
+148ms ║║Cancelling condition #8’s schedules…
+149ms ║║Condition #8 evaluated false (6ms)
+150ms ║║Cancelling condition #2’s schedules…
+150ms ║║Condition group #2 evaluated false (state changed) (48ms)
+153ms ║║Cancelling statement #3’s schedules…
+451ms ║║Executed virtual command [Master Bedroom Night Light, null].wait (0ms)
+452ms ║║Requesting a wake up for Mon, Mar 26 2018 @ 10:53:07 PM EDT (in 120.0s)
+456ms ║╚Execution stage complete. (359ms)
+458ms ║Setting up scheduled job for Mon, Mar 26 2018 @ 10:53:07 PM EDT (in 119.994s), with 1 more job pending
+470ms ╚Event processed successfully (470ms)
3/26/2018, 10:50:09 PM +554ms
+2ms ╔Received event [Rene’s Motion Sensor].motion = active with a delay of 107ms
+109ms ║RunTime Analysis CS > 28ms > PS > 48ms > PE > 32ms > CE
+111ms ║Runtime (39380 bytes) successfully initialized in 48ms (v0.3.104.20180323) (108ms)
+112ms ║╔Execution stage started
+148ms ║║Comparison (time) 82209672 is_not_between (time) 1522063500000 … (time) 1522107900000 = true (8ms)
+149ms ║║Time restriction check passed
+150ms ║║Condition #10 evaluated true (33ms)
+151ms ║║Cancelling statement #10’s schedules…
+160ms ║║Requesting time schedule wake up at Tue, Mar 27 2018 @ 7:55:00 AM EDT
+166ms ║║Comparison (enum) active is (string) active = true (1ms)
+168ms ║║Cancelling condition #8’s schedules…
+169ms ║║Condition #8 evaluated true (7ms)
+170ms ║║Cancelling condition #2’s schedules…
+171ms ║║Condition group #2 evaluated true (state changed) (53ms)
+173ms ║║Cancelling statement #6’s schedules…
+560ms ║║Executed physical command [Master Bedroom Night Light].setColor([[hex: #87CEFA, hue:56, saturation:92, level:75]]) (12ms)
+561ms ║║Executed [Master Bedroom Night Light].setColor (14ms)
+562ms ║║An error occurred while executing the event: java.lang.NullPointerException: Cannot invoke method hasCommand() on null object
+564ms ║╚Execution stage complete. (452ms)
+567ms ║Setting up scheduled job for Tue, Mar 27 2018 @ 7:55:00 AM EDT (in 32689.88s)
+576ms ╚Event processed successfully (576ms)
3/26/2018, 10:25:11 PM +814ms


#17

You’re throwing errors on the device itself… almost like it’s not reporting it’s state properly.

Can you build a piston as follows:

If RGB’s switch is on
THEN
log to console warn = ON
ELSE
log to console warn = OFF

Then toggle the bub in the ST app a few times and post your logs.


#18

Ok. I thought so. I was reading on amazon about people having problems with the Fibaro Plus Motion Sensor. I’ll make the changes and report back.


#19

Motion looks ok… It’s your light that is throwing up the errors.


#20

I toggled it about 5 times but I don’t see it in the logs. And I did it from my favorites in the smartthings app.

3/27/2018, 6:20:16 PM +833ms
+1ms ╔Starting piston… (v0.3.104.20180323)
+376ms ║╔Subscribing to devices…
+383ms ║║Subscribing to Master Bedroom Night Light.switch…
+494ms ║╚Finished subscribing (128ms)
+520ms ║Comparison (enum) off is (string) on = false (1ms)
+531ms ║Comparison (enum) off is_not (string) on = true (3ms)
+678ms ╚Piston successfully started (678ms)