New Xiaomi gateway firmware (xiaomi_aqara component)

Just make sure you read and implement steps 2,3 and 4 before continuing :wink:

LOL.

BTW is also a firmware update for lights and other sensor (?).


Can we proceed?

It’s just plug-in updates for MiHome app. Each smart product has own plug-in - interface to manage this gadget and visualize data

I updated all, restart HA and now the component doesn’t work :sweat_smile:

In which version of HASS? Did you update HASS also? I had some issues with the last HASS update also, that’s why I’m asking.

I find out.

I had to confirm again the lan communication protocol (without changing the key) and it started again!

right @Danielhiversen I have followed whatever has been mentioned here and on github, I installed all the following:

sudo apt-get update
sudo apt-get install build-essential libssl-dev libffi-dev python3-dev
sudo pip3 install cryptography
sudo pip3 install PyXiaomiGateway==0.6.0

but yet nothing works my error log is:

WARNING (Recorder) [homeassistant.components.recorder] Ended unfinished session (id=442 from 2017-11-20 23:29:39)
 WARNING (MainThread) [homeassistant.components.xiaomi_aqara] Key is not provided for gateway None. Controlling the gateway will not be possible.

and my configuration.yaml is:

xiaomi_aqara:
  interface: '192.168.0.1'
  gateways:
    - mac:
    - key: wo51urjssl6****

I have noticed when I put the xiaomi_aqara component in my configuration.yaml I cannot access the frontend i.e. my HA website. and I get (Recorder) [homeassistant.components.recorder] Ended unfinished session (id=442 from 2017-11-20 23:29:39) when I restart HA but as soon as I remove the xiaomi_aqara component from my configuration.yaml everything works well and I dont get (Recorder) [homeassistant.components.recorder] Ended unfinished session (id=442 from 2017-11-20 23:29:39)

and I get this error:

2017-11-20 23:36:21 ERROR (MainThread) [homeassistant.setup] Error during setup of component xiaomi_aqara
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/setup.py", line 193, in _async_setup_component
    component.setup, hass, processed_config)
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 332, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
    future.result()
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 245, in result
    raise self._exception
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/xiaomi_aqara.py", line 110, in setup
    hass.add_job, gateways, interface)
  File "/srv/homeassistant/lib/python3.6/site-packages/PyXiaomiGateway/__init__.py", line 32, in __init__
    self._socket.bind((interface, 0))
OSError: [Errno 99] Cannot assign requested address

Someone please help me I am running HA Virtual install 0.58

Thanks.

Remove the - in front of key
And try without the interface line

1 Like

This works perfectly for me in my config file

xiaomi_aqara:
  discovery_retry: 5
  gateways:
    - key: mykey
1 Like

That solved it thanks buddy

how do you get the key now with the updated MI home app ?

having the same problem , did you use another andriod device ?

Hey @Danielhiversen is it possible to set the radio of the gateway to your country and have all the smart home features working?

Radio is not supported without some hackery to redirect the gateway calls to your own server. Search around on this forum as it was posted about before

Searched on this forum couldn’t find it mate.

Agree - hard to find as the search returns topics not posts.

Here is the one I meant:

1 Like

well it means I need to change the DNS server of my router to access local radio stations?

More than that - also need some kind of server that reformat the audio to a weird format that xiaomi use

2 Likes

Did you ever find the answer to this question? I’m having a hard time finding the password in the Mi Home app with the new interface…anyone know where to find it?

Just in case anyone comes across this in the future, I think the issue was that I was selecting the US server instead of “Mainland China” (not sure what that has to do with connecting my door sensors to the gateway). Anyway, I selected “Mainland China” and then I was able to pair my sensors.