Jump to content
  • 0

Switching the system ON only when person is inside the room


Question

Hi

 

I want to implement a bathroom which switches lights only when a person is present inside.

 

And it will OFF the system when no body is there.

 

Can Anyone help me how to do this

Link to post
Share on other sites

14 answers to this question

Recommended Posts

  • 0
On 4. 2. 2017 at 11:09 AM, moosairshad said:

Hi

 

I want to implement a bathroom which switches lights only when a person is present inside.

 

And it will OFF the system when no body is there.

 

Can Anyone help me how to do this

 

Maybe you could tie it in with motion sensor (altho that body will have to be animated, which i imagine might be problem when relaxing in bath),

Another posibility would be using door mounted sensor and some scenes (you would open door and close them once to activate, and untill it gets clsoed again it would react?).

 

What do you imagine as effective method of detecting presence within room?

Do you have annything that has binary output that could help? (for example if you find preassure detecting pads with binary output you might get decent detection method for this pourpouse).

Actually most anny Binary output device could be used for this (via Binary sensor), what you have to decide is method of detection and how complicated you want it to be.

What type(s) of light you are trying to controll? This leads into method of controlling it by: Relay Switch, Dimmer (potencially with bypass), RGBW module. This is quite essenciall for you knwo the actuall doing something part .)

 

 

Example with FGMS (motion sensor):

installing one or two of those (depending on complexity of room),

they would use virtual button to allow or directly do turn on lights.

 

complications with this solution:

you would need watterproof (like really good one) PIR or some way to waterproofing them,

specifically Fibaro motion detectors are unable to sustain state of alarm by themselves, you'd need to keep on moving - or set some reasonible timer (10 minutes maybe?) for lights to turn off within scene/paremeters of the PIR.

Fibaro ones are battery powered - you'd need to find good balance between sensitivity and functionality that might take few tries and batteries. In addition your waterproof solution would have to allow for repeated access to the PIR in order to replace batteries. (Fibaro PIR is not watterproof).

 

the positives:

it gives fairly good idea of somone being in room,

instalation would not be that difficult,

scene for this can be done in block scenes easily,

 

Link to post
Share on other sites
  • 0

Hi @moosairshad,

 

I use one Fibaro motion sensor with default settings and one Fibaro door/window sensor with Very Smart Lights™ scene.

1) When I enter bathroom and motion sensor detect movement lights turn on. If I stay there for shorter time then lights turn off after I leave bathroom and no more motion is detected.

2) If I enter bathroom and close door then door/window sensor keeps lights turned on until door is opened again and there is no more motion in the bathroom. Light in this case will not turn off if I sit still on toilet seat, having shower or lying in bathtub.

3) If I stay longer in the bathroom then after 5 minutes fan start running. (if starts only on humidity then smell stays in the bathroom. Other scene takes care to turn it off).

4) If I leave bathroom and close door then I can turn off light by pressing switch so that it doesn't stay on due to door closed.

5) Bathroom light brightness is determined by settings in scene and can change according to time of day or some other situations like guests present, etc.

6) If there is enough light during day time then light stay off even there is movement in the bathroom.

 

 

Link to post
Share on other sites
  • 0
On 2/4/2017 at 11:09 AM, moosairshad said:

Hi

 

I want to implement a bathroom which switches lights only when a person is present inside.

 

And it will OFF the system when no body is there.

 

Can Anyone help me how to do this

 

with only one door sensor (no motion sensor needed) please @Kuba13 and @Sankotronic have a look if you see a bug :-)

starting status:

----------------

door closed

light off

variable PRESENCE=OFF

variable DOORCHECK=0

----------------

SCENE 1:

If door=breached and PRESENCE=OFF and DOORCHECK=0 then light on and PRESENCE=IN

 

SCENE 2:

If door=closed and PRESENCE=IN then DOORCHECK=1

 

SCENE 3:

If door=breached and PRESENCE=IN and DOORCHECK=1 then PRESENCE=OFF

 

SCENE 4:

If door=closed and PRESENCE=OFF then light off and DOORCHECK=0

Edited by Flowy
Link to post
Share on other sites
  • 0
18 minutes ago, Flowy said:

 

with only one door sensor (no motion sensor needed) please @Kuba13 and @Sankotronic have a look if you see a bug :-)

starting status:

----------------

door closed

light off

variable PRESENCE=OFF

variable DOORCHECK=0

----------------

SCENE 1:

If door=breached and PRESENCE=OFF and DOORCHECK=0 then light on and PRESENCE=IN

 

SCENE 2:

If door=closed and PRESENCE=IN then DOORCHECK=1

 

SCENE 3:

If door=breached and PRESENCE=IN and DOORCHECK=1 then PRESENCE=OFF

 

SCENE 4:

If door=closed and PRESENCE=OFF then light off and DOORCHECK=0

 

Just to organise my mind:

Variables

so PRESENCE has 2 states:

off

in

 

DOOECHECK allso has 2 states:

0

1

 

They might  be done in predefined variable, which is good.

 

DOORCHECK value changess based upon state of FGK i pressume.

How do you change state of PRESENCE variable? Is that some sort of door opening counter rather than what i pressumed (a predefined varialbe)?

Link to post
Share on other sites
  • 0
57 minutes ago, Flowy said:

 

with only one door sensor (no motion sensor needed) please @Kuba13 and @Sankotronic have a look if you see a bug :-)

starting status:

----------------

door closed

light off

variable PRESENCE=OFF

variable DOORCHECK=0

----------------

SCENE 1:

If door=breached and PRESENCE=OFF and DOORCHECK=0 then light on and PRESENCE=IN

 

SCENE 2:

If door=closed and PRESENCE=IN then DOORCHECK=1

 

SCENE 3:

If door=breached and PRESENCE=IN and DOORCHECK=1 then PRESENCE=OFF

 

SCENE 4:

If door=closed and PRESENCE=OFF then light off and DOORCHECK=0

 

Hi @Flowy,

 

This could work but there are situations not covered with this solution. For example, if you are inside with lights on so PRESENCE=IN and DOORCHECK=1 and then somebody open door not knowing you are inside and then closing door again which will result with you left in darkness. Or you exit bathroom and leave door ajar so that door sensor stay breached which will result in PRESENCE=OFF and DOORCHECK=1.

 

This solution forces you to always repeat same sequence with doors and that is not practical in real life. Motion sensor can be omitted in some cases for some rooms that are not used often but for the rest it is still better to use motion sensor and some other way of keeping lights on like other sensor or power metering with smart plug or global variable which value is conveniently set to keep lights on.

 

Link to post
Share on other sites
  • 0
3 hours ago, Sankotronic said:

 

Hi @Flowy,

 

This could work but there are situations not covered with this solution. For example, if you are inside with lights on so PRESENCE=IN and DOORCHECK=1 and then somebody open door not knowing you are inside and then closing door again which will result with you left in darkness. Or you exit bathroom and leave door ajar so that door sensor stay breached which will result in PRESENCE=OFF and DOORCHECK=1.

 

This solution forces you to always repeat same sequence with doors and that is not practical in real life. Motion sensor can be omitted in some cases for some rooms that are not used often but for the rest it is still better to use motion sensor and some other way of keeping lights on like other sensor or power metering with smart plug or global variable which value is conveniently set to keep lights on.

 

The best way is to use BOTH a door sensor and a motion sensor.

Use @Sankotronic very smart lights to turn the lights on, either triggered device (door or motion) will start the scene, and because its rare to leave the bathroom door OPEN when you are in it, and you can set it to keep the lights on whilst you are there its fine..

additionally, I have altered @Sankotronics script to use the breach value of the sensor, so if you do leave the door open it doesn't matter, it will go off in the predefined amount of time.. (but I don't think its needed for bathrooms), I use it for other rooms that people fail to close the door in (lounge, study, dining room etc)...

Link to post
Share on other sites
  • 0
17 hours ago, Sankotronic said:

 

 if you are inside with lights on so PRESENCE=IN and DOORCHECK=1 and then somebody open door not knowing you are inside and then closing door again which will result with you left in darkness.

 

ahahah you are right...lock the door with the key when you are in! :-D 

 

@Kuba13 the PRESENCE variable is set IN or OFF by the scene1 and scene3

 

Thanks guys for the logical analysis, anyhow I believe that domotics is a value, but creating a crazy piece of software just to not click a light button in a room is just useless....unless you miss the fingers (but how would you open the door? :-o)

Link to post
Share on other sites
  • 0
22 minutes ago, Flowy said:

 

ahahah you are right...lock the door with the key when you are in! :-D 

 

@Kuba13 the PRESENCE variable is set IN or OFF by the scene1 and scene3

 

Thanks guys for the logical analysis, anyhow I believe that domotics is a value, but creating a crazy piece of software just to not click a light button in a room is just useless....unless you miss the fingers (but how would you open the door? :-o)

 

how you ask?

its so simple snakes can do it!

 

But i digress, there needs to be something that will detect presence in room (as mentioend in my early post) that would ensure mere act of opening(or one cycle of opening and closing) doors is not going to light up the room.

Knowing myselve i'd just barge in, only to realise that i forgot what i was going to do there and left (doing single cycle - leaving room lit up). motion sensor seems most sensible out of all the solutions avalible (altho i'd LOVE preassure pads, because its fancy concealed tech), alas it comes with few problems of its own.

 

Best i can guess the solution would take all that you did with your FGK + added condition that FGMS was triggeted, you'd have to ahve say 15 minutes delay on the off scene for cases when you sit on ceramic throne or relax in bath or something like that. But it is doable.

Link to post
Share on other sites
  • 0
Guest spazpeker

Whilst I have over 50 devices in my house, my hallways and bathrooms just have ocupency sensors in them, one of them is connected to a dual relay to override if you want just candles round the bath and the light off

Link to post
Share on other sites
  • 0
2 hours ago, Flowy said:

 

ahahah you are right...lock the door with the key when you are in! :-D 

 

@Kuba13 the PRESENCE variable is set IN or OFF by the scene1 and scene3

 

Thanks guys for the logical analysis, anyhow I believe that domotics is a value, but creating a crazy piece of software just to not click a light button in a room is just useless....unless you miss the fingers (but how would you open the door? :-o)

 

@Flowy,

 

well if you look that way that light is all about just clicking the button then what you are actually looking for in this thread? It is still cheapest way not to have automation at all but just that switch or button on the wall :-)  But of course you are kidding because you know that lights are not just about pressing the button... ;-) 

 

Link to post
Share on other sites
  • 0
2 hours ago, Sankotronic said:

 

@Flowy,

 

well if you look that way that light is all about just clicking the button then what you are actually looking for in this thread? It is still cheapest way not to have automation at all but just that switch or button on the wall :-)  But of course you are kidding because you know that lights are not just about pressing the button... ;-) 

 

 

well I am here to try to help people, if I am able to, since other times I need help too.

My personal comment is that I probably see domotics/automation in a different way than others. Helping daily life but not replace it.

I see the need of heating controlling, cooling, alarming, smoke/gas/flood detection, switch on lights randomly when I am not at home for the thieves looking at my house, switch lights on in case of smoke at home or a thief entered in the night, ...

I am used in my business to always calculate the business value and the use case for a new feature or a new product/technology and in this small world of home automation creating a system to not click a button is simply not a needed use case for me. Obviously if people likes to play with it as a sort of technical challenge I see the point (it could also bee seen as a hobby and I like the idea too), everybody can invest 100 bucks for two sensors to also automatize the light in a room. A lot of years ago there were sensors to switch lights by clapping the hands in the bed (plenty of failures...). It was very funny to me because I had the switch beside my bed with zero failing.

I instead see a full use case when it is about people with disability. There I would love to help creating the best environment for their lives with all possible uses cases implemented.

Just my opinion ;-)

Link to post
Share on other sites
  • 0

thank you for your advices.. i am thinking to use a Motion sensor and Relay. That seems to be a good choice.

Link to post
Share on other sites
  • 0
On 2/16/2017 at 12:57 PM, Sankotronic said:

 

 

I use one Fibaro motion sensor with default settings and one Fibaro door/window sensor with Very Smart Lights™ scene.

1) When I enter bathroom and motion sensor detect movement lights turn on. If I stay there for shorter time then lights turn off after I leave bathroom and no more motion is detected.

2) If I enter bathroom and close door then door/window sensor keeps lights turned on until door is opened again and there is no more motion in the bathroom. Light in this case will not turn off if I sit still on toilet seat, having shower or lying in bathtub.

3) If I stay longer in the bathroom then after 5 minutes fan start running. (if starts only on humidity then smell stays in the bathroom. Other scene takes care to turn it off).

4) If I leave bathroom and close door then I can turn off light by pressing switch so that it doesn't stay on due to door closed.

5) Bathroom light brightness is determined by settings in scene and can change according to time of day or some other situations like guests present, etc.

6) If there is enough light during day time then light stay off even there is movement in the bathroom.

 

 

Hey @Sankotronic 

 

Is this still your setup for your bathroom?  I'm looking to implement something very similar and was wondering if you would share your code?

 

Thank you

Martyn

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...