Unexpected error occurred with smart lighting

After needing to do a complete reset with Hub v2, and reinstalling/pairing all devices, I tried to add a basic smartapp but keep getting errors.

The reason for the reset: ST removed the wifi-only phone presence option (thanks a lot ST), so I’m try to find a workaround (rather yet-another-workaround). Attempted to use the core/webcore so I could once again have a working presence detection. This was a complete fail (probably on my part, whatever). I was unable to remove the github/webcore device handlers, so deleted the hub/location/etc to start over.

After having my “welcome code” resent to me, and all hardware devices reconnected, I tried to add a basic “smart lighitng” app - a ST motion sensor turns of ST wall plug (with lamp). So far so good, as I can successfully save the app.

Then I tried to change the times this app is active - only sunset to sunrise. Now it says “an unexpected error occurred” when I try to save it. Delete smart lighting, retry, no change. Reboot the hub, the app, the phone - same error. Every time, I can save the app, but if I add the time restriction, I get the error.

What is going on?

Login to the SmartThings IDE and watch Live Logging and you might see more details.

https://account.smartthings.com

1616ce5c-c5e8-46e1-93e2-e0d788f81c1e 5:37:59 PM: error java.lang.UnsupportedOperationException: An Automation must be returned by initialize.
1616ce5c-c5e8-46e1-93e2-e0d788f81c1e 5:37:59 PM: error Failed to build Behaviorjava.lang.NullPointerException
1616ce5c-c5e8-46e1-93e2-e0d788f81c1e 5:37:59 PM: error Failed to build Behaviorjava.lang.NullPointerException
1616ce5c-c5e8-46e1-93e2-e0d788f81c1e 5:37:59 PM: debug Installed with settings: [trigger:Motion, overrideLabel:false, motionStops:false, endTimeType:sunrise, lights:[Outlet], motionSensors:[Motion Sensor], startTimeOffset:-15, endTimeOffset:15, startTimeType:sunset, action:on, motionState:active]
1616ce5c-c5e8-46e1-93e2-e0d788f81c1e 5:37:54 PM: trace timeBasedTrigger: false
1616ce5c-c5e8-46e1-93e2-e0d788f81c1e 5:37:17 PM: trace timeBasedTrigger: false
1616ce5c-c5e8-46e1-93e2-e0d788f81c1e 5:36:48 PM: trace timeBasedTrigger: false
5:35:17 PM: info Waiting on events…
5:35:17 PM: info For past logs for individual things go to the My Devices section, find the device and click on the Events link on the device information page.
5:35:17 PM: info This console provides live logging of your SmartThings.

1 Like

that’s what was logged when i tried to make/save the smart lighting app

1 Like

Yup…

That’s plenty to share with Support@SmartThings.com

Did you set your location after you reset the hub?

1 Like

I guess that’s all it was, thanks. The time was already the correct local time, and the location was correct on the map - just hadn’t clicked on it and saved it.

Thanks again

2 Likes