Looking for an app that monitors if any door or window is open - can't find one

I'm wondering if there is an app that can do the following:

  • If all of the doors and windows in that same group are closed, turn off the light
  • If any door or window in a group of doors and windows are open, turn on a light
  • Turn the light on again if any of the doors or windows re-open
  • Restrict to between 10PM and 2AM

Monitorng a set of contact sensors in all or nothing mode (all open or all closed) is pretty standard, but I haven't found an app that monitors whether any one door or window of a set of doors and windows is open or closed. Not whether a specific door or window is open, but if any of them is.

Appreciate any help.

Groups and Scenes will do what you want if you were able to mirror the contact sensors to switches at least... not sure how many there are though

Create a group and select options below.

2 Likes

Cool, I'll look into it. Thanks!

I'm sure one of @bptworld 's and/or @Cobra 's app lists would have something in them you could use for this...

At least to detect the condition, may need a rule to handle some of the follow up actions...

You can do all that in RM.

Yeah, Groups and Scenes asks for bulbs, dimmers, and switches. I haven't done any mirroring before, but so seems like I'd have to create a lot of virtual bulbs w/bulb on=contact open.

This seems like a pretty straight forward rule for RM. I can see why you would want an app but it doesn’t feel that complicated

Trigger : door1 door2 door3 any open

Action:
If time between 10p and 2a
Turn on light
Wait for condition Door1 Door2 door3 all closed
Turn light off
End if

1 Like

Check Open Contacts on @Cobra's website, https://cobra-apps.co.uk will do it too. :+1:

1 Like

It is working, light came on. Just needed a few minutes to start checking the contacts and report back. Happy. Next step, since I swant to learn Node Red is to replicate this there...[eek]

Thanks very much for your suggestion, I hadn't noticed the "Wait" option in RM before.


Thanks, I'll check that out as well.

That seems to want to run at a specific time...I need something that watches the doors/windows during a specified time. I'm going to look into using it in my other goodnight routine, though. :slight_smile:

I noticed one issue...I'd like the light to turn off even if doors/windows are open, after the monitoring period. So after 2AM even if we've gone to bed, turn off the light.

Added the final action below to turn off the light when the IF/Then is exited, that seemed to work.

I am not sure that that would work. It being out-side of the if statement will turn the light off every time the rule is run.

You may just need a separate rule to turn light off at 2

1 Like

Thanks...it seemed to work, but given your comment, I realize I need to watch at the moment the period ends to confirm it worked as expected. I'll do a little more testing w/a time-frame not at 2AM and confirm, and then write a second off rule. :slight_smile:

Just did a quick test, and it does seem to work w/the code as I posted.

Set it up to run from 12:25 - 12:27. Turned on at 12:25 (doors/windows are open) and didn't turn off until 12:28, almost 12:29. So it didn't seem to just run through and turn the light off right away, it sat and waited until the time period was over, and then turned off. At least that's how it looks to me.

I think a woot is in order. :smiley:

here is the one I use Device Check Plus [RELEASE] Device Check Plus - Check selected devices, then warn you what's not in the right state

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