Cannot cast object 'null' with class 'null' to class 'double'

I just migrated from C7 to C8. All went well, but I have one Rule Machine App that keeps kicking out this error. I have no idea what to make of it. Any thoughts?

org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'null' with class 'null' to class 'double'. Try 'java.lang.Double' instead on line 9052 (method allHandler)

Ron

1 Like

Show the rule...

Please turn on the logging, so we can see where the error originates in the actions.

Here is an entire event. My apologies if there is a better way to present this...

dev:1882023-03-07 01:04:50.730 PMinfoF Zooz 4-in-1: motion set to inactive

app:1522023-03-07 01:04:40.472 PMerrororg.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'null' with class 'null' to class 'double'. Try 'java.lang.Double' instead on line 9052 (method allHandler)

app:1522023-03-07 01:04:40.465 PMinfoAction: Delay per mode: Away: 0:01:00 (cancelable) Day: 0:02:00 (cancelable) Evening: 0:02:00 (cancelable) Late Afternoon: 0:02:00 (cancelable) Sleep: 0:01:00 (cancelable) Wake: 0:02:00 (cancelable)

app:1522023-03-07 01:04:40.449 PMinfoAction: ELSE-IF (K Zooz 4-in-1 motion inactive(T) AND Dimmer level of K Under Cabinet(95) is <= 99(T) AND K Under Cabinet(on) is on(T) AND FR Denon AVR(on) is on(T) [TRUE]) THEN

app:1522023-03-07 01:04:40.332 PMinfoAction: Off: K Main Lights, K Above Cabinet, K Inside Cabinet Display Lights, K Table Chandelier, K Under Cabinet (skipped)

app:1522023-03-07 01:04:40.328 PMinfoAction: Set Active to false (skipped)

app:1522023-03-07 01:04:40.304 PMinfoAction: Delay per mode: Away: 0:01:00 (cancelable) Day: 5:05:05 (cancelable) Evening: 0:03:00 (cancelable) Late Afternoon: 0:05:00 (cancelable) Sleep: 0:03:00 (cancelable) Wake: 0:05:00 (cancelable) (skipped)

app:1522023-03-07 01:04:40.286 PMinfoAction: ELSE-IF (K Zooz 4-in-1 motion inactive(T) AND Dimmer level of K Under Cabinet(95) is <= 99(T) AND K Under Cabinet(on) is on(T) AND FR Denon AVR(on) is off(F) AND Kitchen TV(off) is off(T) [FALSE]) THEN (skipping)

app:1522023-03-07 01:04:40.159 PMinfoAction: END-IF (skipped)

app:1522023-03-07 01:04:40.156 PMinfoAction: Dimmers per mode: K Under Cabinet --> fade: 2 Day: 95 Evening: 50 Late Afternoon: 95 Sleep: 15 Wake: 95 (skipped)

app:1522023-03-07 01:04:40.143 PMinfoAction: Set Active to true (skipped)

app:1522023-03-07 01:04:40.118 PMinfoAction: IF (Variable Active(true) = false(F) OR K Under Cabinet(on) is off(F) [FALSE]) THEN (skipped)

app:1522023-03-07 01:04:40.031 PMinfoAction: Cancel Delayed Actions (skipped)

app:1522023-03-07 01:04:40.028 PMinfoAction: IF (K Zooz 4-in-1 motion active(F) [FALSE]) THEN (skipping)

app:1522023-03-07 01:04:39.961 PMinfoTriggered: K Zooz 4-in-1 motion changed

app:1522023-03-07 01:04:39.931 PMinfoEvent: K Zooz 4-in-1 motion inactive

dev:1872023-03-07 01:04:39.885 PMinfoK Zooz 4-in-1: motion set to inactive

dev:1882023-03-07 01:04:37.367 PMinfoF Zooz 4-in-1: motion set to active

dev:2052023-03-07 01:04:30.216 PMinfoMBR TV power is 0W

app:1522023-03-07 01:04:13.961 PMinfoAction: END-IF

app:1522023-03-07 01:04:13.958 PMinfoAction: Dim: K Main Lights, K Inside Cabinet Display Lights, K Table Chandelier: 0 --> fade: 3 (skipped)

app:1522023-03-07 01:04:13.955 PMinfoAction: Off: K Above Cabinet (skipped)

app:1522023-03-07 01:04:13.951 PMinfoAction: Dimmers per mode: K Under Cabinet --> fade: 3 Evening: 1 (skipped)

app:1522023-03-07 01:04:13.946 PMinfoAction: Switches per mode: K Main Lights, K Above Cabinet, K Inside Cabinet Display Lights, K Table Chandelier, K Under Cabinet Day: off (skipped)

app:1522023-03-07 01:04:13.941 PMinfoAction: Set Active to false (skipped)

app:1522023-03-07 01:04:13.914 PMinfoAction: Delay per mode: Away: 0:01:00 (cancelable) Day: 0:02:00 (cancelable) Evening: 0:02:00 (cancelable) Late Afternoon: 0:02:00 (cancelable) Sleep: 0:01:00 (cancelable) Wake: 0:02:00 (cancelable) (skipped)

app:1522023-03-07 01:04:13.897 PMinfoAction: ELSE-IF (K Zooz 4-in-1 motion inactive(F) AND Dimmer level of K Under Cabinet(95) is <= 99(T) AND K Under Cabinet(on) is on(T) AND FR Denon AVR(on) is on(T) [FALSE]) THEN (skipped)

app:1522023-03-07 01:04:13.826 PMinfoAction: Off: K Main Lights, K Above Cabinet, K Inside Cabinet Display Lights, K Table Chandelier, K Under Cabinet (skipped)

app:1522023-03-07 01:04:13.823 PMinfoAction: Set Active to false (skipped)

app:1522023-03-07 01:04:13.797 PMinfoAction: Delay per mode: Away: 0:01:00 (cancelable) Day: 5:05:05 (cancelable) Evening: 0:03:00 (cancelable) Late Afternoon: 0:05:00 (cancelable) Sleep: 0:03:00 (cancelable) Wake: 0:05:00 (cancelable) (skipped)

app:1522023-03-07 01:04:13.778 PMinfoAction: ELSE-IF (K Zooz 4-in-1 motion inactive(F) AND Dimmer level of K Under Cabinet(95) is <= 99(T) AND K Under Cabinet(on) is on(T) AND FR Denon AVR(on) is off(F) AND Kitchen TV(off) is off(T) [FALSE]) THEN (skipping)

app:1522023-03-07 01:04:13.588 PMinfoAction: END-IF

app:1522023-03-07 01:04:13.584 PMinfoAction: Dimmers per mode: K Under Cabinet --> fade: 2 Day: 95 Evening: 50 Late Afternoon: 95 Sleep: 15 Wake: 95 (skipped)

app:1522023-03-07 01:04:13.571 PMinfoAction: Set Active to true (skipped)

app:1522023-03-07 01:04:13.546 PMinfoAction: IF (Variable Active(true) = false(F) OR K Under Cabinet(on) is off(F) [FALSE]) THEN (skipping)

app:1522023-03-07 01:04:13.448 PMinfoAction: Cancel Delayed Actions

app:1522023-03-07 01:04:13.445 PMinfoAction: IF (K Zooz 4-in-1 motion active(T) [TRUE]) THEN

app:1522023-03-07 01:04:13.377 PMinfoTriggered: K Zooz 4-in-1 motion changed

app:1522023-03-07 01:04:13.347 PMinfoEvent: K Zooz 4-in-1 motion active

dev:1872023-03-07 01:04:13.296 PMinfoK Zooz 4-in-1: motion set to active

Yeah, that's unreadable. Use a screenshot

Try this: Remove that action, the one just before the error (Delay per mode), and re-enter it (use Insert before). See if that fixes it.

Didn't seem to fix the issue.

OK, I will have to dig into this...

1 Like

Did some experimenting. I totally removed the Delay per Mode line before the error and the error went away. I replaced it and it came back. Then I tried replacing the Delay per Mode with a straight Delay and there were no errors. Then I made the Delay cancelable and still no error. It's currently working with a straight cancelable delay. Hope this helps.

Ron

Thanks. It's clear the bug is with Delay Per Mode.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.