"Cannot invoke method multiply() on null object" error

I have the following rule that turns on the office lights 1 hour before sunset and ramps them up over the 1 hour. My wife likes her lights (lights 1 & 2) to only reach 50% brightness, whereas I like mine (lights 3 & 4) full.

When RM tries to evaluate the if Office Lights is on it throws this error in the logs and it doesn't ramp the lights:

app:65 2020-12-09 04:00:27.429 pm errorjava.lang.NullPointerException: Cannot invoke method multiply() on null object on line 5886 (appButtonHandler)
app:65 2020-12-09 04:00:27.392 pm infoAction:         Fade Office Light 3, Office Light 4 up to 100 over  minutes with 10.0 seconds interval
app:65 2020-12-09 04:00:27.387 pm infoAction:     IF (Office Lights(on) is on(T) [TRUE]) THEN
app:65 2020-12-09 04:00:27.372 pm infoAction: IF (NOT Mode is Away(T) [TRUE]) THEN

I was able to replicate this error by running the rule again manually with the Run Action button.

If the lights are off to begin with the ELSE part runs, there is no error, and they ramp as expected.

How do I debug:

error java.lang.NullPointerException: Cannot invoke method multiply() on null object on line 5886 (appButtonHandler)

Where is line 5886? :sweat_smile:

Your two FADES in the IF section are missing the number of minutes to fade over.

1 Like

Oh yikes, good eye--thank you! I've updated this and no error now.

1 Like