Bathroom Fan/Light piston with delays and light intensity settings


#1

1) Give a description of the problem
Tried to create first more complex piston but it did not work at all so perhaps I need to ask how to approach this first

2) What is the expected behavior?
If the bathroom light is ON and someone closes the shower doors fan will turn ON (with backup auto OFF timer counting down 45min for those who close the shower after use) at the same time light will set to 100% intensity.
When the shower opens fan will stay ON with 10 minute count down till it will turn off and light will change to 75% intensity.

3) What is happening/not happening?
Nothing works right …
Turning ON the Bathroom light turns ON the fan as well
Fan turned ON even when light was OFF
Light changes did not apply at all
Timer was always stuck to 45min

I tried to do all this within the one piston
Would it make more sense to create several individual pistons instead?

Switching from CoRe and webCoRe sure feels very complicated :innocent:

Thanks


#2

Personally I’d always reccomend using a humidity sensor to run a bathroom fan.

IF
humidity is greater than x
THEN
turn on fan
ELSE
wait 10 minutes
turn off fan


#3

Thanks for reply Robin, I already have shower door with contacts so would like to use that for now.
I have included pic of my failed attempt :slight_smile:


#4

Changing level will also always turn on the light… that’s just how ST works.

You also have the fan being turned on in the second part of the piston, so turnig the light on with the door open would turn on the fan.

I’ll see if I can knock something up… but assuming you switch the light off when you leave the room… they will then need to turn on, set level and turn straight back off again.


#5

Once again, thanks for the help!
So from now on I don’t have to use the turn ON command before setting light level? Does the same apply when fading the light to OFF state? Do you think it would be easier to create separate pistons for light and fan?


#6

I haven’t tested it but this should work:


#7

Many thanks! Looking forward to test it and learn from this.
THANKS!


#8

So, it is almost working
The only portion that doesn’t work is the dimming back to 75% after opening the shower door
this is small detail but the interesting part now, the door open timer count down starts counting down 7 minutes instead of 10, weird since in the code is clearly 10 :scream: :grinning:

This is so much fun, looking forward to learn it.


#9

I can’t see your 7 minute problem in the trace… getting 10 minutes and 45 minutes correctly.

I did however see an issue with the set level followed by off command though, wasn’t working in my virtual environment.

Also, I didn’t realise you wanted the lights to return to 75% when opening the shower door… seems like an odd time to do that safety wise.

Anyway… try this:


#10

Robin, still no go, now the light just blinks instead of dimming to full or back to 75.
Timer is 7 instead of 10 and the other 42 instead of 45, we must have some gremlins in the house :slight_smile:
Already verified there is no other apps or core pistons controlling this light and fan.


#11

No idea what’s going on there… thoroughly tested on my end and works perfectly.

Maybe rebuild the data cache in WC app settings (in the ST app)


#12

Thanks, will try that


#13

I guess it’s always possible the light you are using doesn’t like the ‘If already on’ part… cant imagine why though??

Try this:


#14

Will try, in meantime after your last advice timers are counting properly, but lights are still confused. Sorry to bother you like that, but I appreciate your time helping me very much !


#15

Well, timers are back to 7 and 42 (I know how to fix that now ) On initial door closing light goes to 100% but when the door opens it just blinks once but it will stay that way.
Not complaining, just reporting back :slightly_smiling_face:


#16

What device is the light?

What device handler are you using?

Can you test it with a different light type?


#17

It’s regular very common GE dimmer 12724, I can try tomorrow with Linear dimmer if it makes any difference. Will report back.
Thanks


#18

There’s something wrong with the handler you are using… it’s telling webCoRE that it’s a ‘white bulb’ instead of a dimmer.


#19

Strange, I have about 20 of them all over the house and they all work fine using ST apps and in CoRe. They were all properly IDd when first installed using the ST.
Just checked in the IDE and it’s correct handler
Name
GE In-Wall Smart Dimmer
manufacturer: Jasco Products

Reached 13 replies limit for newbie so I’ll add it here

Yeah, just tested quickly with same GE dimmer using this simple webCoRe script and it’s working fine.


#20

can you post logs of the problem piston