Xiaomi Gateway Integration

I seem to be getting this error message quite often lately.

However, I can still control gateway light via HASS which means gateway is working?

Is this a known problem?

2017-08-22 18:49:05 WARNING (MainThread) [homeassistant.helpers.entity] Update of binary_sensor.motion_sensor_158d000155df00 is taking over 10 seconds 2017-08-22 18:49:05 ERROR (Thread-11) [PyXiaomiGateway] Cannot connect to Gateway 2017-08-22 18:49:05 ERROR (Thread-11) [PyXiaomiGateway] No data in response from hub None 2017-08-22 18:52:24 ERROR (Thread-5) [homeassistant.components.light.yeelight] Unable to update bulb status: A socket error occurred when sending the command. 2017-08-22 19:05:06 WARNING (MainThread) [homeassistant.helpers.entity] Update of binary_sensor.motion_sensor_158d000155df00 is taking over 10 seconds 2017-08-22 19:05:06 ERROR (Thread-5) [PyXiaomiGateway] Cannot connect to Gateway 2017-08-22 19:05:06 ERROR (Thread-5) [PyXiaomiGateway] No data in response from hub None 2017-08-22 19:14:54 WARNING (MainThread) [homeassistant.helpers.entity] Update of binary_sensor.motion_sensor_158d000155df00 is taking over 10 seconds 2017-08-22 19:14:54 ERROR (Thread-8) [PyXiaomiGateway] Cannot connect to Gateway 2017-08-22 19:14:54 ERROR (Thread-8) [PyXiaomiGateway] No data in response from hub None 2017-08-22 19:21:23 ERROR (Thread-2) [homeassistant.components.light.yeelight] Unable to update bulb status: Bulb closed the connection. 2017-08-22 19:22:07 WARNING (MainThread) [homeassistant.helpers.entity] Update of binary_sensor.motion_sensor_158d000155df00 is taking over 10 seconds 2017-08-22 19:22:07 ERROR (Thread-7) [PyXiaomiGateway] Cannot connect to Gateway 2017-08-22 19:22:07 ERROR (Thread-7) [PyXiaomiGateway] No data in response from hub None 2017-08-22 19:23:53 ERROR (Thread-6) [homeassistant.components.light.yeelight] Unable to update bulb status: A socket error occurred when sending the command. 2017-08-22 19:25:13 WARNING (MainThread) [homeassistant.helpers.entity] Update of binary_sensor.motion_sensor_158d000155df00 is taking over 10 seconds 2017-08-22 19:25:13 ERROR (Thread-11) [PyXiaomiGateway] Cannot connect to Gateway 2017-08-22 19:25:13 ERROR (Thread-11) [PyXiaomiGateway] No data in response from hub None 2017-08-22 19:26:15 WARNING (MainThread) [homeassistant.helpers.entity] Update of binary_sensor.motion_sensor_158d000155df00 is taking over 10 seconds 2017-08-22 19:26:15 ERROR (Thread-7) [PyXiaomiGateway] Cannot connect to Gateway 2017-08-22 19:26:15 ERROR (Thread-7) [PyXiaomiGateway] No data in response from hub None 2017-08-22 19:30:54 WARNING (MainThread) [homeassistant.helpers.entity] Update of binary_sensor.motion_sensor_158d000155df00 is taking over 10 seconds 2017-08-22 19:30:54 ERROR (Thread-3) [PyXiaomiGateway] Cannot connect to Gateway 2017-08-22 19:30:54 ERROR (Thread-3) [PyXiaomiGateway] No data in response from hub None 2017-08-22 19:32:27 WARNING (MainThread) [homeassistant.helpers.entity] Update of binary_sensor.motion_sensor_158d000155df00 is taking over 10 seconds 2017-08-22 19:32:27 ERROR (Thread-3) [PyXiaomiGateway] Cannot connect to Gateway 2017-08-22 19:32:27 ERROR (Thread-3) [PyXiaomiGateway] No data in response from hub None 2017-08-22 19:47:57 WARNING (MainThread) [homeassistant.helpers.entity] Update of binary_sensor.motion_sensor_158d000155df00 is taking over 10 seconds 2017-08-22 19:47:57 ERROR (Thread-3) [PyXiaomiGateway] Cannot connect to Gateway 2017-08-22 19:47:57 ERROR (Thread-3) [PyXiaomiGateway] No data in response from hub None 2017-08-22 19:54:40 WARNING (MainThread) [homeassistant.helpers.entity] Update of binary_sensor.motion_sensor_158d000155df00 is taking over 10 seconds 2017-08-22 19:54:40 ERROR (Thread-11) [PyXiaomiGateway] Cannot connect to Gateway 2017-08-22 19:54:40 ERROR (Thread-11) [PyXiaomiGateway] No data in response from hub None 2017-08-22 20:46:08 WARNING (MainThread) [homeassistant.helpers.entity] Update for light.lr_standing_lamp is already in progress 2017-08-22 20:50:55 WARNING (MainThread) [homeassistant.helpers.entity] Update of binary_sensor.motion_sensor_158d000155df00 is taking over 10 seconds 2017-08-22 20:50:55 ERROR (Thread-2) [PyXiaomiGateway] Cannot connect to Gateway 2017-08-22 20:50:55 ERROR (Thread-2) [PyXiaomiGateway] No data in response from hub None

Im wondering how do you install this? I am on raspberry pi 3 virtualenv.
thanks

Just put the xiaomiplug.py in your custom components folder.

This topic should be moved, it’s not a Third party integration anymore? or just create a new one and move on…

1 Like

Hi @sjee I am not sure where is the custom component folder? Is there a manual or official guide surrounding this? Thanks

As @syssi wrote you’re in the wrong topic. This is the one dailing with the wifi plug https://community.home-assistant.io/t/xiaomi-mi-wifi-plug-air-purifier

As for the custom component folder, it depends on you installation but it’s probably here:
/home/homeassistant/.homeassistant/custom_components

1 Like

Hi @sjee @syssi
Thanks but in my HASS instance, i cant find that folder custom_component.
Sorry if this is in the wrong thread/topic, I’ll ask on the other thread
Cheers

This is fine. Just create the custom_component folder. It should look like this:

$ find .homeassistant
.homeassistant
.homeassistant/custom_components
.homeassistant/custom_components/switch
.homeassistant/custom_components/switch/xiaomiplug.py
.homeassistant/.HA_VERSION
.homeassistant/home-assistant.log
.homeassistant/automations.yaml
.homeassistant/groups.yaml
.homeassistant/configuration.yaml
[...]

The configuration.yaml is a good orientation.

Please open a new topic at least! :slight_smile: A lot of information is getting lost here because of the infinite length.

1 Like

Lets vote!

  • Close/lock the thread since the xiaomi component is now in core HA. We’ll need to start new threads about specific aspects of Xiaomi zigbee device operation etc. This thread will remain as a searchable resource.
  • Leave the thread open and continue the chat :slight_smile: this place is fun!

0 voters

Hello again.

Any idea if component might also work for this Smart Lamp?

https://www.gearbest.com/table-lamps/pp_393727.html

Does anyone know if this one instead is controllable via above component or any other?

https://www.gearbest.com/table-lamps/pp_363779.html

I want to buy a new office lamp, but wanted it to be HASS-compatible…

Thanks in advance.

The lamp is supported by python-mirobo (python library). The basic functionality (on/off) should work with Xiaomi Philips Lights integration by syssi · Pull Request #9087 · home-assistant/core · GitHub in future. If you help, we can extend the feature set. :slight_smile:

OK 2nd gateway arrived and lucky I was working at home today :wink:
So got it working in HA and removed the 2 switched (1 single and 1 double) from the old gateway and added them to the new gateway! WOO HOO we have working switches again. It keeps saying please update the firmware, but I don’t need to use the app now :slight_smile:

Thankfully I only need switches upstairs where the 2nd gateway is… Just thought I would pass this info on.

1 Like

1 really annoying issue with the older firmware. You cannot add the newer body motion/luminance sensors to a gateway with it. That has bugged me now. Spent ages trying to add several that I had working on the other gateway with new firmware… just wouldn’t add. tried back on the old gateway, straight in. Tried and older just motion sensor adds to both old and new firmware… ok I am annoyed! :slight_smile:

Don’t worry and wait some days. There will be a release of a new gateway firmware soon.

1 Like

that will be great news… thanks for the heads up :slight_smile:

Great news, hope it fixes the issue! and thank you @MarkR for the info :slight_smile:

Good question. I also have the same problem (with random PIR’s). The only way I can revert the state is deleting the database file (*.db in the homeassistant folder). Since the historic is not important i prefer losing that information and having the correct sensor working.

It’s a feature. HASS saves all states on shutdown and reconstructs the complete state on boot up. The result is a conserved state. If the gateway provides new data the new data is applied afterwards. If the gateway provides a wrong state for the PIR the wrong state remains.

Please report to the developers using the feedback option.
The more people report the problems, the better is might be.

1 Like