[APP][Pro] Xiaomi Mi Home App

Seems the crashing of the App happens on a daily bases:

After a restart of the App, all is fine again.

Unfortunately, I can’t sent a diagnostic code (Android beta App crashes when opening the App settings). The restart solves it, so no real problem for me. Just wanted to inform you @Phuturist

Same here. People will blame you for not having a … whatever.
I handle this situation with a flow. Twice a day, the app is restarted. Once at 11h55 and once at 23h55.
Problem solved. Mostly.

1 Like

Without any information it’s hard to troubleshoot this. The crashing app settings is a known issue and I assume is being worked on by Athom. Do send a diagnostic report when it works again. In the mean time, could you check the apps memory usage from Insights to see if it increases over time. This would indicate a memory leak.

1 Like

I really think you shouldn’t bother about this. I believe this to be a zigbee-issue.

I have the App restart a couple of times a day. I do see the memory usage increase:

I will disable the ‘restart flow’ and see what happens!

PS
This is the graph of this week…

That definitely looks like a memory leak. These are really hard to fix.

As @Jan_Peeters suggests it’s probably somewhere in the libraries used to connect the ZigBee devices and it would explain why some users are affected by this. These libraries are mostly not maintained anymore.

Could you list the devices you have connected through the Xiaomi Mi Home app. If we can see a pattern among the users affected perhaps that helps a bit

I have temporary moved the fan close to the WiFi router, but this does not change anything. Controlling the fan by the Xiaomi Home App works without problems. Do you have any other ideas or suggestions?

Nope sorry, not a clue. As there is no official API some none descriptive error like user ack timeout could be anything really. Do some googling and you’ll see more weird issues with Xiaomi devices using this non official way of integration.

Yes, I see memory use increase:

These are the devices I have included to your App:

Let me know if you need more information! Happy to help.

Can you also send me a diagnostic report after the app has been running for some time (preferably shortly before it crashes which should be around 80Mb of men usage).

Seems a bit more stable (slower to eat away memory).

I sent diagnose report (perhaps multiple, the new Android beta app is not so clear)

From the app settings (and not the Homey settings)? I havent received any reports.

Yes, via the App settings. Will try again!

ccdd8f3e-284e-4458-8e6e-b25a44e247e6

Too bad, nothing in there that points to something like a memory leak.

I will post another one when the memory is higher. Perhaps that helps…

New one: 0f359447-a6da-4177-8835-7258422c7357

After the App updated, the memory issue seems solved:

Na de laatste update is de App herstart (duh…) en het geheugen gebruik:

2 Likes

Please let it run for a while. If it really is solved the memory leak might actually have been in a WiFi driver and most likely even related to Homey’s SDK (instead of external libraries).

Seems solved!

After the update, the memory used does’t built up.

I’ll keep it running and let you know if it stays this stable.

2 Likes

I can confirm, great job @Phuturist . Just out of curiosity, is it specific to your app or it might influence also to some others apps ? Just curious…

That’s good to hear. The memory leak is/was probably specific to my app although I cant be sure. It’s related to a setTimeout function which sets the device as unavailable when an error is encountered. The function which is then triggered in my app contains some miio related code which I guess was causing a leak. As I fixed a bug in the Dmaker fan the device was not set as unavailable anymore and the code probably causing the leak is not triggered anymore.

3 Likes