Xiaomi Motion Sensor for Toilet
Common issues and solutions for using Xiaomi motion sensors to control lighting in the toilet are as follows:

I. Issues with Conventional Solutions
When using two Xiaomi Human Body Sensors 2 (one at the entrance to detect entry and exit, and one inside to detect movement), there are detection blind spots. When a person remains stationary inside the toilet (e.g., while using the toilet or washing up), the internal sensor may fail to detect movement and incorrectly assume that no one is present, causing the lights to turn off. Additionally, the installation position of the sensors (e.g., height, angle) or environmental interference (e.g., steam, reflective objects) may also affect detection accuracy, leading to situations where people are not detected.
II. Innovative Solutions
Combination of Photoelectric Switch, Small Light Bead, and Door Magnet
- Principle: The photoelectric switch is installed above the toilet and in the sink area. When a person blocks the light, it triggers the small light bead to turn on; the door magnet is placed below the small light bead and transmits signals by detecting changes in ambient light; combined with data from the human body sensor, more precise lighting control is achieved.
- Advantages: The photoelectric switch can detect stationary humans, compensating for the shortcomings of motion sensors; the door magnet serves as an auxiliary signal source, improving system stability.
- Limitations: Additional equipment installation is required, and wiring is more complex, making it suitable for users with strong hands-on skills.
Alternative Solution Using Door and Window Sensors
- Principle: Discard the human body sensor and directly use Xiaomi door and window sensors to detect the opening and closing status of the door. Set up automation rules through the Mi Home app: when the door opens, trigger the lights to turn on; when the door closes, delay turning off the lights (e.g., after 5 minutes).
- Advantages: No need to detect human movement, completely avoiding the issue of static misjudgment; installation is simple and cost-effective.
- Limitations: It cannot distinguish between scenarios such as 'a person enters but does not close the door' or 'briefly opens the door to retrieve items', requiring delay settings to balance convenience and energy consumption.
III. Optimization Suggestions
- Adjust Sensor Parameters: In the Mi Home app, extend the 'no-person detection time' of the human body sensor (e.g., from 2 minutes to 5 minutes) to reduce the probability of incorrect light turning off.
- Combine Sensors: Link the human body sensor with the door and window sensor, for example, turn on the lights when 'the door opens + human movement is detected', and turn off the lights when 'the door closes and no human movement is detected', improving reliability.
- Avoid Interference Sources: Keep away from steam sources (e.g., shower area) and reflective objects (e.g., mirrors) to ensure that the sensor's detection surface is unobstructed.
By implementing the above solutions, the stability of toilet lighting control can be significantly improved, and users can choose the most suitable method based on their actual needs.




