Issue getting Xiaomi Aqara to work

Hello everyone,

I recently received the Xiaomi Smart Home hub, the temperature sensor and the round wireless button.
But I cannot get any of the components to work properly. Home-Assistant does detect them through the xiaomi_aqara component but they never get updated. Only when I restart HA.

Currently the Xiaomi hub is sitting on a different subnet than HA. But HA is now integrated in the same subnet as well. Since I am using HassIO, I am not entirely sure whether HA listens on the second network interface or if I have to add it to the docker container.

Somewhere in the forum, I’ve read that the Xiaomi hub sends out multicast messages, so I tried to scan using Wireshark. Couldn’t see a single multicast message.

I honestly have no clue why this is not working and whether the issue is with the Xiaomi hub, the network or Home-Assistant. Maybe some of you have a little more experience with those things and can help me out.

Thanks in advance,
Cludch

Hi

I have 3 Xiaomi hubs all on the same subnet at the Home Assistant Server (runs on Ubuntu) any they are detected fine after the MAC and ID configured within the configuration file. (You have to enable Access within the MI App)

When you add a sensor you need to restart HASS for them to take an effect, I have 50 sensors so I know what a pain this can be.

They are being detected, but not updated at all.

Mine are updating all the time, have a lot of Temp/Humidity Sensors, Door/Window Sensors / Motion Sensors and Wireless Buttons all work fine.

A good test is that the Hub should be detected as light too, if you can see that in the shows in the Device/States list in Home Assistant and see if you can turn it off and on.

Didn’t know about the light, but yes it is being detected.
Trying to call light.turn_on doesn’t do anything.

Ok sorry for the questions

Have you enabled access within the MI App, by accessing the secret menu?

Is you Home Assistance on the same VLAN as the Hub ?

Have you entered the correct ID and MAC in your Configuation.yaml ?

I have noticed of the MAC or ID is wrong it gets detected but doesn’t do anything.

I appreciate your help!

Since it does detect the Hub and its components, I assume mac and password are set correctly. In addition to that, I did activate the super secret access via the app.
My hassio instance is a VM and is on a different subnet than the access point. But I did add the hassio instance to the same network as my hub.

I would double check the ID that the App gives you to what entered in your config.

Thinking about it, I added an additional to sound the alarm in our porch area, I accidentally entered the ID or MAC (I cant remember what one now) incorrectly and it was detected, and in the log showed an error, I entered it correctly and it worked…

So i think the hub is detected automatically dependant of the MAC / ID, you just need them for it to work if that makes sense.

I feel kinda dumb for not testing this:
Adding it to the same network with the primary network interfaces works. Not pretty, but ok-ish for now.

Still, thanks for you help!

Hey,
I’m having the same issue. This is my config:

xiaomi_aqara:
  discovery_retry: 10
  gateways:
    - mac: '7c:49:eb:1c:fa:e3'
      host: 10.100.102.21
      key: e45ee993a49f4a07

Can you elaborate on your solution?

Hey,

sorry for the late reply.

I used to have my Home-Assistant server inside a different network as the xiaomi bridge. Because of this issue, I moved them both into the same network and since then, I am no longer having any issues.