Why would a Basic Rule Stop working

Devices: GE 26933 Smart Motion Sensor and a GE (1st Gen) Dimmer. I set up my HE C-7 four weeks ago and these two devices were among the first I moved from my Vera Edge. I created two Basic Rules for the motion sensor; Rule 1) anytime motion is detected set level to 100 of ceiling lights connected to motion sensor, wait 20 minutes after motion stops, then turn off. Rule 2) when motion is detected between sunset and sunrise, dim counter lights (GE Dimmer) to 80% wait 20 minutes after motion stops, then turn off.

This all worked just fine until 2 nights ago and then just stopped. If the lights were off they wouldn't go on and if they were on they wouldn't go off. It appeared to stop working sometime after 1:00 AM. The log shows the sensor detecting motion/no motion correctly. I tried a reboot, but no improvement. I then tried a shutdown (wait for red LED), remove power for 1 minute, and then restart, but the rule still wouldn't turn on the lights. I finally removed and rewrote the rules exactly the same and it worked again. As I test, I paused the cabinet rule and rewrote it as Motion and Mode Lighting App.

Then, this morning, the ceiling lights were still on and the rule again wouldn't execute for them. (The cabinet rule was still working fine). I paused the ceiling Basic Rule and rewrote it also as a motion rule and it's working again.

So, why would a Basic Rule just stop with no apparent way to restart it? Since the sensor controls both its switch and another unrelated switch, I don't think it's a device issue (the log show shows no event for turning on/off the lights, just motion. I have a bunch of other Basic Rules, but I've moved all the motion actions to Motion and Mode Lighting Apps.

Please turn on logging for the rule. Also, if you open the rule and hit Done, that reinitializes it.

I paused the Motion and Mode Lighting rule and resumed the Basic Rule. I turned on logging, hit Done and as you indicated, it reinitialized and the rule started working again. The rule has now gone through one complete cycle and between "app: initialized" and "app:finished", everything looks normal. I'll have to wait until it stops working again and check the log then.

It should not stop working randomly.

LOL. As a retired software engineer who cut my teeth on IBM 360's and card punch machines in the 60's, I couldn't agree more, but I'm also aware that s**t happens.

I'm finding the same thing... randomly some of my basic rules will stop firing. The devices are working, the trigger event (motion) is recorded in the logs, but the rule just stops working while other basic rules continue to execute without issue. Shutting down the hubitat for a min only works on occasion... but pausing/unpausing the rule (or making any change to the rule) will get it working again as it reinitializes. I'd love to get to the bottom of what is happening on this one.

Please show the rule in question, and the logs associated with this behavior, of the rule and whatever triggers it.

You don't need to shutdown your hub. Just opening a rule and hitting Done reinitializes the rule.

FWIW: Since I reinitialized the rule, the problem has not reoccurred. I'll keep the app logging on until the app stalls again.

It failed again. Here's the log (clicking on "error" just takes me to the app):

app:1972021-04-24 08:54:07.250 pm errorjava.lang.NullPointerException: null on line 1013 (resumeX)

app:1972021-04-24 08:54:07.105 pm infoevt: Ceiling Lights motion stayed inactive

app:1972021-04-24 08:34:07.059 pm infoevt: Ceiling Lights inactive wait for 20 minutes

app:1972021-04-24 08:33:47.663 pm infoact: Wait Until Ceiling Lights stays inactive for 20 minutes

app:1972021-04-24 08:33:47.578 pm infoact: Set level Ceiling Lights 100

app:1972021-04-24 08:33:47.556 pm infoevt: Ceiling Lights inactive wait until cancelled, still waiting

app:1972021-04-24 08:33:47.521 pm infoevt: Ceiling Lights motion active

app:1972021-04-24 08:22:04.813 pm infoevt: Ceiling Lights inactive wait for 20 minutes

app:1972021-04-24 08:21:45.605 pm infoact: Wait Until Ceiling Lights stays inactive for 20 minutes

app:1972021-04-24 08:21:45.592 pm infoact: Set level Ceiling Lights 100

app:1972021-04-24 08:21:45.581 pm infoevt: Ceiling Lights inactive wait until cancelled, still waiting

app:1972021-04-24 08:21:45.552 pm infoevt: Ceiling Lights motion active

app:1972021-04-24 08:19:52.594 pm infoevt: Ceiling Lights inactive wait for 20 minutes

app:1972021-04-24 08:19:32.939 pm infoact: Wait Until Ceiling Lights stays inactive for 20 minutes

app:1972021-04-24 08:19:32.925 pm infoevt: Ceiling Lights inactive wait until cancelled, still waiting

app:1972021-04-24 08:19:32.924 pm infoact: Set level Ceiling Lights 100

app:1972021-04-24 08:19:32.853 pm infoevt: Ceiling Lights motion active

app:1972021-04-24 08:19:18.573 pm infoevt: Ceiling Lights inactive wait for 20 minutes

app:1972021-04-24 08:18:59.141 pm infoact: Wait Until Ceiling Lights stays inactive for 20 minutes

app:1972021-04-24 08:18:59.058 pm infoact: Set level Ceiling Lights 100

app:1972021-04-24 08:18:59.016 pm infoevt: Ceiling Lights inactive wait until cancelled, still waiting

app:1972021-04-24 08:18:58.992 pm infoevt: Ceiling Lights motion active

app:1972021-04-24 08:11:57.791 pm infoevt: Ceiling Lights inactive wait for 20 minutes

app:1972021-04-24 08:11:38.373 pm infoact: Wait Until Ceiling Lights stays inactive for 20 minutes

app:1972021-04-24 08:11:38.278 pm infoact: Set level Ceiling Lights 100

app:1972021-04-24 08:11:38.267 pm infoevt: Ceiling Lights motion active

app:1972021-04-24 07:58:50.531 pm infoapp: finished

app:1972021-04-24 07:58:50.481 pm infoact: Turn off Ceiling Lights

I am continuing to receive these "NullPointerException" errors with different Basic Rules:

app:### 2021-mm-dd hh:mm:ss.ddd xm error-java.lang.NullPointerException: null on line 1013 (resumeX)

Whenever a Basic Rule stops, I turn on logging and wait for it to stop again. Each time, it's throws this null pointer exception, always on line 1013. They always fail on the last step (turning the device) off. I have changed the failing Basic Rules to either Simple Automation, Motion and Mode Lighting or Rule Machine rules.

It makes me wonder if I'm doing something wrong with Basic Rules or if there is a problem with the App itself.

Please show the Basic Rule that fails, so that I can try to reproduce what you are experiencing.

Aeotec Door/Window Sensor 7 and GE Dimmer (1st Gen)

Please turn on logging for this, and then post the logs after its done its full cycle of waiting. Use a screenshot for the logs.

OK, so no error this time. I'm not at all sure about the error you posted above. It may be anomalous. If it happens again, please post another screenshot.

Sorry to complicate this but, the original issue I raised was with my kitchen ceiling lights that threw the null exception first posted above. I rewrote the rule as a Motion and Mode Lighting app:

Several times this has happened:

The lights were supposed to simply turn off, but the log shows them being dimmed to 34%. They are in fact off, but won't turn back on because HE thinks they're on. Here's the Device pages before and after I clicked on Refresh:

Before Refresh:

After Refresh:

After clicking on Refresh the Rule functions normally as it now knows the lights are off. But why instead of turning them off, did it (incorrectly and inaccurately) dim them to 34%.

It'll be a few days, but I'll keep the Basic Rule active until it does.

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