I am looking for ideas how I can track the occupancy of my bathroom until some leaves the room.
For now I have a movement sensor inside bathroom looking to the door. If someone enters the bathroom it switches the light and an input boolean on so I know it is occupied. When leaving the room it triggers again and shuts light and input off.
That works as long as nobody leaves the door open, but that’s fine. My main problem is now, in the morning and evening when making ready for bed my wife enters the bathroom while I am in. So the motion sensor triggers and because light is on and input is true it thinks I leave the room and shuts off lights and input.
I am now looking for an idea/solution how I can tell home assistant only shut off light and input when all left the room who entered it before.
The is no phones or other devices to check, only human bodies.
Is it maybe possible to count how many people entered a room? Maybe with 2 motion sensors?
How much of the room can the PIR see at once? I would rather check for overall movement rather than trying to detect the amount of people in the bathroom.
If there is movement in the bathroom turn on the light. If there is no movement anymore for a couple of minutes, turn the light off.
To deal with the shower you could use a humidity sensor to detect a change in humidity.
Not sure how long you tend to sit on the toilet, but leaving the lights on for 10 minutes should do it in most cases, no?
Sometimes the good old light switch is just hard to beat.
I use a motion sensor to detect motion, but it can not see when someone is in the shower so the light would go out. So, I install a window/door senor on the door, when the door is closed the light will never go out, and when the door is open the light will go out after no motion is detected.
I do pretty much the same thing. I use a motion sensor to turn on the lights and a magnetic door sensor to keep the light on. If the door is open, turn off the light after 3 mins of no motion. If the door is closed don’t turn off the light.
The trick was finding a door sensor that reported being closed as well as open. Finally found some cheap 433mhz ones on banggood.
@skycryer… @Oliver_Baumgart is recommending a different product. It’s called “homematic IP”. Do a bit of Googling before responding so you can help us help you.
Your Fibaro Motion sensor, while a great sensor in general, uses PIR (Passive Infrared) to determine “motion”. It can’t tell the difference between you and your wife. It can’t see through walls. It can’t even see through the glass surrounding your shower.
You didn’t post your automation, so I can’t be sure. But, my guess is that you have your automation saying something like “when the motion starts (changes to “on”), if the input boolean is off, turn on the light and turn on the input boolean” and another that says "when the motion stops (changes to “off”), if the input boolean is on, turn off the light and turn off the input boolean.
This works fine if your home only has one person in it and you stay fairly active (moving around) when you’re in the bathroom or, when you’re sitting still (i.e. on the toilet) it’s in another room attached to the bathroom.
Or maybe you literally mean that your motion sensor is pointed at the door, and only the door. If that’s the case, this setup works fairly well as long as there is only one person in your house. With multiple people, again, it can’t tell the different between people.
The generally accepted method to handle this is to point the motion sensor at the entire room. When it changes to “on” you turn on the lights and such. When it changes to “off”, depending on how sensitive it is, you either turn the lights off, or you start a timer and when the timer elapses you turn off the lights. Using the timer allows you to get around the problem most motion sensors have that if you stand still for a few seconds, it detects no “movement” and would otherwise turn off your lights.
First, thanks for your good answer. I did not know that there is that kind of sensor available out there. But looks like that is exactly what I am looking for.
So I need the hub and this passage sensor. Then I can write home assistant automation with this infos from the sensor? I saw that Homematic components for HA are available.
@skycryer I use the counter component from Home assistant. The sensor “see” the direction where the person goes and trigger the automation. In the automation the counter-sensor count the person in the room. Easy to use.
alias: “Badezimmer Zähler (hoch)”
trigger:
platform: state
entity_id: sensor.000c5709ae6808_3_passage_counter_value
condition:
condition: and
action:
sensor.000c5709ae6808_2_passage_counter_value - Trigger when Person goes out
sensor.000c5709ae6808_3_passage_counter_value - Trigger when Person goes in
alias: “Badezimmer Zähler (runter)”
trigger:
platform: state
entity_id: sensor.000c5709ae6808_2_passage_counter_value
My best guess is that it’s a couple of curtain style PIR sensors and some logic to determine direction. If several people “pass” under the sensor at the same time in different directions, how does it do?
Sorry for the late reply. I am on vacation an have many offline times
Try to take only one user (Admin) with the correct password. Then (Important) check the Firewall Settings on the ccu3. HA needs the rights to get on the ccu3.
No problem, enjoy your holiday. You it working some days ago, now having multiple passage sensor working here. Thanks for the hint, was search for this kind of things only on wave up to your post.