If you've ever wondered how to make lighting in your home really smart -- automatically turn on at dusk or adjust the brightness of lights depending on the time of day, Xiaomi's light sensor will be your key to such a system. This compact device, often underrated by louder gadgets like robot vacuum cleaners or cameras, actually plays a critical role in building a full-fledged smart home ecosystem.
In this article, we will look at what Xiaomiβs light sensor is, how it interacts with other devices of the brand (for example, with Xiaomi Mi Smart). LED Bulb or Aqara Hub, and why buying it might be more useful than it seems, youβll learn about the specifications, the nuances of the installation, and how to avoid the typical mistakes when setting up automation scenarios. We will pay special attention to compatibility with various hubs and platforms - from Mi Home to Home Assistant.
What is Xiaomi Lighting Sensor and Why You Need It
Xiaomiβs light sensor (or photorelay) is a miniature device that measures ambient light levels and transmits data to a smart home system, and its primary purpose is to serve as a trigger for automating lighting, curtains, climate control and other devices depending on the time of day or weather conditions.
For example, it can:
- π Turn on street lights at sunset and turn off at dawn.
- π‘ Adjust the brightness of smart lamps in the room depending on natural light.
- π Automatically close the curtains if the sun is too bright.
- π Optimize energy consumption by turning off unnecessary lighting during the day.
Xiaomi has several models of such sensors, but the most popular two are: Xiaomi MiJia Smart Light Sensor (for internal use) and Aqara Light Sensor (with advanced features and support for Zigbee 3.0). Both models work in tandem with Mi Home or Aqara hubs, but have differences in measurement accuracy and compatibility with third platforms.
Technical specifications and configuration
Before you buy a sensor, it is important to understand whether it is suitable for your tasks (LLKZMK11LM) β One of the most functional in the lineup.
| Parameter | Meaning |
|---|---|
| Type of connection | Zigbee 3.0 (requires Aqara or Mi Home hub) |
| Measurement range of illumination | 0.1 lux to 100,000 lux |
| Accuracy of measurements | Β±10% (at a temperature of 0-50)Β°C) |
| Nutrition | Battery CR2450 (service life of up to 2 years) |
| Sizes. | 43 Γ 43 Γ 11 mm |
Complete with the sensor usually comes with:
- π¦ The sensor itself with a double-sided scotch attachment.
- π Battery CR2450 (Sometimes you need to buy separately).
- π Short instructions in Chinese/English.
- π§ Fixed screw (for alternative installation).
Important: Xiaomiβs light sensors donβt work directly over Wi-Fi β they require an intermediate hub (e.g., Xiaomi Mi Smart Home Hub or Aqara Hub). M2). Without a hub, the device would be a useless "brick." This is a common mistake of beginners who buy a sensor without checking compatibility.
β οΈ Note: If you use a sensor outside (for example, to control garden lighting), make sure the model has moisture protection. IP44 Most of Xiaomiβs internal sensors are not designed to be used in the rain.
How to connect a lighting sensor to a smart home system
The connection process depends on which hub and platform you use, and letβs look at two of the most popular options: the Mi Home app and the Home Assistant.
Connection via Mi Home (official method)
1. Install a Xiaomi or Aqara hub and connect it to the Mi Home (or Aqara Home) app.
2. insert the battery into the sensor and wait for the indicator to flash (usually blue or green).
3. In the app, go to the Devices section β Add the device β Sensors. β Light sensor.
4. Follow the instructions on the screen: the hub must find the sensor in range (up to 10-15 meters in the room).
Make sure the hub is on and connected to the network|Check the battery charge in the sensor|Place the sensor in the area of the hub (without obstacles)|Update the Hub firmware to the latest version-->
If the sensor is not located, try:
- π Restart the hub (disable power for 30 seconds).
- πΆ Move the sensor closer to the hub (walls and furniture can block the Zigbee signal).
- π Replace the battery (even if it is new, a factory defect is possible).
Integration with Home Assistant
For Home Assistant users, the process is more complex but more flexible:
1. Make sure your hub is Xiaomi/Aqara Connected to Home Assistant through integration ZHA or Zigbee2MQTT.
2 Add the sensor to the Zigbee network via the web integration interface.
In the configuration file configuration.yaml, specify automation. Example code for turning on lights in low light:
automation:
- alias: "Switch on the lights in the dark"
trigger:
platform: numeric_state
entity_id: sensor.aqara_light_sensor_illuminance
below: 50
action:
service: light.turn_on
target:
entity_id: light.living_room_lampβ οΈ Attention: When in use Zigbee2MQTT The sensor can display illumination in lux with a delay of up to 2-5 seconds. This is normal and due to the peculiarities of the protocol.
Where to place the light sensor
The efficiency of the sensor depends on the place of installation, and here are the key recommendations:
For the control of indoor lighting:
- πͺ Place the sensor on the wall next to the window, but not in direct sunlight (to avoid false positives).
- ποΈ Optimal height β 1.5-2 meters from the floor (at the level of the eyes of a sitting person).
- πͺ Avoid areas near heat sources (batteries, cookstoves) as this may distort readings.
For street lighting:
- π³ Install the sensor under a canopy or in a rain-protected place.
- π¦ Direct the sensor northward (in the northern hemisphere) to avoid direct sun at noon.
- π‘ Make sure the distance to the hub is less than 10-15 meters (for Zigbee without repeaters).
π‘
If the sensor is triggered too often due to fluctuations in light (for example, from passing cars), set the automation delay (delay) of 1-2 minutes.
An example of a bad placement: a sensor on a windowsill where the sun is shining directly, in which case it will detect sudden changes in light, which will lead to chaotic lights on/off, and optimally place it on the side wall, where the light is scattered.
Automation scenarios with light sensor
Now, the most interesting thing is how to use the sensor in practice, and here are some pre-made scenarios that you can configure in the Mi Home or Home Assistant.
1. Automatic control of street lighting
Logic: Turn on the lights when illumination is below 50 lux (twilight) and turn off when illumination is below 50 lux (twilight) >100 lux (dawn).
Devices: Illumination sensor + Smart socket (for example, Xiaomi Mi Smart Plug) with connected spotlights.
2. Adaptive lighting in the room
Logic: If the illumination drops below 200 lux, smart lamps (Yeelight or Mi) LED Bulb) smoothly increase the brightness to 70%.
Additionally: You can add a motion sensor so that the lights are turned on only when there are people in the room.
3. Protection of furniture from burnout
Logic: If the light is above 50,000 lux (straight sun), the Aqara Curtain Motor will automatically close.
4. Energy saving in the office
Turn off decorative lighting if natural light is sufficient (>300 lux).
To set up in Mi Home:
- Open the Automation tab β Create β Smart script.
- Select the trigger: Light sensor β Lighting < [significance].
- Add an action (e.g., Turn on the lamp).
- Save the script and test by covering the sensor with your hand (light will drop).
How to check the current light in real time?
Compatibility with other devices and platforms
One of the key advantages of Xiaomi sensors is their compatibility with a wide range of devices.
Official Mi Ecosystem Home/Aqara
Light sensors work with all devices that support automation in Mi Home or Aqara Home, including:
- π‘ Smart lamps: Yeelight, Mi LED Bulb, Philips Hue (via Home Assistant).
- π Smart outlets: Xiaomi Mi Smart Plug, Aqara Wall Outlet.
- π Hubs and gateways: Mi Smart Home Hub, Aqara Hub M2, Aqara Camera Hub G2H.
Third-party platforms
Through Home Assistant or ioBroker, the sensor can be integrated with:
- π€ Google Assistant (via Nabu Casa Cloud Service).
- π Apple HomeKit (using the homebridge plugin).
- π IFTTT (webhook).
| Platform | Support | Limitations |
|---|---|---|
| Mi Home | Complete. | No support for complex conditions (e.g., "OR") |
| Home Assistant | Complete. | Requires settings for Zigbee integration |
| Apple HomeKit | Partial | You need to use Homebridge or Aqara Hub with HomeKit firmware |
| Google Assistant | Partial | It only works with Home Assistant with Nabu Casa. |
β οΈ Note: When using the sensor with HomeKit through the Aqara Hub, you may experience a delay of up to 10 seconds in the update state.
Typical problems and their solutions
Even with a device as simple as a light sensor, users are struggling.
1.The sensor doesn't connect to the hub
Causes and solutions:
- π Battery discharged: Replace with a new one CR2450 (Even if the sensor is new, the battery could be discharged during storage).
- πΆ Zigbee weak signal: Move the hub closer or add a repeater (like Aqara smart socket).
- π Channel conflict: If you have a lot of 2.4GHz Wi-Fi networks, they can interfere with Zigbee.Try changing the channel on the hub.
2. False positives
Causes and solutions:
- π€οΈ Direct sunlight: Move the sensor to a place with diffuse lighting.
- π External light sources: Set up the delay in automation (e.g. 5 minutes).
- π Wrong thresholds: Experiment with light values. 30 to 100 lux are usually used for the street, 100 to 300 lux for the room.
3. The sensor is showing incorrect values.
Causes and solutions:
- π§Ή Sensor pollution: Wipe the sensor lens with soft cloth.
- π‘οΈ Extreme temperatures: Xiaomi sensors are stable at 0-50Β°C. In cold or heat, accuracy drops.
- π§ Fault: If the sensor shows 0 lux in bright light, contact support - factory defect is possible.
π‘
Before setting up automations, check the current light values at different times of the day, which will help you choose the right thresholds for triggers.