Xiaomi & Aqara Devices - Pairing & Keeping them connected

My theory is dropped check-in messages, not a dropped connection.

You said you only use IKEA repeaters / outlets. Is that Xiaomi Door/Window Sensor connected via one of those IKEA devices?

It is connected to the Hub via an Ikea router. (i.e. repeater).

Well, then my theory is that, in some situations, IKEA repeaters may drop some (or even all) messages. It's hard to diagnose and know exactly what's happening without a ZigBee sniffer (and a complete understanding of what is supposed to happen, which I unfortunately don't have).

Did Device Watchdog identify that Door/Window sensor as a device that hadn't been active?

As to what to do about it - I'd say further investigation is needed. I have seen the same behavior that @gavincampbell described, so it would help to know whether open/close messages continue to be received even when the check-in messages aren't.

Keeping Xiaomi devices paired was something I really truly believed was under control, and you can see in my previous posts that I was almost bragging about it. Well I have a bit of crow to eat because that really has become unstable lately, but there's no software to point a finger at. Nothing has changed with @veeceeoh 's fantastic drivers, and I have frozen my hub updates for the time being. I'm still on the same version that was giving me stable results previously, yet now I experience more instability than before.

I have hypotheses, but no hard evidence. One such hypothesis is it's my router. I updated reluctantly a while back because the most recent update had what I had really been waiting for (more available DHCP reservation slots), and while all is fine on the WiFi front, things may be worse off with Xiaomi devices as a result. Maybe.

Another guess is that while perhaps the Xiaomi Aqara Hub I now have is helping me in many ways with devices that wouldn't stay paired, it might actually be the cause of that issue. It's odd, and I don't really have the evidence I need to come up with a theory. My Xaiomi hub work-arounds have solved the problem for everything but my Aqara temp/humidity sensor, which I need to compare to another temp sensor for my use. HomeKit can't help me there. Weak battery may be the issue. Newly installed devices with strong batteries and devices that are powered by an adapter with a 5v to 3v buck converter do not give problems. Accurate battery levels are alluding me, so I have a ZTS MBT-1 coming today to help further the investigation.

Since these are relatively new devices, they have basically 100% battery.

My Device Watchdog child app, is pointed only at Xiaomi devices which have not reported in the last 2 hours. It picked up this particular window/door sensor.

As previously mentioned, this particular device is around 30 feet away from a ikea repeater, and there are less than 6 devices attached to it, and it connects to another repeater, which connects to the HE.

So do they drop if you reboot your hub?

No, they don't drop if I reboot my hub.

1 Like

In my own test, using Xbee to see the routes, I saw the ikea control plugs are very weak, very very weak, the rssi is awful, 30 ft I think you need another repeater in between and a mesh healing. I have 26 xiaomi devices, 2 ikea control plugs, no issues right now. 1500sqft home. No xbee for repeaters.

What exactly are you referring to when you say "plug"?
Do you mean the Ikea Control Plug? (which is an outlet), or do you mean the Ikea Repeater (which is a USB charger)?

Control plugs, corrected the post, sorry

The particular Xiaomi device in question, a window/door sesnor, is around 30 feet away from an Ikea Repeater. There is an Ikea outlet that is 8 feet away from that. Then there is another repeater that is around 20 feet away from that. .

Ok, did you tried the mesh healing? Turning off the zigbee for 20 minutes

No, I didn't try the Zigbee healing process.
It "came back" by itself.

The question is why? and what happened?

Is the sensor on the metal?

There is a clear line of sight between the Xiaomi window/door sensor and an Ikea repeater, 20-30 feet away.

FWW, using the ZTS MBT-1, I tested the batteries of the two Aqara motion sensors that had been dropping off when paired to HE. They measured 80% charge state. On the surface, this seems to indicate that they may be sensitive to voltage drops when paired to HE. Whereas, paired to the Aqara hub, they function just fine. The motion sensors that were not giving me issues, all have batteries that are new, almost new, or are powered by a DC adapter. For the power adapter, I use a 5v phone charger and a 5v to 3.3v buck converter. This doesn't prove anything, but I'm just throwing it out there as it may be a factor.

I also tested a Mijia contact sensor that was also dropping, and which had an IKEA Outlet just a few feet away, and the hub just 20 feet away. Its battery is still at 100%, despite it being purchased in November of 2018.

Not one of my Xiaomi leak sensors have dropped. They are all still paired to HE.

Sorry, though I scrolled up quite a bit from your first post asking about the lack of check-in messages for hours, I must have missed this previous explanation of the routing to that door/window sensor end device.

With four link hops in the path between the end device (the Xiaomi Door/Window sensor) and the coordinator (Hubitat hub), with as much as I understand about ZigBee routing (which is not a heck of a lot), I place high suspicion on unsuccessful packet delivery.

If possible, I would recommend looking at the link cost of each of the hops to get a sense of the probability level of successful packet delivery. For a highly technical explanation of link cost / probability of successful packet delivery have a look under the heading ZigBee and IEEE 802.15.4 Protocol Layers, subheading 3.4.6 Routing here.

Without additional hardware, the only tool available with the Hubitat hub itself to get any sense of quality of ZigBee network route links is the getChildAndRouteInfo report page. Have you tried looking at that? To view it, in a browser on the same network as your hub, go to:

http://[hub_ip_address]/hub/zigbee/getChildAndRouteInfo

(replacing [hub_ip_address] with your hub's IP address, of course.)

Part of that report will look like this:

Neighbor Table Entry
[Name of Device 1, 0FA1] , LQI:254, age:3, inCost:1, outCost:1
[Name of Device 2, 0C19] , LQI:195, age:7, inCost:1, outCost:7

I'm no expert, but as I understand it, the LQI value represents the overall link quality, as explained by @Tony here:

Then, using this page as a guide, here's a rough guide on how the other values can be interpreted:

age

In EmberZNet Pro, the number of aging periods elapsed since a neighbor exchange message was last received from this neighbor. In stack profile 1, the number of aging periods since any packet was received. An entry with an age greater than 3 is considered stale and may be reclaimed. The aging period is 16 seconds.

inCost

The incoming cost for this neighbor, computed from the average LQI. Values range from 1 for a good link to 7 for a bad link.

outCost

The outgoing cost for this neighbor, obtained from the most recently received neighbor exchange message from the neighbor. A value of zero means that a neighbor exchange message from the neighbor has not been received recently enough, or that our ID was not present in the most recently received one. EmberZNet Pro only.

Really what you'd want to be looking in addition to the LQI value is inCost.

2 Likes

So running the ChildRoute link, I got this output:

Parent child parameters
EzspGetParentChildParametersResponse [childCount=2, parentEui64=0000000000000000, parentNodeId=65535]

Child Data
child:[Basement Temp Sensor, 5F1A, type:EMBER_SLEEPY_END_DEVICE]
child:[Iris Motion 1, EE10, type:EMBER_SLEEPY_END_DEVICE]

Neighbor Table Entry

Route Table Entry
status:Unused
status:Unused
status:Unused
status:Unused
status:Unused

So a number of my Aqara sensors seem flat out dead? I've got door contacts on 3 doors, none of which show up, and 3 temp sensors missing.

One of door sensors is showing this:

Device Details

Create Time 2019-04-08 8:17:20 PM EDT
Last Update Time 2019-04-09 8:51:58 AM EDT
Last Activity At 2019-09-28 9:25:00 PM EDT
Data * endpointId: 01

So its just been gone for a week. My other door sensors show roughly the same las activity time: 2019-09-28 9:50:29 PM EDT

I'm on Zigbee ch 20 and tried resetting my zigbee radio, hoping they'd come back or rebuild the mesh. doesn't seem that happened.

they all still show up under the Zigbee devices on the zigbee radio settings.

Zigbee Radio Devices

16 bit Address 64 bit Address Device Type ID Label (Name)

2054 00158D0002FB4720 264 Evan Temp Sensor (Evan Temp Sensor)
3059 00158D0002FB365C 263 Mudroom Door (Mudroom Door)
4478 00158D0003099313 263 Basement Door (Basement Door)
5A18 00158D000270CFD4 321 AqaraLeak1 - Laundry (Aqara Leak Sensor)
5F1A 00158D0002FB49AB 264 Basement Temp Sensor (Basement Temp Sensor)
6F34 00158D000309B5CD 264 Main Floor Temp Sensor (Main Floor Temp Sensor)
98FC 00158D0002FBD439 263 Front Door (Front Door)
C682 00158D0002774BD3 321 AqaraLeak2 - Attic (Aqara Leak Sensor)
EBDE 00158D0002FB49CB 264 SMK Temp Sensor (SMK Temp Sensor)
EE10 000D6F001098C572 18 Iris Motion 1 (Generic Zigbee Motion Sensor)

any suggestions?

IN my own personal experience, if an Aqara device hasn't "checked in" in that length of time (>1 day), it is no longer on the zigbee mesh (even though it still shows up as a zigbee device.
In my humble opinion, the only way for those devices to stay on the zigbee mesh is to ensure that only certain zigbee devices are used as repeaters. (The only ones that I know that work are: Ikea repeaters, and the Ikea control outlet, and the Xbee).
As well, I have put together an adaptation of bryan turcott's fine program: Device Watchdog.
It checks for activity on my Aqara devices - if no activity (or checkin) in the last 2 hours - it probably is off!

1 Like

Sure seems that way, @jtmpush18 . What's odd is that my devices are only 25 ft max from my hub, with a line of sight. (Thanks, open floor plan). I don't even know if there's a place for a repeater to even plug in. I was thinking about building a Pi just to act as another zigbee radio, maybe stronger than the hubitat.

I got them re-paired, and so far they are hanging in there, but its only been a day. And, actually, I only have one connected to a light, so I'm not really sure about the other two.

I'll give the "watchdog" a try.

Thanks!