[DEPRECATED] Xiaomi Mijia Smart Light Sensor (moved to ST's Edge driver)

This is very helpful, thanks!

Looks like the default value for a couple settings didn’t get set properly, but I believe I’ve fixed that.

Here’s what you need to do in either the Classic or new app: (same as what I showed in post 12 above)

Watch you Live Logs again.

Go to the device’s settings/preferences and provide a number for each of these:

image

Tap on Save ad verify no errors show up in Live Logging.

NOTE, The device doesn’t seem to honor these values for some reason.

I can’t say for sure this resolves the reporting problem, so let’s see what messages you get. The Desc Map” entries are normal messages.

EDIT

Also, please insert the following line of code right after line 59 to help debug device messages:

log.debug “Incoming data from device : $description”

It should look like this after you do that:

image

(this new line can be removed or commented out later later)

Hi,
Might be I have found an issue. If I pair device with your DH from the 6th of May everything works, even battery comes a little bit later, and I can update DH to the last version and it continues to work correctly.
But If I pair device on the last DH, it doesn’t work at all, non battery or illuminance.

Did you go into settings and update both values? If not, please do. Just clear out the default value for each and add it back, sorry about that.

I also just updated the DTH to try and address a null value if those settings don’t change and the user just taps on Save (Classic app) or exits from the settings page (new app).

Have just ordered one of these sensors to have a play with.

Thank you for all your efforts in publishing this info so others can use it.

Rick

1 Like

The NullPointerExceptions disappeared from the logs with the new update, but the same problem does persist. It seems the device is only able to report the values in the first 5-10 minutes and even then does so only if I ask to refresh the value. Very odd behaviour.

.
That’s definitely not what my device does. It floods my hub with data on every single change in raw data since the first day I got it. I’ll post a live log shortly.

This was just for 1 minute!

image

I have another one coming soon, so I’ll see how that new device behaves. I’d still keep trying to remove and rejoin your device, or at least hold down the button to start the reset and join process on the device while going through the adding a new device process.

EDIT: Just as another data point, I’ve had 170 raw data values sent from the senor since I posted that image.

1 Like

Same issue with last DTH. After change and save settings still doesn’t work.
I have an error during pairing and here is the screenshot.

Please go back into settings and change the first parameter to 15 and the second to 20. Tap on Save if using the Classic app. Let me know what live logging says.

Any idea what these unknown cluster and attribute entries are here?

.
That’s the basic cluster and model identifier. That should definitely NOT be unknown because that’s bound during the configuration process of the device when it joins.

That tells me the sensor didn’t complete the join process successfully. You can try and force the configuration again by one of a couple ways I’ve seen work:

  • tap on the Configure tile in the Classic app, and then immediately press the button on the sensor
    or
  • press the button on the sensor and immediately tap on the Configure tile in the Classic app.

I recommend being within close proximity of the hub, or maybe another zigbee repeater.

That did the trick! I can now see a steady inflow of illuminance values. Seems the device is somewhat tricky to get paired correctly.

1 Like

Very true. For some people it joined correctly right away, and others it took a few attempts.

Are you using my latest DTH? Those live log debug messages are normally commented out, unless you’ve removed the “//” from line 61. I just want to make sure you’re using the latest.

My understanding is that it uses the new zigbee 3.0, will be interesting to see if these suffer from the same drop off as the previous versions of other devices.

So far they’ve been rock solid.

Hi, need some help.

After pairing it appears in my ST app, but has always shown 0 battery and 0 lux (just opened from the box). Live logging shows something as below when I did the pairing - any idea why it does not work? Thank you

Amazing :+1:

1 Like

Go into settings and manually type in the default values, like 10 and 21. It doesn’t matter because the sensor doesn’t seem to honor those settings. I may just eliminate that altogether since it causes more problems than it’s worth.

It works for one of my sensors and the other works after I removed the battery cover and put the battery back in…anyways thank you for your advice and the great DTH!

1 Like

My light sensor is working without any connection problem since the installation 2 week ago, are the problems related to the new firmware? I didn’t upgrade my firmware, still using 000.030.00005, now struggling whether to upgrade firmware.

No it was something else on ST’s end that was causing these issues. Since this sensor doesn’t seem to honor those attributes, I’ve removed the preferences again so it won’t cause others any issues.

You really have no choice. The hub’s firmware is pushed out by SmartThings. You can’t stop it, or schedule it for another date/time.