XIAOMI multiple gateways

Hi,

HA can’t find my second xiaomi gateway.

If you are using Home Assistant in Docker, make sure to use --net=host .

How and where can I “make sure to use --net=host” ?

Regards,
MM

First of all, are you using Docker?

If not, net=host won’t help you. If you do use Docker, you’d add this line to the docker run command.

Im using hassio (ready to burn image from ha website)

HassOS 1.11
Home Assistant 0.81.0.dev0

and I keep getting “platform xiaomi_miio not ready yet. Retrying in 180 seconds.”

configuration.yaml:

xiaomi_aqara:
discovery_retry: 5
gateways:
- mac: xxx
key: xxx
- mac: xxx
key: xxx

I double checked keys and macs

I use dd wrt on my routers with FILTER MULTICAST option deselected

As you can see here, the problem is with the Miio component and not your Aqara gateway.

As for your original question, I’m pretty sure that Hassio runs with net=host even if you don’t specify it.

so what can I do to get all 2 gateways discovered in my HA?

Your configuration indentation is SNAFU.

Either that or you didn’t read the top of the page.

I really love precise answers :slight_smile:

and all guys going around the answers trying to dog training :slight_smile:

No need to be snarky.

Take a look at the xiaomi_aqara setup here and compare it to what you posted above. Your indentation is out.

I did. Where am I wrong? I tried all options. With/ w/o mac etc.

Im not snarky. If I use/go for forum I expect professional/quick answear. Theres no need for treasure. If I get one I can donate/appreciate somehow. I understand that somebody helps me… lets just be precice…

Does your config look exactly like this …

xiaomi_aqara:
  gateways:
    - mac: xxxxxxxxxxxx
      key: xxxxxxxxxxxxxxxx
    - mac: xxxxxxxxxxxx
      key: xxxxxxxxxxxxxxxx

Note that the indentation needs to be spaces not tabs.

If you want a professional answer, hire a professional.

If you want a quick answer, don’t consult a public forum where people are all over the world.

If you want a quick answer ask the question properly. In particular read the panel at the top of every forum page about how to post config snippets. I’ll quote it since you are too busy being snarky to read it:

When posting logs or configuration snippets please use code blocks and syntax highlighting. For quick highlighting of code, YAML, etc, use this button:

The config you posted is all over the place, and you have not identitifed any problem in your log relating to xiaomi_aqara, which is not the same as xiaomi_miio.

4 Likes

Did u get the key for the 2nd gateway using IOS, if so you may need to generate it a few times to get correct key. there is an known issue doing it on IOS and being hit and miss or use Android

Config file seams to be formatted correctly.

I’ve changed/generated new keys twice (IOS) and still nothing.

I have 2 ddwrt routers at home.
192.168.1.1 - serving dhcp
192.168.1.2 - dhcp forwarder
one common SSID

the first gateway (working)

  • is connected to 192.168.1.1
  • has an ip 192.168.1.135

and the second gateway (not working)

  • is connected 192.168.1.2
  • has an ip 192.168.1.136

I also tried:

    discovery_retry: 10
    gateways:
    - host: 192.168.1.135
       mac: xxx
       key: xxx
    - host: 192.168.1.136
       mac: xxx
       key: xxx

nothing
2018-11-01 13:15:49 ERROR (SyncWorker_6) [xiaomi_gateway] Cannot connect to Gateway

Is HA connected to your first router?

yes (to 192.168.1.1) and has an ip of 192.168.1.200

Connect the second gateway to the same router and I’m pretty sure it will work

the second gateway is in my garage and router 2 is closer one.
cant do this

You’re not even willing to try? strange…

Can’t help you