Diagnosing a mysterious Sensor light issue

I have a simple Motion Lighting rule for a single light and a single motion sensor, that has three levels based on Mode. It was working for a while then suddenly started (consistently) misbehaving.

The light comes on, then about a second later turns off. The logs show that it was turned off with a physical switch, which is not the case.

Also semi-relatedly, is there a way to have better "Description Text" Motion lighting. I'd really like to see the bottom log be something like "Hall Motion turned on Hall Light" and "______ turned off Hall Light"

A couple of questions:
What is the switch? Which brand? there are some known issues with some switches
you checked to make sure that it's not being used in other rules. You can see that at the bottom of the device page. I've accidentally used the wrong device in a rule and it completely misbehaved.

1 Like

Why do you have a "null" in your Lights to Turn On section? You probably should look at that section.

The null is that in that mode (which is not active right now) the light level is set to 0

Switch is a Lutron Wired Dimmer

The light and the switch are not being used by any other rule, the sensor is part of a whole house motion sensor zone.

It looks like Motion Lighting isn't handling that well. Level 0 can be bit wonky but usually just means "off," so I'd just not turn them on if that's what you're going for there (or put "1" for the level if you want them on but dim; Lutron dimmers might actually be able to handle something like 0.1 or even 0.01 here if you felt daring).

If that doesn't help, I second April's advice to look at what other apps/rules this device might be in use by (the device page has an "In use by" section that will tell you). The "Events" page for the device will only tell you what happened to that device, not what app did it, so you'll need to either look at other apps/rules or perhaps use the live "Logs" or "Past Logs" (on the left) to make some guesses. Since it's consistent, there's probably something else doing it. Perhaps some kind of auto-off rule/app like you were wondering about recently? :slight_smile:

1 Like

ok so I went through and saw that [RELEASE] Eternal Sunshine (luminescence and dimmers) heads up @elfege was possibly the culprit. I'd configured it, and it hadn't work as expected so I disabled/paused it. After completely deleting it the Hall Light seems to be working normally again.

Even though its working, I deleted the Dim level by mode for Sleep afterwards for good measure.

Still interested in this, but haven't set anything up yet.

Hi @jared.zimmerman. Would be ok to give me more details about what didn't work when you used Eternal Sunshine? I might be able to help and fix whatever isn't working. It's a complex app despite what may appear at first because it deals with many possible scenarios so any help would be greatly appreciated. Also, have you been using the last version ? If you're not sure, and wish to help by trying it again, please make sure you update the code from my last submit in my repository. There are many issues I have fixed in the last release, 2 months ago.
I have improved the ability of this app to interact with other apps that might be turning off your dimmers so they don't conflict with each other. When you select this new option (boolean) the app will keep the lights off if they've been turned off and, if they haven't while, however, illuminance is high, the dimmers will stay at level 1 until the other app turns them off then back on.

Thank you very much for your feedback.

I installed in 2-3 days ago so I assume it was the latest.

I had installed it with the default settings, using the toggle for not knowing the range of the sensor. (and was within the 72 hour "learning period") I couldn't decide to use it or the built in motion light, and since Eternal Sunshine already didn't seem to be working well, i disabled but didn't delete it.

At that point my basic built in motion light stopped working, the light would come on, then immediately blink off. Once I deleted the Eternal sunshine (disabled) rule everything seemed to go back to normal.

Hardware involved was a Lutron wall dimmer and a Dome motion sensor.

Hi,
Thanks for your feedback. I'm not sure I get everything that happened to you but if this is what I think it is, it could be a conflict between your motion lighting app and Eternal Sunshine, but I'm really not sure. In the latest version it should be able to "detect" when another app is controlling your dimmer. Unfortunately without debug lots there's nothing else I can diagnose from here. In any case I don't think it's related to the toggle you mentioned.

It could be a faulty light sensor returning a false value but those dome sensors are pretty reliable usually, I use these myself as a matter of fact.

If you find the time to reinstall it and activate the logs and send me as many logs as you can while and around the time this bug happens again, I might be able to figure out what's going on and that could help me improve the app.

Thanks again for your feedback. It's greatly appreciated.

Sure I’ll set it up in one of our bathrooms and turn on debug logs. Should I use the learning setting or do you have the lux values for the dome sensor?

Thank you very much for your help in this. I suggest you try with the learning setting on, first, then if it bugs again, try it without it. Max lux = 1000
Thanks again! This is really helping.

should I leave Motion Lights on in the same room or turn it off?

Do you mean a separate app or the motion built into Eternal Sunshine? If you are refering to the app you usually use for motion lighting, then keep it running, my goal being to make ES compatible with other apps.

Yes, the built in "Motion Lighting" app.

Should I toggle the motion control inside Eternal Sunshine on, or leave that off?

Walked into the bathroom and the lights came on, then immediately went off and wouldn’t come back on.

app:6502020-05-17 01:34:00.252 aminfo1 active motion events in the last 5 minutes stillActive() returns true

app:6502020-05-17 01:33:00.257 aminfo1 active motion events in the last 5 minutes stillActive() returns true

app:6502020-05-17 01:32:00.272 aminfo1 active motion events in the last 5 minutes stillActive() returns true

app:6502020-05-17 01:31:54.431 aminfo1 active motion events in the last 5 minutes stillActive() returns true

app:6502020-05-17 01:31:54.204 aminfoHall Bath Sensor is inactive

app:6502020-05-17 01:31:17.337 amerrorjava.lang.NullPointerException: Cannot invoke method toInteger() on null object on line 273 (illuminanceHandler)

app:6502020-05-17 01:31:13.865 amerrorjava.lang.NullPointerException: Cannot invoke method toInteger() on null object on line 273 (illuminanceHandler)

app:6502020-05-17 01:31:11.210 aminfo1 active motion events in the last 5 minutes stillActive() returns true

app:6502020-05-17 01:31:10.993 aminfoHall Bath Sensor is active

app:6502020-05-17 01:31:00.300 aminfo0 active motion events in the last 5 minutes stillActive() returns false

app:6502020-05-17 01:30:00.358 aminfo0 active motion events in the last 5 minutes stillActive() returns false

app:6502020-05-17 01:29:00.321 aminfo0 active motion events in the last 5 minutes stillActive() returns false

app:6502020-05-17 01:28:00.284 aminfo0 active motion events in the last 5 minutes stillActive() returns false

app:6502020-05-17 01:27:00.273 aminfo0 active motion events in the last 5 minutes stillActive() returns false

app:6502020-05-17 01:26:00.277 aminfo0 active motion events in the last 5 minutes stillActive() returns false

app:6502020-05-17 01:25:00.307 aminfo0 active motion events in the last 5 minutes stillActive() returns false

app:6502020-05-17 01:24:00.307 aminfo0 active motion events in the last 5 minutes stillActive() returns false

app:6502020-05-17 01:23:00.338 aminfo0 active motion events in the last 5 minutes stillActive() returns false

--- Loading Past Logs... --

app:6512020-05-17 01:34:00.283 aminfo1 active motion events in the last 5 minutes stillActive() returns true

app:6512020-05-17 01:33:00.482 aminfo1 active motion events in the last 5 minutes stillActive() returns true

app:6512020-05-17 01:32:00.521 aminfo1 active motion events in the last 5 minutes stillActive() returns true

app:6512020-05-17 01:31:54.197 aminfo1 active motion events in the last 5 minutes stillActive() returns true

app:6512020-05-17 01:31:53.991 aminfoHall Bath Sensor is inactive

app:6512020-05-17 01:31:17.338 amerrorjava.lang.NullPointerException: Cannot invoke method toInteger() on null object on line 273 (illuminanceHandler)

app:6512020-05-17 01:31:13.882 amerrorjava.lang.NullPointerException: Cannot invoke method toInteger() on null object on line 273 (illuminanceHandler)

app:6512020-05-17 01:31:11.410 aminfo1 active motion events in the last 5 minutes stillActive() returns true

app:6512020-05-17 01:31:11.222 aminfoHall Bath Sensor is active

app:6512020-05-17 01:31:00.374 aminfo0 active motion events in the last 5 minutes stillActive() returns false

app:6512020-05-17 01:30:00.398 aminfo0 active motion events in the last 5 minutes stillActive() returns false

app:6512020-05-17 01:29:00.571 aminfo0 active motion events in the last 5 minutes stillActive() returns false

app:6512020-05-17 01:28:00.318 aminfo0 active motion events in the last 5 minutes stillActive() returns false

app:6512020-05-17 01:27:00.408 aminfo0 active motion events in the last 5 minutes stillActive() returns false

app:6512020-05-17 01:26:00.512 aminfo0 active motion events in the last 5 minutes stillActive() returns false

app:6512020-05-17 01:25:00.596 aminfo0 active motion events in the last 5 minutes stillActive() returns false

app:6512020-05-17 01:24:00.643 aminfo0 active motion events in the last 5 minutes stillActive() returns false

app:6512020-05-17 01:23:00.587 aminfo0 active motion events in the last 5 minutes stillActive() returns false

--- Loading Past Logs... ---

1 Like

leave it as it was the first time you had a problem, I suppose since the goal is to reproduce the same bug.

Ok I think I found what is wrong: A missing definition at line 273 caused an error. Please, copy paste the corrected version of the app I just posted on my repository and let me know if if works correctly this time.
Thank you!

1 Like

Ok updated the code. I’ll get new logs if/when there is an issue

1 Like