seikan / homebridge-mi-air-purifier

A Xiaomi Mi air purifier plugin for Homebridge.
Other
172 stars 65 forks source link

Xiaomi Mi Air Purifier 2H - Slow response in Home App on start #72

Open panjakubpl opened 4 years ago

panjakubpl commented 4 years ago

I have Xiaomi Mi Air Purifier 2H. I’ve successfully added this device to the Home App via Homebridge (I use 1.2.2 version of this plugin). One thing is strange - when I open Home app, it takes few seconds to discover Mi Air Purifier 2H, but first there is always the sign “No response”. When I switch to another tab of the Home App and go back to Favorites, then it works fine. Any ideas why does it happening?

jesperrc2018 commented 4 years ago

same problem here with 2H.

panjakubpl commented 4 years ago

Solution is quite easy - dedicated RaspberryPi only for the Air Purifier (as the only device installed via HomeBridge). I've tested many different options and this one looks the best.

jesperrc2018 commented 4 years ago

Thank you for quick response.

adamrzanek commented 4 years ago

Is somebody resolved this?

fuomag9 commented 4 years ago

@adamrzanek @panjakubpl Something I'll try today is if making another plugin that queries this one can actually improve the delay by using cached data in the meantime, but I'm not too sure about that

panjakubpl commented 4 years ago

@adamrzanek @panjakubpl Something I'll try today is if making another plugin that queries this one can actually improve the delay by using cached data in the meantime, but I'm not too sure about that

Hey there, that would be great!!! It's not so comfortable to use this plugin, when there is a few seconds delay.

Video

What is more - in my case, my device works only on version 1.2.2. Anyone knows why?

fuomag9 commented 4 years ago

@adamrzanek @panjakubpl Something I'll try today is if making another plugin that queries this one can actually improve the delay by using cached data in the meantime, but I'm not too sure about that

Hey there, that would be great!!! It's not so comfortable to use this plugin, when there is a few seconds delay.

Video

What is more - in my case, my device works only on version 1.2.2. Anyone knows why?

My device (2H) only works with 1.2.2 too, it's probably an issue with the code itself. I've opted for editing the plugin itself instead of making another one, it should make things easier. I'll update you if I manage to fix the issue!

panjakubpl commented 4 years ago

@adamrzanek @panjakubpl Something I'll try today is if making another plugin that queries this one can actually improve the delay by using cached data in the meantime, but I'm not too sure about that

Hey there, that would be great!!! It's not so comfortable to use this plugin, when there is a few seconds delay.

Video

What is more - in my case, my device works only on version 1.2.2. Anyone knows why?

My device (2H) only works with 1.2.2 too, it's probably an issue with the code itself. I've opted for editing the plugin itself instead of making another one, it should make things easier. I'll update you if I manage to fix the issue!

Great...! Many thanks 👍🏻🙂

jesperrc2018 commented 4 years ago

Hi, I just managed to get my 2H to work with v_1.4.0 with no problems at all. Just add the Air Purifier 2H to the list of supported Air Purifiers in models.js, and that's it.

// Air Purifier 2H 'zhimi.airpurifier.mc2': AirPurifier,

'~/.hoobs/node_modules/miio/lib/models.js' https://github.com/aholstenson/miio/blob/master/lib/models.js

panjakubpl commented 4 years ago

Hi,

I just managed to get my 2H to work with v_1.4.0 with no problems at all.

Just add the Air Purifier 2H to the list of supported Air Purifiers in models.js, and that's it.

// Air Purifier 2H

'zhimi.airpurifier.mc2': AirPurifier,

'~/.hoobs/node_modules/miio/lib/models.js'

https://github.com/aholstenson/miio/blob/master/lib/models.js

Hey, after updating your software to 1.4.0 and changing what you have described - do you still have lags like in my case on lower version of the software?

Lags on 1.2.2

jesperrc2018 commented 4 years ago

I haven't experienced that yet, but i did on 1.2.2.

panjakubpl commented 4 years ago

I haven't experienced that yet, but i did on 1.2.2.

Great, I will check your solution and share my feedback. I hope it will help me as well.