Pantry Light on and off based on door Sensor not working

So I am very fimilar with smartthings made the move over to Hubitat this week and I am running in some issues.

I am trying to turn off and on a "Pantry Light" which is a generic zigbee bulb. Through the devies page I can turn it on and off with the button no problem. I also have a "Pantry Door Sensor" that reports open and close perfectly every time. But when I make this rule in the apps sections, under the rule machine. I have to open and close the door twice to get the light to turn on.

Looking in the logs I see the sensor reporting open and close but the first time in this log attached the light didn't turn out. I am pulling out my hair trying to figure out what the heck is going on.

Any ideas?

To satisfy my curiosity, does the bulb reliably turn on/off when you control it from the Device page? I am trying to eliminate the possibility that this is caused by some crazy zigbee or zigbee mesh issue.

Thanks!

Here is the logging on the device. This is me pressing on, off, off. Yes I know the second one says Pantry light was turn on. This is strange looking.

I also adding the events page of the lights

Seems it's not registering the close. What brand of sensor is it? How fresh is the battery? Can you see the sensor open and close from the device page?

Here are the logs from the device events page and the system logs. It seems like it registers the open and close. Battery is brand new.

The brand I don't know

What Platform build are you running? If you're not at 2.2.4.158, could you update, then delete the child app and build it again. See if this issue is resolved.

And just to confirm, it looks like your sensor "dev 43" is showing open and closed in the log. Please confirm that when you look at the device details, you see it's status reliably change from Open to Close when you physically open and close the contact sensor.

What does it say on the device page itself for the door sensor. Can you see it change?

1 Like

Yes I am on 2.2.4.158Screenshot 2020-12-11 105617

On the device page itself, I see that current state contact changes reliably from open to close.Screenshot 2020-12-11 105712

Just did a quick test and it works exactly as expected. I would suggest you delete the child app and build it again. If you can watch the sensor reporting open and close reliably in the device details when you change the physical contact state, there's no reason this Simple Automation Rule shouldn't work for you too.

You can also test the automation by creating a virtual contact sensor. Set it to be the contact sensor device in your SA rule and then from the virtual contact sensor device page, toggle it between open and close. If the light turns on with the virtual contact sensor, but doesn't turn on and off with the actual contact sensor, then there's something not right in the driver and that needs to be examined further.

If the light doesn't turn on and off with the virtual contact sensor as the specified sensor device in the SA rule, then you need to examine what's not right with the bulb driver.

Thanks guys, I delete the child app and simple automation rules. I tried set it up with the Rule Machine and created two rules for on and off and it seems to be working now.

But, it really should be working for you with Simple Automation. I can make it work when I try. There's nothing complicated about it, so it should work for you too.

Yeah I agree it should work, I got somewhat comfortable last night with Rule Machine since I had to create a couple virtual switches for device that had two on's and two off's. Thanks again for trying, this works for me now. Now I have to figure out if I can create one rule instead of two for both on and off in the same rule.

Very simple with conditional actions.

Thanks I will have to play around with that later on now time go back to my real job. I apricate all your help!

1 Like