Driver for xiaomi light sensor

I have a xiaomi mijia smart home light sensor which I inherited from my ST. I was wondering how can I integrate it with HE? My understanding is that xiaomi light sensor is not supported by HE, bit there is a community driver? I found one here but is it the right one? I cannot figure out anything from the device - it is in chinese, but it seems that it does not work. Any advice?

Can you get it to pair with your HE hub?
Try this:

  1. Pair the device with HE. After having put HE in Discovery Mode, press the button on the sensor for 5 seconds. If it doesn't pair, try again. Holding for over 10 seconds will reset the device.

Here's a couple threads that may help.

1 Like

I did pair it. Before I installed it I downloaded the driver I mentioned before and apparently the driver found Xiaomi device. I looked at the device and it seems kind of connected, Present is present, but there is no lux in Current State.

BTW according to " How to Install Custom Drivers" -> "Loading your custom driver" tells me that I need to Add Virtual Device. I have no such button on my device screen. All I have is Add Device, but somehow the driver found my device by its own, Weird.

Same thing happened to me way back..
Had to do steps 5 -> 4 more than once to get everything working.
Also you can try step 2 again if you can't get it to fully pair, just don't delete it from your hub and it will re-use your driver/settings.
Then, a few months later one dropped off and after failing to re-pair a few times I switched to the driver in the other thread and it's been fine since.
When it's properly connected to the hub a single press of the button should result in three quick flashes of it's led.

Installation

  1. Make sure you have a good and stable Zigbee Mesh .
  2. Install the driver from here . There are general instruction here .
  3. Pair the device with HE. After having put HE in Discovery Mode, press the button on the sensor for 5 seconds. If it doesn't pair, try again. Holding for over 10 seconds will reset the device.
  4. Once the device is installed, go to the device page.
  5. Double-click the device button (on the device), then WAIT a few seconds, if battery status appear, then wait a bit longer for illuminance to display under Current States. Cover the device with your hand for a few seconds to generate a change.
  6. If illuminance doesn't show and about 20 seconds has passed, go back to step 4.
  7. You should now have a working devices. If you change "Minimum Update Time" you need to double click the device button a few times after saving that preference change.
1 Like

My experience is the same as @Ranchitat's. Reset the sensor and pair it again - very close to the hub (like no more than 1 foot away). Keep the sensor active during pairing. It takes a while to be provisioned. Also, @chirpy's driver is simpler than the other one. So I recommend using it.

1 Like

Now it works. I paired it again and connected with the simplified driver. Thank you

1 Like