NOTE: Xiaomi / Aqara Zigbee devices are NOT officially supported or guaranteed to work on HE, with that said, many users use them very successfully and without issues.
This is a driver for the Xiaomi Lux sensor, I received this device 3 days ago and wrote the driver the next day. As such, this is not well tested. It is however very close to feature complete. I release this earlier than I had planned since I see people are asking for a working driver.
Please report any issues in this thread.
CURRENT VERSION: v0.6.1.0501
- Make sure you have a good and stable Zigbee Mesh.
- Install the driver from here. There are general instruction here.
- 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.
- Once the device is installed, go to the device page.
- 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.
- If illuminance doesn't show and about 20 seconds has passed, go back to step 4.
- 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.
NOTE: Minimum update time DOESN'T mean you will get an update every X seconds, if the change is not significant there will be no update. For details of what significant means, read the code
If you have good ideas for feature requests, post them in the thread
This driver has been written from scratch and is NOT based on any other driver, some inspiration may have been derived from others, but the code is mine.
There is NO offset setting in the driver since these sensors really are not stable enough over their full range to be possible to calibrate with just an offset. For a usable calibration you would need a good reference measurement as well as something like a linear regression calibration algorithm. Not even this may yield good results, but if you have the instruments to calibrate this, let me know and we can see about that linear regression.
- "Your idea is stupid and slow and I don't like it" - Don't use the code
- "Your app/driver is crashing my Hub. I submitted a support ticket" - Don't do that, the fine folks at Hubitat Inc. do NOT maintain this code. This software is given free of charge with no support, implied or otherwise. I may still help...
- "The latest update broke it, FIX IT" - I do this for fun, please don't make it un-fun.
- "I have a great idea for a feature" - Go ahead and post it, I might get around to it...
- "You ignored my great idea" - See #2
- "I hate you for getting my hopes up, your app/driver is awful/buggy/stupid" - Ok, please write a better one so I can use it
- "Please fix your code, it's broken" - I write this because I enjoy coding. I will continue to support and provide updates as long as that remains the case.
- "I stole your code and made it soooo much better" - Thanks. Please post it so I can start using it.
"You are awfully sarcastic, I don't like you" - That's ok, I don't need you to
(thank you @thomas.c.howard for the original FAQ this one was based on)
ENJOY AND REPORT YOUR PROGRESS!