Xiaomi & Aqara Devices - Pairing & Keeping them connected

How do you know that they have never dropped?
(I don't mean to doubt you, but the phrase is "Trust, but verify")

I verify physically every month. Wet paper towel test

Please forgive me, but I'm lazy. I want HE to check for me. There must be some way.

The battery date wouldn't be that way--that's handled entirely within the driver. It does generate an event and thus "activity," but it's only because you did it. This is a courtesy the driver provides, not anything the device itself supports or needs to be communicated with to read or set.

I don't have any of these, but I'm shocked it doesn't do the hourly checkin like nearly every other Xiaomi device...

As @bertabcd1234 said, you are generating your own events. Logs show all of mine sending a battery report every 50 minutes.

The xiaomi devices check in about ever 50 minutes. However every now and then they may skip a checkin (I don't know if its just the message getting lost) but they are still online and functioning. My rule of thumb is usually after about 3 misses Its dropped.

That being said I have about 60 devices and they very rarely drop off.

You can use a tool like device watchdog to monitor the last activity and ensure they are checking in frequently.

3 Likes

Hello Gavin:

  1. Yes, I use Device Watchdog. Unfortunately, it's fooled by the fact that I send the devices a "Battery Replaced Date", every day, so it thinks that there is some activity.
  2. Please look at the screen shot that I uploaded earlier. It shows that from Dec 4 to Dec 20, the only activity was me sending "battery replaced date", NO other reporting. Yet the physical test shows that this sensor still worked.
    Why?
    P.S. Best of the Holiday season to you and your family!
1 Like

Question: Are you using @veeceeoh standard driver for the leak sensor?
Why doesn't my leak sensors report in like that?
(Much appreciated your screenshot).
P.S. Best of the Holiday season to you and your family!

2 Likes

That is strange. The other Xiaomi sensors (tilt/vibration, contact, motion, temperature/humidity/pressure) definitely check-in once in 50 minutes.

Hard to fathom why the leak sensors don't report regularly.

Could it be that in the preferences section of the device page, I left everything to default, and I took off info reporting?

P.S. Best of the Holiday season to you and your family!

1 Like

Yes, I'm using his drivers for the leak sensors, contact, and temp./humidity. All log the battery reports/check-ins every 50 mins.
Happy Holidays to you and yours!

1 Like

Can you please take a screen shot of your preferences for that device and post it?

1 Like

Sure. I do have info logging turned on. I run a Device Watchdog report every day to alert me if there hasn't been any activity.

1 Like

That's got to be it.

And Happy Holidays to your family and you! I imagine in Canada you'll have a genuine white Christmas. In New Orleans, like Bing Crosby, I'll only be dreamin' of one :laughing:

I guess veeceeoh would know for sure, but looking at the driver, the "Enable info message logging" preference just disables logging of the events when they happen. The actual events still get created and should count as activity (and actually, logging alone would not not count).

You should be able to generate a log entry, if debug logging is enabled, from the device by short-pressing the "reset" button. In some cases, it looks like this will also create a battery event. (If it doesn't, it's just a log entry, which, again, won't count as activity.) So if you want to manually check that it's working without getting it wet, that would be one way (but unlike stock drivers and Hubitat tradition, debug logging won't ever automatically disable itself, so you'd have to do that if you care). I'm still not sure why yours wouldn't be doing the hourly checkins, which should create an event for at least the battery level--obviously that would be great so you could automate the whole thing with Device Watchdog or similar.

2 Likes

I use device watchdog for my xiaomis

I know every day if something dropped off, worked fine, I have an humidity sensor that is dropping off after I replaced the ikeas outlets for the repeaters....

1 Like

Which "reset" button are you referring to?
"reset battery date"
"reset to dry"
"reset to wet"

Every morning , I "press" the "reset battery date" - but that doesn't result in any additional reporting of battery levels.

The one on the device itself that you use to pair or reset it if you hold it in (don't hold it in this case).

Look at the "Last Activity At" date/time. Is it in the last hour or two?

Anytime a driver sends a sendEvent command and something is updated that time should be updated. If that time is getting updated then the device should be active and running. Unfortunately by sending the reset battery date command as well triggers this. I'm not sure though why you do this. It does not trigger anything on the device itself. All it does is create that event in the device event log and log that it did that.

I'm looking at the driver and the device doesn't have a reset or a poll command so you can't do that. Basically you just wait and watch the last event at field or there are also attributes called lastCheckinTime or lastCheckinEpoch that you can monitor as they get updated with new events. I don't know if you can monitor those with device watchdog though. The 'last event at' should work fine though.

Another question, from the same time of device, another location.
The following is a screen shot from another Aqara Leak sensor. It shows that the last checkin date/time was: Dec 20, 1:48pm. Since it hasn't reported in the last day, I'm ready to declare this sensor as "off the ranch".


However, look at the following screen shot from my logs, (filtered with just that device):

Can anyone tell me why all those battery events weren't reported in the device status page?