I'm going crazy with this rule that changes my kitchen lights to green with *either* refrigerator door is open

Can anyone see the error in the logic? Both contact sensors appear to work (checked in each device).

The rule has an OR such that either contact should turn the lights green. However, it only works when contact2 is triggered.

I can even look at the rule where the OR is resulting in TRUE, and the green never happens.

Any ideas?

I don't see anything myself. My suggestion would be to enable all logging for this rule and then see if the output of Logs, filtered to just this app, provides any clues. (My only guess is that you might get something unexpected if both contact sensors trigger in quick succession, like milliseconds or a few hundred milliseconds of each other.)

Also, this isn't causing your problem, but unless you have RGB-only devices and not RGBW (RGB plus CT_ devices), I'd suggest using the "Set Color Temperature" action in your ELSE instead of "Set Color." Then you'll get real whites, not RGB approximations that tend to vary by device and never be quite as good (if you aren't sure what CTs to use, maybe something like 4000, 3000, and 2700, maybe a bit higher on the first and a bit lower on the last two, depending on your preferences and the device).

1 Like

Thank you for your review! Everything, and I mean everything, in my home is Hue. This has been working perfectly with just the right door sensor.

I decided to add a left door sensor identical to the right because sometimes the left door is left ajar.

If I can get this to work, I'll add a third contact sensor for the freezer.

Perhaps I should be re-level the fridge! LOL

I also made sure to open JUST the left door to see if there was a conflict somehow. No light change.

I turned on logging (great suggestion BTW), and now things are working! Go figure :-).

I would make sure you aren't getting some bounce in your contact. I had that issue at one time. I would suggest adding a small wait for event at the beginning to make sure your not getting multiple triggers. You are wanting to monitor if it is left open so waiting 30 seconds before changing things seems in line.

1 Like

I ordered a 3rd contact sensor (NYCE) for the freezer. I just can't seem to help myself making things more complex... until it breaks! LOL

Thank you for the wait suggestion!

I probably would have used a lux sensor vs a contact, but that's me. My fridge lights turn on if I open the door. No one right way to do anything, really, though.

Like when a program starts responding when you do the three finger salute.

I like the LUX sensor approach! Do you have any recommendations? The NYCE devices seem to report frequently (important in this application) and don't eat batteries, but I can't see a light function on anything other than motion sensors?

This is very interesting, are you saying that you place your lux sensor inside of the fridge. Is it ok at lower temperatures. Do you seal inside of a bag to prevent dampness etc? Finally, just as a side note, how do folks monitor an open freezer, are we limited to door sensors here as they tend to not have internal lights?

This is the one I'll be testing. It's magnetic, but I doubt I will find a metal surface in the refrigerator or freezer.

https://www.amazon.com/gp/product/B095TZTGNB/

I'm also planning to ignore what it was meant for (motion detection), and use it for light only.

I'm cracking the fridge, seeing the light, cracking the freezer, seeing the light. If this works, it should be perfect.

Note that the device you linked to senses motion (and temperature) only, not lux.

1 Like

Also, if I understand refrigeration right, both the fridge and the freezer remove humidity, so I'm hoping ... no moisture problem.

As to working in the cold, only time will tell.

Also, I'm a bit concerned about putting the sensor in what could be a faraday cage LOL.

i've put unprotected sensors in fridges and freezers multiple times. no issues, never needed to put it in a bag.

2 Likes

Luminance sensor (Hue in this case) was a no go. Not responsive enough. Back to getting the contact sensors working I guess!

[I knew there was a reason I abandoned Hue sensors for NYCE a long time ago LOL]

Thanks for the reply bertabcd1234; I found this out when the device arrived. Off to the graveyard of misfit toys I guess! LOL

They're great motion sensors if you ever just want one of those. :smiley:

I gave up on the contact sensors after my C8 Pro upgrade (had to rebuild everything, and the contact sensors are being difficult).

I tried using Hue sensors (they report illuminance) instead, and I'm having some luck.

I'm using the Zone Motion Controller (ZMC) code which times out every minute. The Rule senses a change in the ZMC, and triggers my lights.

Is there a better way to implement illuminance in a fridge and freezer?