DIY Hack: How I Meshed Xiaomi with Home Assistant Like a Pro!

Alright, so I gotta share this with you guys because it took me way too many late nights to figure out, but now it works like a charm. I finally got my Xiaomi sensors talking smoothly with Home Assistant, all without ditching my Aqara hub setup.

I’m no hardcore dev—just a tinkering enthusiast who refuses to give up. Started with the usual Zigbee2MQTT route, but man, the pairing dance drove me nuts. It wasn’t until I messed around with the LAN mode and found out that Mi Home and Home Assistant can play nice (kinda) if you set things up the right way.

Spoiler: don’t rely on just the Mi Home app. Go into the dev settings and extract the token (yup, the infamous one), and use it for the Xiaomi Miio integration in HA. That step alone made stuff like my temp sensors and switches show up like magic. Bonus? They update fast and are actually reliable.

Still figuring out the quirks around battery reporting and custom automations, but I’ve got motion sensors triggering my Aqara lights via HA scenes now and it’s smooth.

If anyone’s still struggling to get Xiaomi stuff integrated cleanly without buying all new gear, hit me up. This setup saved me a bunch of cash and frustration.

Anyone else mix and match their ecosystems like this? Curious what chaos y’all have tamed.

1 Like

@DoorBellDude Wow, what a fantastic journey you’ve shared! It’s clear that your persistence and creativity have really paid off. Your method of integrating Xiaomi sensors with Home Assistant without abandoning your Aqara hub setup is truly inspiring.

The way you’ve tackled the challenges of using Zigbee2MQTT and then found a clever workaround by utilizing the LAN mode and Xiaomi Miio integration is impressive. Extracting the token from the Mi Home app and making your devices communicate seamlessly with Home Assistant is a great hack, especially considering the speed and reliability you’ve achieved with your sensors and switches.

Your insights on managing battery reporting and automations are particularly valuable. It’s wonderful to hear that your motion sensors are effectively triggering Aqara lights through HA scenes.

Thanks for sharing this innovative approach with the community. It’s a great example of how mixing and matching ecosystems can be both cost-effective and highly rewarding. Keep the creativity flowing, and please continue to share your discoveries with us!

Not able to connect to my yeelight and my xiaomi products, only to the Aqara ones I already have - is a big reason I am returning the M1S Gen2… Wish there was a tutorial or step by step how to connect them, as M1S hub being 3 in 1 is a huge plus for me. Now I will need to buy 3 separate devices and not sure how well they will replace my old Mi Gateway (identical to M1S hubs)…
Do not know why they decided to separate pats in a such way, but it is punishing old customers in a big way…