OK I have been messing around for a few days now I decided to do another reset and now I’m getting new errors.
Also is there anyway to do a full factory reset?
The following errors have been logged this session:
2017-06-03 17:52:29 ERROR (MainThread) [homeassistant.setup] Error during setup of component xiaomi
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/setup.py”, line 188, in _async_setup_component
None, component.setup, hass, processed_config)
File “/usr/lib/python3.4/asyncio/futures.py”, line 388, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.4/asyncio/tasks.py”, line 286, in _wakeup
value = future.result()
File “/usr/lib/python3.4/asyncio/futures.py”, line 277, in result
raise self._exception
File “/usr/lib/python3.4/concurrent/futures/thread.py”, line 54, in run
result = self.fn(*self.args, **self.kwargs)
File “/home/homeassistant/.homeassistant/custom_components/xiaomi.py”, line 75, in setup
PY_XIAOMI_GATEWAY = PyXiaomiGateway(hass, gateways, interface)
File “/home/homeassistant/.homeassistant/custom_components/xiaomi.py”, line 178, in init
self._socket.bind((interface, 0))
OSError: [Errno 99] Cannot assign requested address
EDIT
Just did a fresh install of hassbian to see if it was something I had done looks like it wasn’t, if i add in interface: [gateway ip] I get the error up above if I try without it i get
Jun 04 00:18:44 hassbian hass[735]: 2017-06-04 00:18:44 INFO (Thread-12) [custom_components.xiaomi] Gateway finding finished in 5 seconds
Jun 04 00:18:44 hassbian hass[735]: 2017-06-04 00:18:44 INFO (Thread-12) [custom_components.xiaomi] Discovering Xiaomi Gateways (Try 2)
Jun 04 00:18:49 hassbian hass[735]: 2017-06-04 00:18:49 WARNING (MainThread) [homeassistant.setup] Setup of xiaomi is taking over 10 seconds.
Jun 04 00:18:49 hassbian hass[735]: 2017-06-04 00:18:49 INFO (Thread-12) [custom_components.xiaomi] Gateway finding finished in 5 seconds
Jun 04 00:18:49 hassbian hass[735]: 2017-06-04 00:18:49 INFO (Thread-12) [custom_components.xiaomi] Discovering Xiaomi Gateways (Try 3)
Its driving me crazy trying to get this to work
EDIT2
It still works if I unplug the gayway and then restart HASS but still only for a minuet or 2, I looked at the logs just after clicks of a button stoped showing up and there was this
Jun 04 00:38:37 hassbian hass[735]: 2017-06-04 00:38:37 ERROR (Thread-11) [custom_components.xiaomi] Got error element in data {“error”:“Invalid key”}
I know the key is the same in my config as the app on my android phone.
SOLUTION
OK I have it working now it turns out that my router doesn’t play nice with the gateways multicast, so I have a new router in and its all working.