-
-
Notifications
You must be signed in to change notification settings - Fork 565
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 3/3H support (remastered) #634
Conversation
…t that, also implement MiotDevice class with basic support for MIoT protocol.
…eparate util class
…ng to an actual device
# Conflicts: # miio/ceil_cli.py # miio/device.py # miio/philips_eyecare_cli.py # miio/plug_cli.py # miio/tests/dummies.py # miio/tests/test_airconditioningcompanion.py # miio/tests/test_wifirepeater.py # miio/vacuum.py # miio/vacuum_cli.py
… out if no button was pressed since purifier started up
a0ea50a
to
6feed42
Compare
@foxel Do you experience same behavior with 3/3H? |
@lucidyan with Purifier 3 I got it working with no issues. I have it running with my HA installation for more than a week now. |
@foxel I edit comment a little, because figured out how to make alarm works. I think it's interesting and will be very glad if you try it with 3* model. Also is it a good idea to add a handler in I see already hardcoded solutions for similar problems: python-miio/miio/miioprotocol.py Line 194 in 9a7c6c4
|
after upgrade to new version Home Assistant 0.106.1 the air purify 3h not recognize like before, thank for help |
@pmasknguyen mine works well. I've checked 106. there were no changes in xiami-miio fan |
thank you I double checked and it works |
@lucidyan I've looked more closely thru the code and that miot specs and added some handling of possibly unavailable features, plus added buzzer volume. Please make some tests on your rare device |
b9eb3ea
to
31b0248
Compare
Hi, @rytilahti What's the plan for this one? |
@foxel Thanks a lot! I watch through your code and find one inaccuracy: Also in my |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I have been busy and that's why it has taken so long to do a review. Generally speaking it looks good to me, I just left a couple of comments behind.
miio/version.py
Outdated
@@ -1,2 +1,2 @@ | |||
# flake8: noqa | |||
__version__ = "0.4.8" | |||
__version__ = "0.5.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not bump the version in feature PRs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will keep in mind. I need this to make HA install this fork correctly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, could you please remove this and update the README to contain information about miot support & the new devices? I think we can merge and prepare a new release then 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@rytilahti please take another look |
a400d56
to
becd8a0
Compare
@rytilahti anything else? Can we proceed with this PR? |
Oh, sorry, I was waiting for updating the README file to contain the newly supported devices. If you could do that, I will do the merge and start preparations for a new release. |
@rytilahti I don't see a place for it in README, it's pretty general and states support for purifiers in common... |
Ah, okay, I suppose that's fine as it is then. Let's get this merged now! Thanks @petrkotek and @foxel! 🎉 |
Rebased copy of #585 - original description below:
Add support for basic operations for new Xiaomi Air Purifier 3/3H (
zhimi-airpurifier-mb3
andzhimi-airpurifier-ma4
(#577)).In order to support that, also implement
MiotDevice
class with basic support for MIoT protocol which theAirPurifierMiot
extends to retrieve & set properties.Mapping is based on #543 (comment) - thanks, it helped a lot!
Note
Disclaimer: this is my first contribution to this project & I don't have Python experience.
ToDo:
Manually tested operations:
info
(see output below)status
(see output below)off
on
set_buzzer <true|false>
set_child_lock <true|false>
set_fan_level <1-3>
set_favorite_level <0-14>
set_led <true|false>
set_led_brightness <off|dim|bright>
set_mode <auto|fan|favorite|silent>
Example output of
info
:Example output of
status
:Closes #577