Xiaomi Gateway Integration

in my experience I had never problems with flooding, but had problems with leakage which is arbitrarily (broken pipes inside walls) . Just asking others experience: bathtub, washer, kitchen sink??

I add follow code in configuration.yaml
xiaomi:
gateways:
discovery_retry: 10
- mac: 34967255e659
key: BB95B933946D411E

then i reboot home assistant,ti shows “invalid config”.
where is the mistake?

Have you tried hass --script check_config ?
And read this https://home-assistant.io/docs/configuration/troubleshooting/

Hey there,

I am having trouble with my Aqara. It suddenly goes offline (according to MiHome app) but remains connected (locally) via homeassistant. This has happened twice and the only remedy was a full hard reset.

Is anyone facing the same problem?

Thanks

Hello folks! With Home Assistant 0.54 the xiaomi component is renamed to xiaomi_aqara. It’s a breaking change! After the update of your installation you have to update the configuration.yaml:

xiaomi_aqara:
  gateways:
   - mac:
     key: xxxxxxxxxxxxxxxx

We are trying to differentiate between Zigbee devices (aqara) and WiFi devices (miio) cleanly.

3 Likes

the result of check config is“Valid!”
but when it restart,it shows on the states page:
Invalid Config
The following components and platforms could not be set up:
xiaomi
Please check your config

Try

hass --script check_confi -c PATH_TO_YOUR_CONFIG

Try also to enable logging for xiaomi component and check the log.

homeassistant.components.xiaomi: debug
homeassistant.components.sensor.xiaomi: debug
homeassistant.components.switch.xiaomi: debug
homeassistant.components.binary_sensor: debug

Hi all,

I’m using 2 xiaomi gateways with door sensors for security purpose. Is there an hardware hack to add a backup battery to the gateway (in case of power outage)? I was thinking somenthing like a power bank (so 5V 2A) and not a whole UPS. Thanks

1 Like

I thought about that too

Hi there,

Just wanted to ask. Do the two GWs create a larger zigbee mesh or they communicate via WiFi. If it is via WiFi do they talk over the local network?

Does anybody know for sure?

Thanks a lot

Hi ktsi,

I think each GW has is zigbee network and the two GWs comunicate by WiFi.
In fact:

  • in the “Xiaomi Home App” I had to add some sub-devices to one GW and other sub-devices to the second GW;
  • if I unplug from power one of the GWs I loose control only on the sub-devices linked to that GW.

Hi,

Will it work if there is no internet? Can you test?
I wish the Aqaba hub had an Ethernet port.

Thanks

Yes it will. I block my gw from the internet

How do you do that? Parental controls on the router? Firewall? What ports do you kill?

Thanks

1 Like

I have a device called a fingbox that can do this, but there a lots of ways to do - such as you mentioned

I have duplicated zigbee component detected, they switch randomly over time.
Is that a way, I can clean it up?

I.e.:
switch.plug_158d000156faa
switch.plug_158d000156fbaa_2

Hi there my gateway light stop turning on with home assistant in last version of firmare 1.41_150…043 and last version of HA 0.54.0 all the other things are working good

After upgrade to 0.54, I am seeing very inconsistent results with my switches, gateway and cube - sometime actions work - sometimes not (mostly not) - here’s what I am seeing in the log:

2017-09-24 21:16:07 ERROR (Thread-3) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-24 21:16:11 ERROR (Thread-2) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-24 21:16:53 ERROR (Thread-12) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-24 21:16:54 ERROR (Thread-5) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-24 21:16:55 ERROR (Thread-3) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-24 21:16:55 ERROR (Thread-4) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-24 21:16:55 ERROR (Thread-6) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-24 21:16:56 ERROR (Thread-2) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-24 21:16:56 ERROR (Thread-9) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-24 21:16:56 ERROR (Thread-7) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-24 21:16:56 ERROR (Thread-11) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-24 21:16:57 ERROR (Thread-5) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-24 21:16:57 ERROR (Thread-3) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-24 21:16:57 ERROR (Thread-4) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-24 21:23:59 ERROR (Thread-11) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-24 21:25:05 ERROR (Thread-4) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-24 21:25:08 ERROR (Thread-5) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-24 21:25:11 ERROR (Thread-7) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-24 21:27:40 ERROR (Thread-8) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-24 21:27:49 ERROR (Thread-4) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-24 21:27:51 ERROR (Thread-2) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-24 21:27:59 ERROR (Thread-7) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-24 21:28:01 ERROR (Thread-6) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-24 21:28:02 ERROR (Thread-11) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-24 21:28:03 ERROR (Thread-9) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-24 21:29:30 ERROR (Thread-3) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}

The key I have configured is valid and has not changed. As mentioned above, it must be valid because sometimes my automations do trigger.

Here’s my config:

xiaomi_aqara:
# xiaomi:
 gateways:
   - mac: 286c0xxxxxd8
     key: 63B2DF8xxxxx40C9
   - mac: 34cxxxxx5720
     key: 6E98BxxxxxB94F18

Any ideas?

Hi @zajnic

I have reported this here and got some explanation.

https://community.home-assistant.io/t/xiaomi-gateway-switch-plug--random-rename/

unfortuantely I have been busy lately and did not get around to open an issue.
Hopefully I can do it today. Sorry

Did you update your configuration from “xiaomi:” to “xiaomi_aqara:”?