Kids bathroom

I’m looking for a way to have bathroom lights turn off after a minute if the the bathroom door is left open (opposite of what is currently available). My kids tend to leave the bathroom and not turn off the lights. I would like to achieve this solely with an Aeon door sensor that can sense if the door is open or closed because a motion sensor is not feasible in this bathroom. So here are the parameters:

  • Door is always open when bathroom is not in use.
  • Kids can turn lights on and off manually via the wall switches
  • The night light and main light are hooked up to z-wave wall switches
  • My little ones don’t shut the door when using the facilities so I want them to learn to shut the door by turning the lights off on them if they leave the door open while using the facilities.
  • The lights will always be turned on manually

Here are my goals:

  • If the door is open and they turn on the lights, they will go out after a minute.
  • If the door is shut and they turn on the lights, the lights will stay on. I don’t want the lights to turn on automatically as they can turn them on manually.

Seems pretty simple but I haven’t found a way to do it with just the door sensor. Hopefully the community can give me a hand.

If you use an Android I think you can do this with the Simple Rule Builder smartapp.

Paulo, you have a couple of different options. If you are up to writing your own smartapp then you should just have to subscribe the the light coming on. When that event is triggered check the state of the door and based on the value schedule the light to turn off in 1 min.

If coding is not your thing, then i would recommend obycodes’ smart rules app for iOS. There is also Simple Rules Builder, but the door open/closed part is untested, if you’re on android it may still be worth a try. Finally you can always ask any of the developers to code it for you just don’t forget to support them. :wink:

Thanks guys. I’m not to comfortable with coding. I can copy and past and change some rules but coding an app outright is beyond my abilities. I was not aware of Simple Rules Builder so I can try my hand at it when I have some time. Is there any way to just reverse the action of the “Turn on when a door or window is opened.”? Seems like that would be a good starting point? Thanks for the input.

Yes, it involves editing the code of the smartapp and turning it into your own.

Thanks guys for your help and turning me on to Simple Rules Builder. Problem solved!!!

This is how Smartthings should work and why this community rules!!!