xiaomi_airpurifier icon indicating copy to clipboard operation
xiaomi_airpurifier copied to clipboard

Add Mi Air Purifier 3C (zhimi.airpurifier.mb4) support

Open MarcE85 opened this issue 4 years ago β€’ 61 comments

Hey,

could you please add support for the Xiaomi Air purifier C3. miiocli info attached:

Model: zhimi.airpurifier.mb4
Hardware version: esp32
Firmware version: 2.0.8

Regards Marc

MarcE85 avatar Dec 04 '20 10:12 MarcE85

@MarcE85 I received this air purifier couple of days ago and now I'm working on that

arturdobo avatar Dec 11 '20 20:12 arturdobo

It turned out to be a little bit more difficult than I thought. First, the following issue needs to be resolved in python-miio

arturdobo avatar Dec 11 '20 23:12 arturdobo

Im interested un this integration too

asiersan avatar Dec 29 '20 16:12 asiersan

https://github.com/rytilahti/python-miio/pull/899 has been created in python-miio

arturdobo avatar Jan 01 '21 17:01 arturdobo

I'm also interested in this integration, any ideas in which timeframe this can be added?

TomStarren avatar Jan 12 '21 12:01 TomStarren

@TomStarren as I mentioned above, first PR in python-miio needs to be merged. So it's good to ask there about reviewing status ;)

arturdobo avatar Jan 12 '21 12:01 arturdobo

https://github.com/rytilahti/python-miio/pull/899 has been merged

arturdobo avatar Feb 07 '21 20:02 arturdobo

rytilahti/python-miio#899 has been merged

So now??

asiersan avatar Feb 07 '21 21:02 asiersan

Once the newest version of python-miio is released, integration with 3C in this repo can be added πŸ˜‰

@syssi What's the relation between this repo and the same code in the HA repo? I saw there is some problem regarding adding new integrations with Xiaomi devices to HA using the old way. Could you more details? Is there any work in progress to improve that?

arturdobo avatar Feb 09 '21 18:02 arturdobo

@arturdobo Take a look at this paragraph: https://github.com/syssi/xiaomi_airpurifier/#what-is-the-difference-between-this-custom-component-and-the-one-in-home-assistant-core

One point is missing: We are abusing attributes to provide the values of some properties (temperature, humiditiy, etc.) at the moment. This isn't allowed anymore. A device (the Air Purifier) must register multiple entities (fan, sensor, binary_sensor, switch, etc.) now. The xiaomi_miio component must be refactored. @starkillerOG is doing some great work here already (https://github.com/rytilahti/python-miio/issues/929). I'm trying to provide support as much as I can.

syssi avatar Feb 09 '21 19:02 syssi

Feel free to provide a pull request for this custom component as first step to support your device. I'm trying to refactor the component to be merged as official HA component again some day.

syssi avatar Feb 09 '21 19:02 syssi

Any update?

asiersan avatar Feb 20 '21 04:02 asiersan

nope

arturdobo avatar Feb 21 '21 17:02 arturdobo

We need wait update "zhimi.airpurifier.mb4"

nefsolive avatar Feb 21 '21 19:02 nefsolive

Things a little bit changed and now it'd be better to wait until this is merged. Then I believe the newest version of python-miio will be released so adding a new device should be easier.

arturdobo avatar Feb 21 '21 20:02 arturdobo

As soon as it becomes possible to work zhimi.airpurifier.mb4, I also hope to find a possible plugin for domoticz

nefsolive avatar Feb 21 '21 20:02 nefsolive

Does domoticz use python-miio directly, or is there any middleware?

arturdobo avatar Feb 21 '21 20:02 arturdobo

Like this on https://github.com/xiaoyao9184/DomoticzXiaomiPlugins and this plugin use python-miio. But i think, they need be updated too!

nefsolive avatar Feb 21 '21 20:02 nefsolive

At the first glance, it looks like only the only thing you need is to python-miio be released. Maybe it'd be good to open an issue regarding that.

arturdobo avatar Feb 21 '21 21:02 arturdobo

Yes arturdobo! Maybe that's it. I'll wait for the update. May it be soon, i hope.

nefsolive avatar Feb 21 '21 21:02 nefsolive

@arturdobo support for 3C is already implemented in python-miio. Any chance to expect this functionality here soon? Thanks for the support!

postscriptumpl avatar Mar 08 '21 15:03 postscriptumpl

@postscriptumpl yeah, I know, because I was the author πŸ˜† I've just created this following issue https://github.com/rytilahti/python-miio/issues/969

arturdobo avatar Mar 10 '21 21:03 arturdobo

Ups...that was not very smart of me πŸ™ˆ Anyway I keep fingers crossed 🀞🏻😁

postscriptumpl avatar Mar 10 '21 21:03 postscriptumpl

@arturdobo a shy reminder ☺️ python released 😁

postscriptumpl avatar Mar 17 '21 10:03 postscriptumpl

Chase me, if it's not done till end of this week

arturdobo avatar Mar 17 '21 10:03 arturdobo

@postscriptumpl it looks like PR for adding 3C is already there. So I'll add support for Qingping Air Monitor Lite then

arturdobo avatar Mar 18 '21 18:03 arturdobo

@arturdobo do You think that it's going to be released with the newest update of HA? Or how it works?

postscriptumpl avatar Mar 18 '21 20:03 postscriptumpl

No idea TBH

arturdobo avatar Mar 18 '21 20:03 arturdobo

Any updates on this? Seems to be added to python-miio

bartohz avatar Mar 29 '21 20:03 bartohz

@bartohz its domoticz you have?

nefsolive avatar Mar 29 '21 20:03 nefsolive