Error editing Motion Lighting

I get an error modifying any of the 4 motion lighting apps I have setup:

Unexpected Error
An unexpected error has occurred trying to load the app. Check Logs for more information.

Error: For input string: "null"

Maybe a fix like in 2.1.6.117 for Rule Machine is needed?

I'm able to edit my motion lighting apps without any issues.

Thanks Ken. What version of firmware do you have on your hub? 2.1.6.118?

Just checked the logs and see this when attempting to edit:

2019-11-04 04:03:09.981 pm [error](http://192.168.1.244/installedapp/configure/82)java.lang.NumberFormatException: For input string: "null" on line 293 (mainPage)

Yes.

Hard to tell without knowing what is on line 293. Maybe @bravenel can give assistance. Have you tried rebooting the hub and trying to edit again?

I will look into this....

Ken,

Yup. Rebooted the hub and it does the same thing.

Thanks for taking a look Bruce. It would be pretty simple to recreate them, but might be better for the community to know the cause.

1 Like

Please show the main page of the Motion Lighting instance that you have the problem with.

Also, it seems that you are using Scenes in this, is that correct? If so, please show me the App Status page of Groups and Scenes (the parent app of Scene).

Motion lighting main page:

The motion lighting was created before any scenes were setup. They are not currently in use. I was about to start creating groups of lights (i.e. 'Kitchen Light') rather than have the motion lighting working controlling each bulb (i.e. "Kitchen 1, Kitchen 2").

Here's the Groups and Scenes status page anyway:

It looks like your Evening Scene is the problem. Please delete that Scene, and see if the problem goes away. Somehow your main list of Scenes became corrupted. Worst case would be to completely remove Groups and Scenes, and start over with that. You can see the null=Evening Scene in the list. That's the source of the error. I've put in a fix for Motion Lighting to prevent that error, for the next release.

Removed Groups and Scenes (just for good measure) since I wanted to start over again and it fixed the Motion Lighting issue. Thank you Bruce!

A little more information...

Earlier I had an issue with Groups and Scenes causing an issue editing Motion Light apps. Removing Groups and Scenes allowed editing again. So I started with a clean install of Groups and Scenes and had issues getting simple groups to work with Motion Light. After awhile I just decided to rebuild the entire thing (not a lot of work).

For testing I completely removed the app Groups and Scenes, removed Motion Lighting Apps, and then went through every device (even if they were not used in the 2 apps) to make sure there wasn't anything related to the apps still listed "in use by". Then to test one group did the following:

Reinstalled Groups and Scenes
Created Group 'Kitchen Light Group'
Selected bulbs 'Kitchen Light 1', 'Kitchen Light2', 'Kitchen Light 3' (which are all Sengled Element Color Plus bulbs)
DONE

Reinstalled Motion Lighting Apps
Created New Motion Lighting App 'Kitchen Motion Light'
Motion Sensor: Kitchen SmartThings Motion Sensor
Lights to turn on: Turn on switches: Kitchen Light Group
DONE

Motion in the kitchen did not turn on the lights even though the motion sensor shows active.
Changed Motion Lighting app 'Kitchen Motion Light' to: Lights to turn on: Turn on switches: from the 'Kitchen Light Group' to the individual lights ('Kitchen Light 1', 'Kitchen Light 2', 'Kitchen Light 3') and it worked. [begin scratching head]

Now for the interesting part... I went back and changed from the individual lights to use the 'Kitchen Light Group' to take a screenshot of 'Kitchen Motion Light' and then it worked. So I did the same thing for the bedroom motion (2 lights) and had the same result. When I initially use the group as a switch, it doesn't work. Change to the individual lights, it works. Go back to using the group and motion turns on the lights. [scratch head to the point it hurts]

Next I created the group 'Bathroom Light Group' (using 2 GE Link bulbs) and tried to use the SmartThings motion sensor in the bathroom. It would not pick up any motion. Battery good at 99% since this is a relatively new unit. Checking the get ChildAndRouteInfo page I found that the SmartThings bathroom motion sensor was connected via one of the 2 GE bulbs in the bathroom. I've been reading the community a bit recently and remembered that there was discussion of those bulbs being "bad repeaters". So I had a couple more of the Sengled Element Color Plus bulbs that were slated to be installed in another room as soon as I get the fixture replaced. Swapped out the bulbs and low-and-behold, the group issues appear to be gone. [looking for a hammer to "fix" the GE bulbs... aggressively]

I instantly placed an order for 4 more of the Sengled Element Color Plus bulbs to replace the ones I used and a couple more to completely get rid of the (junk) GE Link bulbs.

Bill

WOW, so glad you figured that out and shared. For all the crap that is spoken about Sylvania bulbs, I haven't had anything like that happen and I have 50+ of the newer RGBWs and over 40 end devices, with only 2 Hue dimmers in the Child devices attached directly to the hub. My motion and contact sensors never miss a beat, dimmers always work first press. I would be so mad! Just don't get any glass in your eyes.

Ken,

Rather than "fine adjustment" (with a rather large hammer) of the GE Link bulbs, I gave them to a friend (that does not have any home automation) to replace some incandescent bulbs he still has in use. I hate unnecessary waste and the LED portion of the Link bulbs were still working well.

Good call and a much safer alternative :wink:

I'm getting this same error but it appears only with the 2 motion lighting childs I already had setup before the last update. One I recently created can be edited just fine.

The 2 in error; One uses a group for 2 switches, the other uses multiple motion and contact sensors for a single switch but no groups or scenes.

The one that works uses only a single motion sensor for a single dimmer and no groups or scenes.

Initially I thought it might be because I added a mode (Morning) after the motion lighting childs were created, but then I recalled I actually added that mode specifically FOR the last motion lighting child I created because the lights turned off on my wife while showering early in the morning (Doh!)

FWIW, I use Rooms Manager user app for all my other motion lighting, but these 3 don't need the complexity of Rules Machine or Rooms Manager.

Have you opened the logs in another tab and are seeing an error with an input string "null"? Might be worth looking through your apps to see if you can locate the null. If not, @bravenel can likely put you in the right direction to correct it.

I suspect that it was my fault that the null got in there. I'm still learning Hubitat and at some point probably didn't click 'Done' when finished modifying an app and just used the menu (on the left) to go onto the next process I wanted to change.

Same thing happened to me, got an error on any atempt to edit motion lighting apps, i removed the last edited group and scenes app an woila it works again

Another thread on the same topic:

1 Like