3 outlets can turn on, but not off


#1

I think this is a bug, can’t think of another reason that I would be able to turn the outlets on but not off

In the piston below, the one highlighted in green works on all 3 outlets, the one in red doesn’t do anything on all 3 outlets. I tried both device: turn off and set switch to off. Both result in the same thing and I see this in full logs:

+721ms	║║An error occurred while executing the event: java.lang.NullPointerException: Cannot invoke method hasCommand() on null object


#2

Why is one “turn on” and the other “set to off”? Try “turn off” instead of “set”.


#3

You may want to consider not stacking everything into one IF BLOCK with continuous ELSE IFs. Instead make each of your current ELSE IF as an individual IF BLOCK or TIMER BLOcK by themselves.


#4

or where practical use a switch (case) statement


#5

I put this in the OP but it’s not highlighted:

I tried both device: turn off and set switch to off


#6

I could try independent ifs or switch case but the NPE specifically cites a null object. I think I’ll move rule over to an independent piston and see if I get the same results. Will update here.


#7

Try
Turn Off
Wait 2 seconds
Turn Off
Wait 2 seconds
Turn Off

With TCP set to Never.


#8


I get the same error when it’s in a standalone piston. I think it’s related to a device but the error doesn’t really help. I’m going to now try each device individually and see which one(s) give me the NPE again.


#9

The catalyst is “Switch 2”, it doesn’t like that device for some reason.


#10

My educated guess is the three devices are not using the exact same Device Handler.
I usually only group identical devices in the same line…


If Switch 2 is the odd-ball, why not separate it:

With Switch 3 and Switch 4
    Do Turn off
With Switch 2
    Do Turn off

#11

It certainly doesn’t. The error occurs when the piston is checking that the device has the ‘off’ command and it suggests the device object is null. Which seems rather weird.

What exactly is ‘Switch 2’ and which device handler is it using? Is it different to the others? Is it working when controlled from the mobile apps, particularly the Classic app?


#12

Switch 2, 3, and 4 are all identical; Z-Wave GE Outlets, no custom device handler, natively works with ST.