Xiaomi Temperature sensor set up error

I am trying to set up some Xiaomi aqara sensor on home assistant. I managed to pair the gateway following this instruction : https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)#Adding_the_Xiaomi_Gateway_to_Domoticz

but when I try to pair my aqara temperature sensors I get this error in the logs :

2018-06-22 20:09:00 ERROR (MainThread) [homeassistant.setup] Error during setup of component xiaomi_aqara
Traceback (most recent call last):
File “/usr/src/app/homeassistant/setup.py”, line 146, in _async_setup_component
component.setup, hass, processed_config) # type: ignore
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/app/homeassistant/components/xiaomi_aqara.py”, line 127, in setup
hass.add_job, gateways, interface)
File “/usr/local/lib/python3.6/site-packages/xiaomi_gateway/init.py”, line 35, in init
self._socket.bind((interface, 0))
OSError: [Errno 99] Cannot assign requested address
2018-06-22 20:09:13 WARNING (SyncWorker_5) [netdisco.ssdp] Error fetching description at http://192.168.1.250:1990/a1f53cf4-d63c-4363-ad33-9bc98d6a8864/WFADevice.xml
2018-06-22 20:09:13 WARNING (SyncWorker_5) [netdisco.ssdp] Error fetching description at http://192.168.1.3:37215/00e0fc37-2525-2828-2500-d0ff9876e4ff/upnpdev.xml

I try pairing the sensor on my phone with the Mi Home app and it worked no problem. Any idea what is the problem?

If you have paired the sensor with the app it should be auto discovered by ha after a restart. After a restart go to dev panel states and you should see it listed as binary_sensor.temp with a random number after. I’m away from my system atm so can’t give you a screenshot.

Thank you for the reply.

I did a restart of home assistant and this is when I get the error. In the Dev panel I cannot see any new sensor.

For clarification I m not on Hass.io, I am on home assistant installed via docker. If that has any implication or not?

Can you see your gateway listed in states?

Good point. I just checked and the gateway is not present in the state. I ll reinstall and see if it change.

Edit: I managed to make it work. I just removed the line interface: '192.168.1.16' and it worked after a restart even if it was the IP of the gateway. Thank you for pointing out the gateway missing in the states.

1 Like

Yeah you only need the ip config if you have more then one gateway. Glad you got it sorted