Piston not running when any device in the piston gets orphaned


#1

1) Give a description of the problem
Piston will not run when a device gets orphaned. It will run the first few devices and then stop once it reaches the orphaned device with an error. None of the actions get processed as a result.

2) What is the expected behaviour?
It will continue to run on all devices and actually perform the actions on all devices (minus any orphaned device).

3) What is happening/not happening?
Piston errors out and never gets to the actions.

4) Post a Green Snapshot of the pistonimage

5) Attach logs after turning logging level to Full
6/8/2022, 3:23:20 PM +30ms
+4ms ╔Received event [SmartThingsHub].test = 1654719800027 with a delay of 2ms
+114ms ║Runtime (40066 bytes) successfully initialized in 10ms (v0.3.114.20220203) (104ms)
+117ms ║╔Execution stage started
+6858ms ║║Executed [White Bulb 1].on (7ms)
+6866ms ║║Executed [Keypad 2].on (6ms)
+6873ms ║║Executed [White Bulb 2].on (6ms)
+6875ms ║║An error occurred while executing the event: java.lang.NullPointerException: Cannot invoke method hasCommand() on null object
+6879ms ║╚Execution stage complete. (6762ms)
+6887ms ╚Event processed successfully (6887ms)


#2

just commenting on the structure of your piston…

did you notice you placed an IF block (with no IF) within an IF block?

I’ll let the experts help you with it not running with an orphaned device :slight_smile: