To me it more sounds like a network-related hardware config/defect issue.
The detection of the gateway goes with a multicast message (please correct me if i’m wrong).
Does your router allow this messages and send it thought the complete network?
Maybe you can use a network sniffer to see this behavior?
Then install the sniffer on the same WiFi as the gateway.
Not sure if it is related to Xiaomi component we are using… But… Is there a way to pass an API call to the gateway to control a wifi device connected to Mi Home? Have a Philips Xiaomi Eyecare lamp
All API supported on the gateway is already exposed in the component. For the lamp, it might have API based on TCP/UDP to control it but i don’t think it is related to the gateway (zigbee only) at all.
Is there a known date for official component release in home assistant? Can I expect this plugin in the next version? Or are there still issues or bugs in the component?
Yes i guess it’s an TCP/UDP. Just wondering how it works.
I managed to create s rule in Mi Home that pressing a zigbee button will switch the lamp on and off. So those rules are cloud based? Or is it the gateway handling the TCP/UPD commands?
Does it go like
Scenario A
Button-Gateway-Cloud-Gateway-Lamp
Scenario B
Button-Gateway-Lamp
Make vol.Schema for the gateways, not only test for list
Make sure flake8 and pylint pass (There are a lot of too long lines and invalid variable names)
sid is not very user friendly, so I think it would be better to have the user give the mac address. Then we should convert the mac address to the sid.
Move class XiaomiComponent to a separate library.
Split up class XiaomiGateway and move to the same library. (The external library should not have any HA code, so XIAOMI_HA_DEVICES should not be part of that library)
(The binary sensors are not actually binary. I am not sure how we should solve this, but specially the cube could be moved to a sensor. Where the state is the last action?)
Point 2, 3 and 4 could be a good start. But the pending pull request should be merged before starting with number 3
Once again thanks for this grate integration and look forward to send some beer to rave for all his hard work.
But in meanwhile i have a problem with the integration of the hub and home assistant.
So all is good all the components are in the Home Assistant and i receive updates of each individual component state.
As example i have a motion sensor and a door/window switch that works fine in home assistant.
But the plug and the gateway although i see it in HA and receives it’s state cannot be controlled from the HA. So if i push the button on the plug it turns on and the state changes in HA but cannot be turn off from the HA, same with the hub.
I read somewhere that i have to add the mack address of the gateway in config next to sid, deed that nothing i circulated the codes in the app with no result. I tried different combination like spaces of the mac address.
So if anyone can help please let me know, any help is much appreciated.
I have the latest version of hass and i copied the latest version of the xiaomi component.
Thanks
17-01-30 20:24:49 custom_components.xiaomi: No gateway discovered
17-01-30 20:24:49 homeassistant.bootstrap: component xiaomi failed to initialize
Setup the inferface with the IP of the hub - that also doesn’t seem to work
17-01-30 20:18:02 homeassistant.bootstrap: Error during setup of component xiaomi
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/bootstrap.py”, line 151, in _async_setup_component
None, component.setup, hass, 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 48, in setup
comp = XiaomiComponent(hass, gateways, interface);
File “/home/homeassistant/.homeassistant/custom_components/xiaomi.py”, line 94, in init
self._socket.bind((interface, 0))
OSError: [Errno 99] Cannot assign requested address
17-01-30 20:18:14 pywemo.subscribe: Received event for unregistered device 192.168.0.197
17-01-30 20:18:32 plexapi: http://192.168.0.100:32400: (401) unauthorized
I also got this installed @jmvermeulen but this is certainly above my pay grade, not sure what I am looking for its all foreign to me.
Do you think doing a full factory reset of the hub help? - start again… Maybe start with a clean slate for HASS too see if that helps the situation…
Strangely I got it working… then it reverted back after turning on the 5ghz network, switched the network back off and still nothing… then rebooted the router and it came up.
I wonder why I can only get it working when I only have 2.4ghz enabled.