[OBSOLETE] Original & Aqara Xiaomi Zigbee Sensors (contact, temp, motion, button, outlet, leak, etc)

Maybe, but it’s not guaranteed. By design, ZigBee devices may choose the best available route to connect through, and that route can change at any time as conditions or the topography of the network change. For the vast majority of ZigBee devices, users have no control of how, when, or where they choose to connect to any particular repeater (or directly to the hub). It is just the “nature” of mesh networking.

A good method to determine whether the Aqara Button is dropping off of the network because its connecting via the SmartThings Outlet is to unplug the outlet. Then re-pair the Aqara Button, and wait and see if it maintains its connection for more than a couple hours. If possible, continue that test for a full day (with the outlet unplugged). If the Aqara Button is still connected then it is almost a certainty it has trouble when connecting via the SmartThings Outlet.

Then if you still want to use the outlet, you could try using it in a location where it’s further from the Aqara Button than your hub is, but again this does not guarantee that the Aqara Button won’t decide to connect via the outlet.

What could be the problem? I was notified 2-3 times that the door was open - it wasn’t. In the application, the sensor is open (it is not) and the last two entries are “Contact of Xiaomi Aqara Door Sensor is: Closed”. How is it possible to close twice without opening?

Screenshot_20190724-210609|230x500

I suspect the reason is due to faulty sensor hardware.

It is not the device handler. The device handler just creates events for the hub each time it receives and open / close message from the sensor.

Also, I see that you are using the new Samsung Connect mobile app. All of the Xiaomi / Aqara device handlers in the GitHub/bspranger/Xiaomi repository cannot supported in the new Samsung Connect mobile app, because of Samsung’s Developer policy on integration of hub-connected devices:

To integrate a hub-connected device, you need a SmartThings-compatible hub and to be enrolled as an organization member in Developer Workspace.

None of the people who helped create any Xiaomi / Aqara device handlers are employees of Xiaomi / Aqara, so they cannot be “enrolled as an organization member” which means they cannot create hub-connected device integrations supported in the new Samsung Connect mobile app.

If you are having hardware issues with your Aqara Door / Window sensor(s), I recommend contacting the vendor who sold you the sensor(s), or Aqara directly.

1 Like

Does anyone know if the current curtain moror DTH in
github willl work on the newer aqara b1 curtain motor ?

Hello everyone! I recently bought the “Xiaomi / Aqara air conditioning gateway”

It is an air conditioning controller and a hub. On github I discovered that someone wrote an integration with “Home Assistant”

Is there any way that it can be used to write an integration with ST?
Greetings to the whole community.
P.

Gateway means it is also a ZigBee hub, just like the SmartThings Hub.

For each ZigBee network there can only be one coordinator/hub. So this plug cannot be used a normal device. Software that links the entire Xiaomi / Aqara air conditioning gateway Zigbee network with it’s own devices to the SmartThings Hub would be needed.

There is already an integration for the normal Xiaomi / Aqara gateway. You should ask about Xiaomi / Aqara air conditioning gateway integration on this thread:

Great! Thanks!!!

Aye.
FYI, the door/window sensors use a magentic reed switch. They are most likely getting damaged due to shock and vibe in shipping. I ended up replacing the reed switches on 2 of them because after some bench testing they were pretty much sticking and shifting around not very well in response to the magnet.
One can fix it themselves if they have a soldering iron and just order a new reed switch off digikey (50 cents ea + $5 shipping) or just order new door/window widgets (~$11?) and hope for the best.

Hi,

Have you ever considered, that the repeaters are working correctly, but the hub is not decoding the messages?

I have Osram outlets, SmartThings outlets, and a single Osram bulb, as wired zigbee devices.
For many months I haven’t had any issue with connected devices far away from the hub. (I mean in a cellar, where there is no chance of direct connection.) The messages were passed through one or two repeaters to the hub without any issue. I have even paired the devices at that location, an Aqara leak sensor and an Aqara temp/humidity sensor. I haven’t had any issue with any of them for months, then one day, the temp/humidity sensor stopped reporting. I’ve tried to re-pair it at the location, no luck. Replaced battery, no luck. Moved closer, no luck. Tried to pair another sensor a new one next to the Hub, that worked. Turned out that devices just next to the Hub are able to pair. The same happened with open/close sensors, and other temp/humidity sensors too. Some devices stop sending messages, and other ones start sending messages again after days without any messages.
Topology of the network? Then why a wall socket stops to be able to communicate too. (Samsung one…) I think more and more, that the code how repeaters are handled has been changed in the Hub or in the cloud.
But I will purchase some Tradfri devices. Have you tried their signal repeater too? Is it working as expected? Or just the sockets?

Gabor

Yes, I’ve posted elsewhere about the reed switch as the main component of Xiaomi / Aqara door/window sensors, as a response to some users reporting issues with the contact sensors sending multiple repeated open or closed messages. What I had found is that reed switches react differently depending on the orientation and direction of travel of the activating magnet.

But it would come as no surprise if the low-cost reed switch used in Xiaomi / Aqara sensors can also get damaged during shipping.



Yes, I have considered it, but without spending lots and lots of time recording all ZigBee network traffic data using a ZigBee sniffer device and then spending more time examining it, there isn’t any way to prove or disprove that the hub is not decoding all messages received from Xiaomi / Aqara devices.

This becomes even more complicated if there are repeaters on the network because they will hold/cache messages from the hub to end devices, waiting until battery-powered “sleepy” devices wake up before passing on those messages. Xiaomi / Aqara devices check in far less frequently than other battery-powered ZigBee devices, so it’s totally possible that messages get dropped.

In my own testing, I have seen certain “unfriendly” repeater devices, such as a Securifi Peanut Plug, drop only some messages going from a Xiaomi / Aqara device to the hub. So my educated guess about a lot of the weird connection issues and lack of responsiveness that people have with Xiaomi / Aqara devices is because of repeater devices on the network.

I doubt the code has been changed. All firmware releases include release notes and it would state that there was a change to the ZigBee stack.

The issues you describe do sound just like what happens when a Xiaomi / Aqara device decides to connect via an “unfriendly” repeater.

Are you using an XBee or ZigBee sniffer device to confirm this fact?

Only the newest version of the Samsung Smart Outlet has been reported to work with Xiaomi / Aqara devices, and then Osram outlets / bulbs are not going to allow Xiaomi / Aqara devices to remain connected.

Just because everything works fine for a long time doesn’t mean that Xiaomi / Aqara devices won’t decide to change their connection to an “unfriendly” repeater. All that is needed is some kind of change to the network signals between devices. Then, it also possible that a Xiaomi / Aqara device that drops off the network has trouble being repaired in its location because it’s still trying to connect via that same “unfriendly” repeater. But there’s no way to verify all of this without the use of a ZigBee sniffer recording network traffic the entire time.

However, moving a Xiaomi / Aqara device near the hub just to get it to pair is not a good idea, because if it will be permanently located far from the hub, it really should establish its connection via a (“friendly”) repeater from the start. Pairing ZigBee devices in their intended installation location is just best practice.

Keep in mind that adding “friendly” repeaters does not 100% guarantee your Xiaomi / Aqara devices won’t try to connect via an “unfriendly” one and then drop the connection.

I only have personal experience with the IKEA Tradfri Outlet, and it works just great with Xiaomi / Aqara devices. Other people have reported success with the IKEA Tradfri Signal repeater, but its signal is not as strong so it doesn’t help with as large of an area of the mesh network.

I recommend reading a thread I started for a different but in many ways similar hub platform, Hubitat, which discusses in great detail all things about keeping Xiaomi / Aqara devices connected:

Hi Guys,

I would like to quickly share my recent experience with Xiaomi vibration and motion sensor in terms of connection loss / drop off.
I struggled to stay connected because they are periodically stop working and showed unavailable in the app. I read a lot about problem caused by repeaters therefore I unplugged my samsung siren to see it has an influence or not.

As a result all sensors are connected and available since 3 weeks without any problem. So it seems the problem is solved by removing the siren.
I will place the siren to different location (far from hub than the sensors can be closer to the hub) and see what will happen.

Did you run into a same issue? Do you have any advice how to eliminate the problem? (without removing the siren)

Thanks

I don’t own a SmartThings Siren myself, but I am not at all surprised that Xiaomi / Aqara devices incompatible with it if it is a ZigBee repeater device. However, when I do a Google search, it appears this is a WiFi only product, only available in the EU.

Anyhow, really without investing in more equipment, the only 100% guaranteed way to eliminate an issue with Xiaomi / Aqara devices dropping their connection with “unfriendly” ZigBee repeater devices is to stop using those repeater devices.

You can try moving any “unfriendly” ZigBee repeater devices further from the hub than the Xiaomi / Aqara devices, but it’s still possible they may decide to try to route their connection via the “unfriendly” repeater, depending on a number of factors, including ZigBee radio signal strength.

Have a look at the post right above yours for more information, and a link to a thread I maintain for a similar hub platform, Hubitat Elevation, which goes into great detail about pairing and keep Xiaomi / Aqara devices connected.

But again, can you please confirm whether this SmartThings Siren is in fact a ZigBee device?

Is it possible to use both buttons on the 2 button wall switch?

Tossing this out here. I’ve had NO luck with Tradfri. My Aqara will drop within a few hours. Guaranteed. Luckily my hub can hit almost every place I need an Aqara.

I unplug my smartthings branded plug along with a few tradfri plugs. Then I pair the devices no problem. THEN I plug my repeaters back in. So far that’s kept my Aqara from dropping. Pairing ontop of the hub didn’t prove to be foolproof as they would still occasionally decide to pair to a repeater and I wouldn’t know until I saw it offline later.

Which one, the Wireless (battery powered) or Wired (in-wall powered) Aqara 2 button switch?



Which model of SmartThings plug? Only the newest one from 2018 has been reported to repeat Xiaomi / Aqara devices without dropping them. So if you have an older SmartThings plug that could be the problem right there.

Right. And tradfri is supposed to work. But even with the ST unplugged and only tradfri plugged in, they aren’t repeating for me. I have to remove every single tradfri and the one ST plug. Once paired that way, insuring directly to the hub, they’ve remained online for weeks.

I see. Well you are the first person to report Tradfri Outlets appearing to not work well with Xiaomi / Aqara devices.

Without the use of an XBee to look at the ZigBee routing map and/or a ZigBee sniffer to see what’s happening in more detail, there really isn’t much troubleshooting to be done besides what you’ve explained (pairing the Xiaomi / Aqara devices first, and then pairing the repeaters - which isn’t guaranteed to be a permanent solution.)

Thank you for reporting this.

Hi @veeceeoh, I am quite new with ST and do not have much understanding on developing device handler. But I was wondering since the Aqara Wireless Light Switch WXKG02LMI DTH does not work for the new ST app, do you think it is possible to use the Aqara Wired Switch QBKG12LM approach?

In short, have it automatically create 2 child switch

  • Main: Allow us to set automation for Both button Press/Double/Hold. It also has the battery level and other information.
  • Child: Main will create 2 child, one for left, one for right. This allow us to set the automation for individual left and right button Press/Double/Hold.

I have tried to do up a MVP but due to my lack of knowledge on how to develop DTH, I am unable to get it to work. The following post which you have provide help to has a DTH that implemented the Main-Child approach.

Maybe, but at the moment I am very very busy so I am not sure when I will have time to try this approach.

I won’t lie, though. I really really dislike the new Samsung Connect mobile app because of all of the functionality that is missing, and also because developer documentation on how to correctly write device handlers for the new app is still not available.

No worries! I will spend some more time figuring out. If I ever get it to work, I will share it here. Thanks for the prompt reply!

I totally agree with you, they are taking too long adding functionality to the new ST app plus there is barely any documentation.