Smart Bath Automation: Motion, Lights, and Exhaust Fan Integration

Hey everyone, I’m diving into the world of smart home automation and I’m really excited to share my journey with you. I’ve been trying to set up a seamless bathroom experience using my existing Z-Wave devices and the PLEG automation engine in UI7. Let me walk you through my setup and the challenges I’ve encountered so far.

My Setup

I’ve got a few Z-Wave devices in my bathroom:

  • A Z-Wave wall switch controlling the exhaust fan
  • Another Z-Wave wall switch for the lights
  • A motion and light sensor pointing at the basin and toilet bowl
  • A door sensor

What I Want to Achieve

My goal is to create two main scenarios:

  1. Daytime Scenario

    • When my 3-year-old goes into the bathroom with the door open, the lights should turn on and stay on for 2 minutes. If there’s more motion within those 2 minutes, the timer should reset, keeping the lights on until there’s no motion for 2 minutes, at which point the lights should turn off.
  2. Nighttime Scenario

    • At night, I don’t want to keep waving my hand to keep the lights on while I’m doing my business or in the shower. Instead, I want the lights to stay on as long as the door is closed and motion is detected. When the door is closed for 1 minute, the exhaust fan should turn on and stay on. If the door opens again or there’s no motion detected after 2 minutes, the lights and exhaust fan should turn off, reverting back to the daytime scenario.

Challenges I’m Facing

I’m relatively new to programming automations, so I’m struggling a bit with the logic and timing. I’ve tried setting up some basic rules, but they either don’t work as expected or interfere with each other. I’ve heard that visual examples or templates in PLEG could help, but I’m not sure how to structure them properly.

Seeking Your Expertise

Has anyone successfully set up something similar? I’d love to see a visual example or get some guidance on how to structure the automation in PLEG. Any tips or tricks would be incredibly helpful!

Looking Forward to Your Input

I’m really excited to get this working and can’t wait to share my progress with you all. If you have any suggestions or resources, please don’t hesitate to reach out. Let’s make my bathroom as smart as it can be!

Cheers,
[Your Name]