Xiaomiβs light sensors are some of the most popular smart home automation devices, allowing you to customize your lights, blinds, or climate control scenarios based on natural light levels. But many users have difficulty connecting for the first time: the device doesnβt detect in the app, shows incorrect data, or falls off after a few hours. In this article, weβll look at all the ways Xiaomiβs light sensors are connected (including MiJia Bluetooth, Aqara, and Mi Home Zigbee models), typical errors and hidden settings that arenβt mentioned in the official instructions.
The feature of these sensors is that they work on different protocols: Bluetooth Low Energy (BLE), Zigbee or Zigbee 3.0 (depending on the model) means there is no one-size-fits-all connection: each version requires a different approach, and weβll look at all options, including integration with Home Assistant for advanced users. If youβre just starting out with a smart home, start with a basic connection through Mi Home. If you already have experience, go to the Aqara Hub sections or go to the Aqara Hub sections. Zigbee2MQTT.
Important: Before connecting, check the compatibility of your sensor with the hub. for example, Xiaomi MiJia BLE It will not work with Aqara Hub. M2, Aqara Light Sensor T1 requires a hub firmware not lower v1.4.6. These nuances often cause failures.
1. What light sensors Xiaomi are and how they differ
Xiaomi and its sub-brand Aqara are launching several light sensors that are not only designed, but also communicate, measure accuracy and compatibility with smart home systems, and are the main options that will be available in 2026:
- π± MiJia Bluetooth Light Sensor (WXCJ01YL) β work BLE 5.0, connects directly to a smartphone or Mi Bluetooth Gateway. Suitable for simple scenarios, but has a limited range (up to 10 m).
- πΈοΈ Aqara Light Sensor (Zigbee) (GZCGQ01LM) β It uses Zigbee 3.0, requires a hub (Aqara Hub or Mi Home Gateway). BLE-version, but depends on the quality of the Zigbee network.
- π Aqara Light Sensor T1 (GZCGQ11LM) β Updated model with improved accuracy (range 0-100,000 lux) and support for Apple HomeKit. Compatible only with Aqara hubs (not working with the original gateways Xiaomi).
- π Mi Home Zigbee Light Sensor (DJT11LM) β It's an outdated model, but it's still available, it only works with the Mi Home Gateway 3, and it's got low accuracy in bright light.
Critical nuance: sensors on Zigbee can not work without a hub, and BLE-The versions lose communication if the smartphone or gateway is out of range. If you want maximum stability, choose Aqara. T1 hub-to-shore M2. MiJia is suitable for testing or temporary solutions BLE.
| Model | Protocol | Required hub | Measurement range (lux) | Compatibility with HomeKit |
|---|---|---|---|---|
| MiJia BLE (WXCJ01YL) | Bluetooth 5.0 | Mi Bluetooth Gateway or Smartphone | 0β32 000 | β No. |
| Aqara Zigbee (GZCGQ01LM) | Zigbee 3.0 | Aqara Hub / Mi Home Gateway | 0β50 000 | β No. |
| Aqara T1 (GZCGQ11LM) | Zigbee 3.0 | Aqara Hub M1S/M2/E1 | 0β100 000 | β Yes. |
| Mi Home Zigbee (DJT11LM) | Zigbee | Mi Home Gateway 3 | 0β30 000 | β No. |
If you're planning to use a sensor on your Home Assistant system, look for protocol support. BLE It can be integrated only through BLE Proxy (e.g., based on the ESP32), Aqara Zigbee - through Zigbee2MQTT or ZHA.
Preparation for connection: what to do before installation
Before you connect the sensor, follow a few mandatory steps, which will help avoid errors, such as the inability to add the device or incorrect readings.
Make sure the sensor is charged (battery or battery)
Check the compatibility of the hub and sensor
Update the Hub firmware to the latest version
Install the Mi Home or Aqara app
Set up the region in the app to "China" (for some models)
-->
The first thing you need to do is check the battery power. Many sensors (like Aqara) T1) They come with a protective film on the battery contacts, and if you don't remove it, it won't turn on. BLE) Make sure the charge level is at least 20% β otherwise the connection may be interrupted.
Second, update the firmware of the hub, and outdated software often causes failures. M2 firmware v1.4.6 It doesn't recognize Aqara. T1. Update is performed in the appendix: Profile β Hub settings β Update of the PO.
β οΈ Note: If you use Mi Home Gateway 3, turn off all other Zigbee devices for 5 minutes before connecting the sensor.This hub has a limit on the number of devices that are simultaneously connected (maximum 3 in the process of adding).
The third step is to set up the region in the application. Some sensors (e.g. MiJia) BLE) They are not officially supported in the Russian region of Mi Home:
- Go to Profile β Settings β Region.
- Choose China (China).
- Restart the app.
After the connection, the region can be returned.
If you plan to use a sensor with Home Assistant, prepare in advance:
- π Zigbee2MQTT or ZHA for Zigbee devices;
- π BLE Proxy (e.g. on the ESP32) for BLE-sensor;
- π Xiaomi plugin BLE or Aqara in HA.
π‘
If Xiaomiβs light sensor isnβt added the first time, try resetting it to factory settings. To do this, hold the button on the device for 10-15 seconds until the indicator flashes yellow (for Zigbee) or blue (for Zigbee) BLE).
3. Connecting the light sensor Xiaomi via Mi Home (Step-by-step)
The easiest way to connect is through the official Mi Home app, which is suitable for most models except the Aqara. T1 (You need to use the Aqara Home app to do this. Let's take MiJia. BLE (WXCJ01YL) Aqara Zigbee (GZCGQ01LM).
3.1. MiJia connection BLE (Bluetooth)
This model doesn't require a hub -- it communicates directly with a smartphone or Mi Bluetooth Gateway.
- Open Mi Home and go to Devices β Add the device (+).
- Select the Sensor category, then the Light Sensor category.
- Remove the protective film from the sensor battery (if any) and wait until the blue light flashes.
- Click Next in the app and wait for the device to be found. If the sensor is not located, bring it closer to the smartphone (up to 1 m).
- After successful connection, assign the sensor a room and a name (for example, "Lighting room").
If no sensor is added:
- π Check the battery charge (should be) >20%).
- π± Restart Bluetooth on your smartphone.
- π Change the region in Mi Home to China.
3.2.Aqara Zigbee connection via hub
For sensors on Zigbee (e.g, GZCGQ01LM) You need a hub (Aqara Hub or Mi Home Gateway:
- Connect the hub to the power and wait until it lights up blue (ready to add devices).
- At Mi Home, go to Devices β Add the device β Through the lock.
- Choose your hub from the list.
- Press and hold the button on the sensor for 5 seconds until the indicator starts flashing yellow.
- In the application, select the Light Sensor and wait for the process to be completed (up to 30 seconds).
β οΈ Note: If the Mi Home Gateway 3 hub is already connected to 30+ In this case, temporarily disable several devices or use a second hub.
After connecting, check the sensor readings in real time: Device β Lighting β If the values are not updated, restart the hub (turn off power for 10 seconds).
π‘
For stable Zigbee sensors, place a hub in the center of the house and avoid interference from Wi-Fi routers (use 11-14 channels for Zigbee if the router is running at 2.4 GHz).
4. Connection via Aqara Home for models T1 and new sensors)
Aqara series sensors T1 (for example, GZCGQ11LM) They don't support Mi Home. They need to use the Aqara Home app. It's a similar process, but there are nuances:
- Download Aqara Home from the App Store or Google Play.
- Create an account or sign in through Mi Account.
- Add a hub (Aqara Hub) M2 or other compatible).
- Go to Add the device β Sensors. β Light sensor.
- Activate the pairing mode on the sensor (hold the 5 seconds button).
- Wait for the process to be completed and assign a room to the sensor.
Features of Aqara Home:
- π Support for Apple HomeKit (you can sync with iPhone).
- π More detailed lighting schedules (by time of day).
- π οΈ The ability to configure automatic scripts without using Mi Home.
If no sensor is added:
- π Check that the hub is connected to the Internet (without cloud synchronization, the addition is impossible).
- π± Update the Aqara Home app to the latest version.
- π Try resetting the sensor (hold the 10 seconds button until flashing red).
What if Aqara Home doesnβt see the hub?
5. Integration with Home Assistant: for advanced users
If you are using Home Assistant (HA), Xiaomi light sensors can be connected via Zigbee2MQTT, ZHA or BLE Proxy. Let's look at every option.
Connecting Zigbee sensors (Aqara, Mi Home)
To work with Zigbee, you will need:
- π USB Zigbee adapter (recommended) CC2531, CC2652 or Sonoff ZBDongle-E);
- π Established Zigbee2MQTT or ZHA into HA;
- π Xiaomi Hub (optional if you use it as a coordinator).
Instructions for Zigbee2MQTT:
- Connect the Zigbee adapter to the server HA (For example, Raspberry Pi).
- Add integration Zigbee2MQTT through settings β Devices and services β Add integration.
- In the configuration file configuration.yaml specify the path to the adapter: zha: usb_path: /dev/ttyACM0 database_path: /config/zigbee.db
- Reset it. HA.
- Activate the coupling mode in Zigbee2MQTT and press the button on the sensor.
After connecting, the sensor will appear in Settings β Devices. His data can be used in automations, for example, to turn on lights in lights below 50 lux:
automation:
- alias: "Switch on the light in the dark"
trigger:
platform: numeric_state
entity_id: sensor.aqara_light_illuminance
below: 50
action:
service: light.turn_on
target:
entity_id: light.living_room5.2. Connection BLE-sensors (MiJia) BLE)
For MiJia. BLE need BLE Proxy (e.g., based on the ESP32 It's an algorithm with ESPHome:
- Please. ESP32 ESPHome firmware with support BLE.
- Add to the ESPHome configuration a scanning setting BLE: esp32_ble_tracker: scan_parameters: interval: 1100ms window: 1100ms active: true
- In Home Assistant, add ESPHome integration.
- Configure the sensor in configuration.yaml: sensor: - platform: xiaomi_ble mac_address:"XX:XX:XX:XX:XX:XX" # MAC-Illuminance sensor address: "Xiaomi Light Sensor Illuminance"
β οΈ Attention: BLE-sensors consume a lot of energy in frequent surveys. To prevent the battery from running down in a day, set the scan interval no more than 1 time in 5 minutes.
Typical errors and their solutions
Even with the right connection, Xiaomiβs light sensors may not work properly, and here are the most common problems and ways to fix them:
| Problem. | Possible cause | Decision |
|---|---|---|
| Sensor not added to the app | Hub and sensor incompatibility | Check the models in the compatibility table above |
| Lighting indications not updated | Weak signal. Zigbee/BLE | Move the hub closer to the sensor or add a repeater (like the Aqara Wall Switch) |
| The sensor shuts down in a few hours. | Energy-saving hub mode | Turn off sleep mode in the hub settings (Settings) β Mode of work β Always active) |
| Incorrect values (for example, 0 lux in the day) | Sensor pollution or direct sunlight | Wipe the sensor with a dry cloth and place the sensor in the shade |
| The sensor does not work after the firmware update | Firmware failure | Reset the sensor to factory settings (hold the 15 sec button) |
If the sensor shows inflated values (for example, 50,000 lux in a room), it is likely to receive direct sunlight.
- π€οΈ At a distance of 1-2 m from the window;
- πΌοΈ At an altitude of 1.5-2 m from the floor;
- π« Not near heat sources (batteries, lamps).
It is also important for Zigbee sensors to avoid interference from other devices at 2.4 GHz (Wi-Fi routers, microwaves).
- Change the Zigbee channel in the hub settings (optimally 11, 14 or 20).
- Add repeaters to the network (such as Aqara Smart Plug).
- Update the sensor firmware via Mi Home or Zigbee2MQTT.
7. Examples of automation with a light sensor
The main advantage of the light sensor is that it can create smart scripts, and here are some useful examples for different systems:
7.1. lights on when darkness comes (Mi Home)
At the Mi Home appendix:
- Go to Automation. β Create β Smart script.
- Select condition: Lighting < 50 lux.
- Add the action: Turn on the lamp [name].
- Save the script.
To ensure that the script only works at a specific time (e.g. 18:00 to 23:00), add an additional time condition.
Automatic closing of curtains (Aqara Home)
In Aqara Home, you can configure the closing of the curtains in bright sun:
- Create automation: Automation β Add β Smart script.
- Condition: Lighting > 30,000 lux.
- The action: Close the curtains [name].
- Add a 5 minute delay to avoid frequent triggers.
Advanced Automation in Home Assistant
In Home Assistant, you can create complex scenarios with multiple conditions, such as turning on the lights only when someone is at home and it's dark outside:
automation:
Alias: Smart lighting by sensor and presence
trigger:
platform: numeric_state
entity_id: sensor.aqara_light_illuminance
below: 30
condition:
- condition: state
entity_id: binary_sensor.motion_living_room
state:"on"
- condition: state
entity_id: person.user
state:"home"
action:
service: light.turn_on
target:
entity_id: light.ceiling
data:
brightness_pct: 70Additional ideas for automation:
- π Dawn simulation: Slowly turning on lights 30 minutes before the alarm clock if the room is dark.
- πΏ Plant care: Alert if illumination is below normal for indoor flowers.
- π¦ Energy savings: Turn off outdoor lighting if the sensor on the street shows >1,000 lux.