Headache Toilet Scene

Hi ,

I just started to used PLEG and i am struck with my toilet scene when i am in shower. Need some help and suggestion. :cry:

Equipment list in toilet:
Exhaust fan → Z Wave wall switch
Lightnings —> Z Wave Wall switch
1 x Motion and light sensor pointing at basin and toilet bowl :stuck_out_tongue:
1 x Door sensor

Scenarios i would like to have:

Scenarios 1
Any time of the day, when my 3 years old goes to the toilet with door open
→ the light will on and stay on for 2 minutes, until next motion the timer will restart for another 2 minutes till no motion and light off.

Scenarios 2

Anytime of the day ,i do not want to keep waving my hand when doing my business ;D or in shower to keep the lights up.
—> over right scenarios 1 2minutes timer
—> door closed, motion detected light up and stay, door closed for 1 minutes, exhaust fan on and stay.
—> turn off light and exhaust fan when door is open when no motion being detected after 2 minutes then scenarios 1 goes back in place.

Hope some one can guide me through this, i am kind of noob in programming, need more visual example to learn pleg in UI7 :cry:

open to suggestion on how this can be done

thanks in advance

Hello,

I am also looking to to the exact same thing. The only difference in my scenario is that the fan and light are on one switch. I have tried pleg and never got it to work. I am sure that am doing something wrong so hopefully someone with extensive pleg knowledge and can help us both out.

Thanks

I don’t have time to do it today, but will post my logic tomorrow for this exact scenario.

‘Wasp in a Box’ algorithm would be close to what’s needed.

Described here: http://forum.micasaverde.com/index.php/topic,13920.msg105059.html#msg105059 and referenced threads.

My understanding is the door us usually left open …
You would need Wasp in a box if the door was usually left closed. Then you need to decide if someone is in or out of bathroom when door is closed.
[hr]
Inputs Triggers:
DoorOpen When door is opened
Motion When Motion is detected.
Input Schedules:
LightTimer On - SelfRetrigger Off - Interval of two minutes
DoorClosedTimer On - SelfRetrigger Off - Interval of 1 minute
[hr]
Conditions:
MotionDetected Motion
DoorClosed !DoorOpen
FanOn DoorClosed and (DoorClosed; !DoorClosedTimer)
FanAndLightOff DoorOpen and (MotionDetected; !LightTimer)
[hr]
Action:
MotionDetected Turn On Light
Select PLEG Device, Start Timer Action, Timer is LightTimer

DoorClosed Select PLEG DEvice, Start Timer Action, Timer is DoorClosedTimer

FanOn Turn On Fan

FanAndLightOff Turn Off Light
Turn Off Fan

Thanks :-*

[quote=“RichardTSchaefer”]My understanding is the door us usually left open …
You would need Wasp in a box if the door was usually left closed. Then you need to decide if someone is in or out of bathroom when door is closed.
[hr]
Inputs Triggers:
DoorOpen When door is opened
Motion When Motion is detected.
Input Schedules:
LightTimer On - SelfRetrigger Off - Interval of two minutes
DoorClosedTimer On - SelfRetrigger Off - Interval of 1 minute
[hr]
Conditions:
MotionDetected Motion
DoorClosed !DoorOpen
FanOn DoorClosed and (DoorClosed; !DoorClosedTimer)
FanAndLightOff DoorOpen and (MotionDetected; !LightTimer)
[hr]
Action:
MotionDetected Turn On Light
Select PLEG Device, Start Timer Action, Timer is LightTimer

DoorClosed Select PLEG DEvice, Start Timer Action, Timer is DoorClosedTimer

FanOn Turn On Fan

FanAndLightOff Turn Off Light
Turn Off Fan[/quote]

Sent from my SM-G925I using Tapatalk

[quote=“RichardTSchaefer”]My understanding is the door us usually left open …
You would need Wasp in a box if the door was usually left closed. Then you need to decide if someone is in or out of bathroom when door is closed.
[hr]
Inputs Triggers:
DoorOpen When door is opened
Motion When Motion is detected.
Input Schedules:
LightTimer On - SelfRetrigger Off - Interval of two minutes
DoorClosedTimer On - SelfRetrigger Off - Interval of 1 minute
[hr]
Conditions:
MotionDetected Motion
DoorClosed !DoorOpen
FanOn DoorClosed and (DoorClosed; !DoorClosedTimer)
FanAndLightOff DoorOpen and (MotionDetected; !LightTimer)
[hr]
Action:
MotionDetected Turn On Light
Select PLEG Device, Start Timer Action, Timer is LightTimer

DoorClosed Select PLEG DEvice, Start Timer Action, Timer is DoorClosedTimer

FanOn Turn On Fan

FanAndLightOff Turn Off Light
Turn Off Fan[/quote]
Hi richard.
Thanks i will try this out.

Come to think of it.

I will have a wasp in the box condition if i would repeat this scene in my master bedroom as the door is closed during sleep due to air conditioning. How do i amend the scene?

Sent from my SM-G925I using Tapatalk

I did it a bit different.

Scenario:

Powder Room door is open. Only closed when in use.

Fan & Light on same switch.

Thanks :-*

[quote=“RichardTSchaefer”]My understanding is the door us usually left open …
You would need Wasp in a box if the door was usually left closed. Then you need to decide if someone is in or out of bathroom when door is closed.
[hr]
Inputs Triggers:
DoorOpen When door is opened
Motion When Motion is detected.
Input Schedules:
LightTimer On - SelfRetrigger Off - Interval of two minutes
DoorClosedTimer On - SelfRetrigger Off - Interval of 1 minute
[hr]
Conditions:
MotionDetected Motion
DoorClosed !DoorOpen
FanOn DoorClosed and (DoorClosed; !DoorClosedTimer)
FanAndLightOff DoorOpen and (MotionDetected; !LightTimer)
[hr]
Action:
MotionDetected Turn On Light
Select PLEG Device, Start Timer Action, Timer is LightTimer

DoorClosed Select PLEG DEvice, Start Timer Action, Timer is DoorClosedTimer

FanOn Turn On Fan

FanAndLightOff Turn Off Light
Turn Off Fan[/quote]

Sent from my SM-G925I using Tapatalk[/quote]

Thanks, Tried it out and works like a charm.

Hi richard,

Just like to check i have noticed that when someone manually on the switch for the light, the pleg scene actually become non functional for some reason and i have to actually reload it to make it works again.

Is this normal?

Sent from my SM-G925I using Tapatalk

If you look at the status report you should be able to figure out what is happening.

Ok will try to see if i understand the status report .
Thanks

Sent from my SM-G925I using Tapatalk

If you can’t figure it out … post your status report here and a comment about what looks wrong to you …
There are lots of folks that can help … if you provide the details.

Thanks.
Looks ok for now i guess. Probably the issue is laggy on my vera ui7…which vera support can’t resolve too.

Sent from my SM-G925I using Tapatalk

@9ixxerLee is it possible for you to post your final Status report to provide guidance for others? thanxs Mike

Hi Mike, please see attached if it helps ;D

It not perfect yet in my case due to motion sensor position of mine >>>(glass panel showering and motion sensor does not detect through glass), probably i would require some tweak to it.

Might need to increase the timer to 5 minutes on re trigger timer or include another condition/action when door is open, motion detected, light on 5 minutes and exhaust fan after 1 minutes but i still cannot figure out something which is the no motion part when light and exhaust off, in scenario when the toilet is occupied with the door open when no motion is detected the light still shut off now, i have already adjust the sensor to max sensitivity with 8 sec re reading time.

Hehe feel free to chip in.

Thanks all.

@9ixxerLee, many thanxs for sharing your solution, I will attempt to use once I insert my door sensor (maybe this weekend) :-\ After reading several PLEG threads, there seems to be a few idiosyncrasies depending on what type of motion sensor you use (battery or USB vs continuous power) that seem to govern trigger timers times which requires one to monitor their status reports to determine the best value(s)… Mike

Hi there,

Need some help in attached scene.

can’t seem to get it right. I can only get it to auto on and off during condition of night mode and motion detected is true

Primarily i wanted the walkway light as follow:

Only activated this scene during vera mode plugin (NIGHT) & motion detected.
Upon motion is detected, light on for 2 minutes with a timer and timer will restart when motion is detected again within the count down.

But when light is on, if no motion being detection within 1 minutes the light to immediate off.

i also have in mind a scene that auto switch the mode in Vera but need help in how to go about.
Something like during the weekdays @ 0545 am, upon my alarm buzzed off the first motion will trigger the mode change from night to home mode.
and on Weekends the first motion in walkway from 0500ma to 0800am will change the mode from night to home.

Don’t know these will work or not since it is all under the same walkway motion sensor.
Has no clue how to go about it since all my alarm is from my android hand phone but the first motion will help i guess.

thanks for helping in advance.
I am seriously trying to get the hand on PLEG but lack of knowledge in programming is something i am struggling now.

Hi ,

Just like to check is it normal that if the light or exhaust fan are turned on manually, they will not be auto turn off? Is there any thing i can add to it to prevent this?

I also noticed in event the door is open and the timer ran out without detecting motion, it takes awhile for the pleg scene to go back normal and activate the scene again.

Lastly the turn off everything is no longer immediate once the door opens, it takes a while for the light to switch off.

Please assist this.

And 1 more thing.

I tried to create another basic light and motion scene in my kitchen, Using the Pleg Basic As follow: But it does not work, error was always at the condition in red

Example ? Simple Motion-Triggered Light
Turn on a light when a motion-detector is tripped. Turn it off if there has been no motion for 30
minutes. Allow the light to be turned off whilst the motion-detector is still tripped.
Triggers
LightOn Light is turned on
Motion Motion Sensor is tripped
Conditions
TurnOn !LightOn and Motion and (!LightOn; Motion)
TurnOff LightOn and !Motion and (!Motion; NOW > 30:00)
Actions
TurnOn Turn light on
TurnOff Turn light off