jghaanstra/com.xiaomi-miio

Xiaomi Gateway v2 not responding

Robovh opened this issue · 12 comments

Robovh commented

I have adding the xiaomi gateway v2 to homey using the Xiaomi Mi Home app, which works fine.
But directly after adding the gateway to homey it stops responding within homey.
When clicking on the device I get this message:
thumbnail_Screenshot_20230710-113807

And this message when looking at the device:
thumbnail_Screenshot_20230710-113914

How can I solve this?

Diagnostic Report: 88639320-3d2c-4be1-ae99-d9eb2b5ac0f0

It's a bug, I'll see if I can fix it with the next release but it's tricky. Not sure why your device shows this error. Is it's firmware up to date?

Robovh commented

Yes I have received the gateway today and configured it in the Xiaomi app. After adding it to the app I updated the firmware and made sure everything was in order. Afterwards I added the gateway to homey using the Xiaomi Mi Home and it directly went to this error.

I have tried to add the sensors to homey which I configured in the Xiaomi app, but without succes (probably because of this bug). I also tried to re-add the gateway to see if that works, and also restarted the Xiaomi Mi Home app and even reinstalled it, all without succes.

I have seen once a brief moment in which the gateway had a light indicator (yellow dot) in the top right corder of the device, within homey instead of the traffic sign. But is was gone within seconds.

To me it looks like the Xiaomi Mi Home app tries to refresh some data which creates this situation.

As additional side information:
Xiaomi Mi Home app version: v3.2.11
Xiaomi Home (android) app version: 5.5.4
Xiaomi Gateway firmware version: 1.4.1_176.0220

While collecting some data I found that you can also configure the gateway within the Xiaomi Mi Home app configuration tab. Which I just did and this seems to do something, the gateway (within homey) has had several moments in which it becomes available but shortly after gets back to the current error.
It looks like it becomes availble for a couple of seconds after polling.
The process to add devices, though the gateway, seems normal now and doesnt result in an error anymore, but also doesnt give me any devices to add, so its not working yet.

I hope you can do something with this information. If there is anything else you need on information, please let me know.

Adding the device as WiFi device to control the light and alarm etc. is completely unrelated to adding the device as hub for Zigbee sub devices in the configuration tab. The error is only on the WiFi device for light and alarm etc. After adding the gateway as Zigbee gateway you should be able to add these Zigbee subdevices to Homey.

But you should only do this if you are having trouble using the Zigbee devices directly with Homey. Since you probably havent tried that yet you should try the aqara app first: https://homey.app/nl-nl/app/com.xiaomi-mi/Aqara/

Robovh commented

Well that’s good to know, then I found this bug accidentally.
I most definitely have used the aqara app, that’s actually the reason that I bought this gateway/hub. Since I apparently have the same issue as everybody else using the aqara/xiaomi motion sensors, that they stop responding after 20min/3hours.
For me I found out that the reason they stop responding is because they have a robb shop light as last zigbee router. Where if the last zigbee routing point would have been an ikea socket they will continue to work properly, but I cannot manually assign with zigbee router device is their last chain in the network.
Therefor my plan was to buy this gateway and add all zigbee devices to the gateway and let homey access them through the gateway in order to consistently be able to use them.

But if I understand correctly. When I configure the gateway in the Xiaomi Mi Home app config, I should be able to just click device and then add an aqara motion sensor (gateway) for example and it should be listed as long as I have one configured in the Xiaomi Home app?

But if I understand correctly. When I configure the gateway in the Xiaomi Mi Home app config, I should be able to just click device and then add an aqara motion sensor (gateway) for example and it should be listed as long as I have one configured in the Xiaomi Home app?

If the gateway has been correctly connected as a gateway under the app settings, then yes, it should work like this.

Robovh commented

Oke that’s good to know, I have check and in the app setting it states 0 devices. I’m currently trying if it makes a difference it the devices are added to the hub after it has been configured to homey or before. But that doesn’t seem to make a difference.

Robovh commented

I did some more testing today and the devices are indeed listed when the gateway is configured correctly in the app settings. After setting up the gateway in the app settings, the gateway ip and token fields are filled with default data but do have a green check (v) at the end.

I don’t know if entering the correct data there or just some time made the devices appear, but now I can add devices from the gateway to homey even just added ones.

Also within the settings tab where the gateways are listed, the gateway states “Connected Devices 0”. I don’t know if this means the amount of devices that are connected to the gateway, or the amount of devices that homey has connected from this gateway. If it is either one of those this value doesn’t seem to be updated.

image

Could you re-test the WiFi driver for the gateway this with release 3.2.12 which is currently pending approval in the test channel.

https://homey.app/a/com.xiaomi-miio/test/

Robovh commented

Hee @jghaanstra, I had some delay. Im currently trying to test this, since the version 3.2.12 has already auto updated to my Homey. But it seems I cannot add a Xiaomi Gateway v2 (WIFI) device, when I test connection it states "Could not connect to device, handshake timeout".

In my app it states that I have version v3.2.12, do I have to do something differently in order to get the test version?
Is there something else I might need to try?

Could not connect to device, handshake timeout".

This means your token is not correct. Try resetting the device and start from scratch.

Closing this issue due to inactivity. Please use the support forum if you still experience problems or open a new issue for a bug or feature request.

Robovh commented

Forgot to post response, my bad. But the problem is solved.