Piston Question: Bathroom Lighting


#1

Hello!

I was wondering if I could enlist the help of this awesome community in a problem.

I have a piston that I use that controls bathroom lighting and a fan,
My goal was to have the light turn on when the motion sensor senses motion. I would like the light to stay on while someone is in the bathroom. If someone is in there for over 120 seconds then the fan would come on. I wanted the light to stay on an additional 60 seconds after the door is opened (ie no motion or person has left). And after 180 seconds the fan would turn off.

My problem is that my iris motion sensors time out if someone is sitting on the pot, and playing with their phone etc…
lights turn off, then back on.

Also the fan sometimes comes on sometimes does not.

Can any of you experts out there take a look at this piston and try and offer some tips for improving performance?
I am not asking for you guys to rewrite it, just help teach me how to write these better.

Thank You!


#2

Try this, should solve most of your problems and then you can use a piston for the fan:
https://community.webcore.co/t/rooms-manager-smartapps-and-rooms-occupancy-dth-added-setting-for-day-of-week/1813/63


#3

I cannot seem to get this installed. I have updated the repos using github, but nothing is showing in my smartapps. Is this a known problem?


#4

You added the smartapp + child and device handler? Then you should go to your apps and be able to see it