I'm trying to setup a new motion lighting app and keep getting the following error in my logs:
java.lang.NullPointerException: Cannot get property 'value' on null object on line 1307 (turnOff)
In the motion lighting app I have the following setup:
Motion Sensors:
Kitchen Motion
Lights to turn on:
Button Push (virtual button I setup for activity)
Options for Activate, Disable, and Enable Lights-On
-Nothing set (originally had some virtual switches here to enable/disable but those were removed during troubleshooting)
Options for Additional Sensors, Lights-Off and Off options
-Use Delay per mode = yes (5 modes selected w/ various delay values)
-Button push (different virtual button I setup for inactivity)
My ultimate goal is to use the motion lighting app to fire two virtual buttons. Whenever each virtual buttons are pressed they get processed by Rule Machine with some conditional logic to dynamically switch between scenes when there is/isn't activity in the motion area (with smartthings I maxed out the limit of 250 automatons and am already a fan of hubitat).
Note: the reason I have different virtual buttons is because I want to turn the lights to different levels based on the current mode (not just turn them off.
I'm 99% certain my error is with the Motion Lighting app as when I hit each of the virtual buttons they function exactly as I expect. I only seem to see the error when it tries to push my on/off buttons. Additionally, when selecting the push buttons in the Motion App I am prompted to put in the button number, however if I enter "1" for the button # the "done" button is disabled at the bottom of the page (until I clear out the value and put it back in). I suspect this value isn't getting saved properly on the UI when creating a new motion lighting app.
Also, just updated my hub earlier this evening to version 2.2.4.148. I also removed and re-created the lighting app after doing so and still got the same error. Any help would be appreciated, if all else fails I'm sure there is another way to do this outside of the motion lighting app, this setup just seemed a little easier than creating multiple rules for each mode.
I'm using Advanced Hue Bridge Integration which uses switches for each of the hue scenes (separate from the stock hue app that comes with hubitat).
It works amazingly well but the drawback is it creates a switch for each scene, not dimmers. Additionally, when I tried to do the "Turn on Switches per mode" I could select multiple switches, (one for each scene in the kitchen), but I couldn't figure out how to get it to turn them on individually on a per-mode basis).
I guess I could always try creating scenes in hubitat that turn on the individual switches.
I think I found my work-around. I'm going to setup a virtual switch for my kitchen and tie the ML app to just that.
IF (Kitchen VSW Motion Acivity(off) is on(F) [FALSE]) THEN
Push button 1 on Kitchen VBTN Motion Active Scene
ELSE
Push button 1 on Kitchen VBTN Motion Inactive Active Scene
END-IF
Did you tick the slider at the top to use "settings per mode"? Then select the modes you want to use and the switches in each mode. You will still have a option to select multiple switch per mode, just don't in this case. Go to the next mode and select the next switch.
Did anyone find a solution to this or is it a bug? I have Motion Lighting push a virtual button 1 when lights are turned on and I want to push virtual button 2 when lights turn off, same button controller (I also tested this with two different button controllers, same result). I then setup a button controller and used a private boolean to toggle the button1 action, when lights came on it worked when lights go off I get the error.
The first button push works as expected but when it pushes the button for lights off I get this error:
'java.lang.NullPointerException: Cannot get property 'value' on null object on line 1312 (turnOff)'
According to the Motion Lighting Doc this should work.
Under section 'Select Lights to Turn On' Push button per mode
Select a button you would also like Motion Lighting to push when motion is activated. This will trigger whatever action you have set for the button in Button Controller, Rule Machine® or other apps. Select the modes for which this will be active.
Under the ' Options for Additional Sensors, Lights-Off and Off options' section: Button to Push when turned off
Select any buttons you would like to be automatically pushed when motion becomes inactive.