How to integrate Xiaomi/Aqara sensors

Hi,
I’m moving first steps in the automation.
I would like to use some Xiaomi/Aqara sensors, like water leakage ones. I read some stuff but I couldn’t understand if I need to buy/use a gateway too instead of using sensors only.
Would you mind helping me to understand this matter?

Thank You

Regards

The sensors work on the zigbee network. I’m assuming you use a raspberry pi to run Hassio? Then the most easy way to integrate the sensors would be to buy a Xiaomi gateway and integrate that in Hassio (view the docs). But the gateway does communicate to the servers in china. If you don’t want that you can use deconz or zigbee2mqtt or an other sollution. I personally use deconz, for that you have to buy a conbee zigbee usb stick.

I use a raspberry pi with running a canonical raspbian and a manual Home Assistant installation.
So, please correct me if I am wrong, as far as I can understand, raspberry does not have any “antenna” to communicate with zigbee devices so you need to use an USB stick or an external gateway that talks with raspbian via WiFi.
Would it be a solution buy a “general purpose” gateway (which one in this case would you recommend)? Would it avoid devices communicating with Chinese servers?

Thanks

correct

yes, or wired ethernet.

None of them are general purpose, most will only connect with a limited number of devices (ie the ones that create profit for them). Even if they connect now, the vendor can screw with the firmware and change things overnight.

If you want to divorce yourself from the cloud and proprietary lockin, go with one of the free (as in freedom) solutions like zigbee2mqtt or conbee.

PS you can block the Xiaomi hub from the internet, and stop it reporting to China, and still have it operate solely on your LAN.

you can just block the gateway from communicating out to China in your router. You need to allow the outbound traffic to add devices to the gateway but once they are added you can block the outbound traffic again

My traffic isblocked in both directions all the time, i use the Home assistant xiaomi_aqara.add_device service and i can add devices

I’ll have to give that a try next time. That would be much better than mucking around with the Xiaomi app

1 Like