Xiaomi gateway integration - help needed

hi,

i tried to integrate the xiaomi gateway into my hass.io installtion by following this tutorial:

i also tried all the hints at the end of the page. unfortunately it did not work, the log files shows this:

2017-10-03 00:29:42 WARNING (MainThread) [homeassistant.setup] Setup of xiaomi_aqara is taking over 10 seconds.
2017-10-03 00:30:22 ERROR (SyncWorker_12) [homeassistant.components.xiaomi_aqara] No gateway discovered
2017-10-03 00:30:22 ERROR (MainThread) [homeassistant.setup] Setup failed for xiaomi_aqara: Component failed to initialize.

my config file looks that way:

xiaomi_aqara:
discovery_retry: 10
gateways:

  • mac:
    key: 166EFD08A226xxxx

i can see the gateway in the admin-area of the rooter, it is on the same network as all other devices.

do you have any hints why this does not work?

try lowercase letters for the mac and key

i tried this before, that didn’t work either.

check your formatting, this is mine that works

ok, thanks, i’ll try in the evening!

well, this did not work either, formatting was the same, i have just added: discovery_retry: 10

Do you know the ip of your gateway? Just extend the configuration:

xiaomi_aqara:
  gateways:
   - host: 192.168.x.x
     mac: 286c078882xx
     key: xhebx....

oh, thanks, that’s a new idea, i didn’t read about and try before! i’ll give it a try in the evening and let you know.

great, thanks! that was the thing i was looking for for a couple of days :slight_smile:

it now shows the gateway on the start page, i see the status and can click to see the brightness level and the color, but i can’t change any of these. do you have a hint regarding this?

my log file says:

  2017-10-04 20:48:58 WARNING (MainThread) [homeassistant.components.xiaomi_aqara] Static address (10.0.0.2:9898) of the gateway provided. Discovery of this host will be skipped.
2017-10-04 20:49:09 WARNING (MainThread) [homeassistant.setup] Setup of sensor is taking over 10 seconds.
2017-10-04 20:49:09 WARNING (MainThread) [homeassistant.setup] Setup of weather is taking over 10 seconds.
2017-10-04 20:49:13 WARNING (MainThread) [homeassistant.setup] Setup of tts is taking over 10 seconds.
2017-10-04 20:49:35 WARNING (SyncWorker_7) [netdisco.ssdp] Error fetching description at 10.0.0.11
2017-10-04 20:49:41 WARNING (SyncWorker_7) [netdisco.ssdp] Error fetching description at http://192.168.1.250:49152/description.xml
2017-10-04 20:49:50 ERROR (SyncWorker_3) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-10-04 20:49:56 ERROR (SyncWorker_18) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-10-04 20:50:04 ERROR (SyncWorker_4) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}

i’m running HA on an raspberry pi3, 10.0.0.11 is my notebook from which i configure pi.

Did you guys manage to find the issue, I have the same errors.
The gateway is basically just acting as a bridge, I can’t interact play ringtones, switch on gateway light etc.

2017-10-12 21:38:38 ERROR (Thread-2) [PyXiaomiGateway] Got error element in data {“error”:“Invalid key”}

unfortunately not. i think this thread might more interesting to you:

Does your router definitely support multicast?
If not then I understand that the GW will not work.
Not sure if you’d even get as far as you have with out multicast, but worth mentioning…

@syssi - who maintains the component docs for xiaomi_aqara?
It might be worth updating to include mention of the multicast requirement - I dont see it there.

Everybody is encouraged to update/change the docs. There is no maintainer in particular.

PR submitted :wink:

1 Like

Merged.
Now you are just 3 pr from getting a free T-shirt :slight_smile:

1 Like

I’ve got it working on Openhab 2, i suspect my router is multicast enabled. Does anyone else have this issue that may have a multicast enabled router?

Hi,

I dunno if some router can enable/disable multicast. But i’m sure that there are someones, that block multicast, and then the gateway can’t be discovered.

In my case i have a livebox, that this one blocked me the multicast and i needed to chage it by other one.

Thanks for the reply Garvarma, will move my secondary gateway to a different router and test and provide feedback.