-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Air Purifier Pro Fan Speed is not correct + solution #25
Comments
Thank you so much, I've encounter the same issue. Could you create a Pull Request for it? |
You are welcome. I created the pull request. |
I have same issue. |
Thank you for sharing, I exactly have the same issue. Really thanks! |
Hello, can you help me? It's not working for me. I have this config in my Homebridge: Am I right that the slider is in Air on/of menu? It's the second. Thanks! |
I experienced the following issues with the Air Purifier Pro:
After research I found out that:
when using this plugin and adjusting the
FAN SPEED
inMANUAL
mode in the Home App, theFAN SPEED
slider has values from 0-100. This plugin translates the slider setting to a number between 0 and 10, so sending out this parsed value to the purifier. I assume the reason is that other Xiaomi Air Purifiers using fan speed setting from 0 - 10. However Air Purifier Pro supports 17 different values for theFAN SPEED
(in Mi App the minimum setting is 7-12m2 and the maximum is 35~60m2). All together there are 17 different values are available. Because the plugin limit is 10, so the maximum setting stops around ~60%. When the plugin checks for the actual fan speed to adjust the slider position, the same incorrect calculation results in setting the slider to the lower range instead of the actual speed.I modified
MiAirPurifierPro.js
file in order to make it work properly. The following changes has to be done:in line 255 the following
IF
blockhas to be replaced by
line 279:
has to be replaced by
and line 290:
has to be replaced by
I can't confirm that this issue exists with any other purifier as I don't have them.
I found the
MiAirPurifierPro.js
file at the following location on my Raspberry Pi but you may have it somewhere else:/usr/lib/node_modules/homebridge-mi-airpurifier/Devices
To make it more easier I copied my modified
MiAirPurifierPro.js
here, so you may replace the entire file:The text was updated successfully, but these errors were encountered: