merdok / homebridge-miot

Homebridge plugin for devices supporting the Xiaomi miot protocol
MIT License
395 stars 63 forks source link

Mi Air Purifier 3H issue #175

Closed rgreco87 closed 2 years ago

rgreco87 commented 2 years ago

With your plug-in, my Mi Air Purifier 3H becomes unresponsive and can’t be controlled through both HomeKit and Mi Home app.

merdok commented 2 years ago

Well with the little information which you provided i suspect that it might be due to network issues on your side. It might also be that you are sending to many requests to the device in that case you would need to reduce the polling interval.

rgreco87 commented 2 years ago

Well with the little information which you provided i suspect that it might be due to network issues on your side. It might also be that you are sending to many requests to the device in that case you would need to reduce the polling interval.

This is what I see in the log:

[1/19/2022, 3:56:31 PM] [miot] [Purificatore] Connected to device: zhimi.airpurifier.mb3
[1/19/2022, 3:56:31 PM] [miot] [Purificatore] Setting up device!
[1/19/2022, 3:56:31 PM] [miot] [Purificatore] Doing device specific setup
[1/19/2022, 3:56:31 PM] [miot] [Purificatore] Doing initial property fetch
[1/19/2022, 3:56:31 PM] [miot] [Purificatore] Device setup finished! Device ready, you can now control your device!
[1/19/2022, 3:56:32 PM] [miot] [Purificatore] Device total use time: 450 minutes.
[1/19/2022, 3:56:32 PM] [miot] [Purificatore] Use time: 450 minutes.
[1/19/2022, 3:56:32 PM] [miot] [Purificatore] Filter life level: 90%.
[1/19/2022, 3:56:32 PM] [miot] [Purificatore] Filter used time: 323 hours.
[1/19/2022, 4:01:04 PM] [miot] [Purificatore] Poll failed 4 times in a row! Stopping polling and trying to reconnect! Reason: Error: busy.

I already changed polling interval from 7 (your default value) to 10 seconds but I still got this error.

merdok commented 2 years ago

"Error: busy" means that the device is getting to many commands. Maybe you have different software accessing the same device, other plugins maybe? You need to even further reduce the polling interval then. You can also try to reset your device which might also help here.

rgreco87 commented 2 years ago

"Error: busy" means that the device is getting to many commands. Maybe you have different software accessing the same device, other plugins maybe? You need to even further reduce the polling interval then. You can also try to reset your device which might also help here.

I already did a hard reset and I have no other plugins related to Mi Air Purifier. I reduced polling interval to 5 seconds, let’s see how it will work.

merdok commented 2 years ago

There is nothing i can do about the Error: busy message, this basically means that the device takes a lot of time processing commands, maybe you have other devices pinging or sending messages constantly to that device? You should set the polling interval to maybe 20 or 30 seconds to be sure.

rgreco87 commented 2 years ago

There is nothing i can do about the Error: busy message, this basically means that the device takes a lot of time processing commands, maybe you have other devices pinging or sending messages constantly to that device? You should set the polling interval to maybe 20 or 30 seconds to be sure.

No, as I already said I have no other devices pinging to Mi Air Purifier. I had no issue using other (old) homebridge plugins for Mi Air Purifier 3H, it just happens with yours.

merdok commented 2 years ago

If that is indeed the case then the only thing which i can recommended you is to set your polling interval to 20-30 seconds (maybe even higher). I guess your device does not like to get contacted often...

rgreco87 commented 2 years ago

EC6BC138-6721-4326-A67F-D7EF8184AE26

rgreco87 commented 2 years ago

I have a new issue since you updated your plugin to v1.0

merdok commented 2 years ago

For user ack timeout you should try to reset your device.

rgreco87 commented 2 years ago

For user ack timeout you should try to reset your device.

I already did it yesterday and then I re-added to your plug-in with the new token. So this is NOT the solution.

merdok commented 2 years ago

You are spamming your device too much with request. No idea from where they come. This is not an issue with the plugin but with your device which is just getting too many requests. You have to investigate your network and find the fix. There is unfortunately nothing i can do about it.