Closed orionowy closed 3 years ago
Is my interpretation correct: The zhimi.airpurifer.za1
is 100% feature compatible to the zhimi.airpurifier.mb3
. If not: What's missing?
Could you provide some specs (product name, model no, specs) of your device? I would like to extend the list of supported devices as soon the device support is merged: https://github.com/syssi/xiaomi_airpurifier/pull/183
Thank you for your response:
Name Smartmi Air Purifier Model: KQJHQ01ZM Spec: https://www.aze.com.pl/pl/p/Oczyszczacz-powietrza-Smartmi-Air-Purifier/2483, https://www.smartmiglobal.com/collections/air-purifier/products/smartmi-air-purifier
Coverage 9-48m², 400m³/h CADR, 30 dB - 64 dB, 40 W (max.)
Sensors: Temperature, laser particle sensor, Total VOC, humidity.
Some things are compatible with zhimi.airpurifier.mb3, but some functionalities are missing:
Did it work for you? I can see values but I cannot switch on or off through this integration
Did it work for you? I can see values but I cannot switch on or off through this integration
Got the same issue, the sensors are displaying the data (temperature, humidity etc.) but I'm unable to turn it on or off.
Additionally I'm getting error after leaving zhimi.airpurifier.za1 reference in configuration.yaml file, currently using zhimi.airpurifier.mb3 value:
what a coincidence today I had some time to play around a bit. I got it to work locally. I extended the miio
package for ZA1 support and put it next to the custom_component. And it works :-)
You can just test it from this branch: https://github.com/holygrolli/xiaomi_airpurifier/tree/local_smartmi
I have to find some time to check for the TVOC value, but everything else seems to work. And finally I need to cleanup and then create a merge request to miio
and to this very repo here
@holygrolli Thank you for your work. I'm using it and it is almost ok. I've a problem with setting favourite level. The method with calling service: xiaomi_miio_airpurifier.fan_set_favorite_level doesn't work for me. Could you help? I'm receiving a fail message with an unknown error reason.
Unfortunately, the airpurifier.za1 is still not working for me in HA without using the local fix of @holygrolli .
Is there still a chance for the pull request to the official repos, some time in the future, Andreas? Would be very much appreciated by a lot of people I think!
I am trying to run @holygrolli local fix but I get below error:
This error originated from a custom integration.
Logger: homeassistant.config
Source: custom_components/xiaomi_miio_airpurifier/fan.py:8
Integration: xiaomi_miio_airpurifier (documentation, issues)
First occurred: 8:57:05 PM (2 occurrences)
Last logged: 8:57:05 PM
Platform error: fan
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config.py", line 877, in async_process_component_config
platform = p_integration.get_platform(domain)
File "/usr/src/homeassistant/homeassistant/loader.py", line 572, in get_platform
cache[full_name] = self._import_platform(platform_name)
File "/usr/src/homeassistant/homeassistant/loader.py", line 589, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/config/custom_components/xiaomi_miio_airpurifier/fan.py", line 8, in <module>
from miio import ( # pylint: disable=import-error
ImportError: cannot import name 'AirDogX5' from 'miio' (/usr/local/lib/python3.9/site-packages/miio/__init__.py)
Do you know how to solve it? Maybe @FabFaeb can help?
Please update the custom component (xiaomi_airpurifier
). Recent versions of the component doesn't access the AirDogX5 class anymore.
@syssi so it means I can not use @holygrolli local solution anymore?
The solution must be updated first. The fork isn't python-miio
compatible anymore.
I updated @holygrolli's branch to be compatible again: https://github.com/an0nfunc/xiaomi_airpurifier/tree/local_smartmi
@an0nfunc thanks for your update! Unfortunately it doesnt work for me for Smartmi Air Purifier. Installed your latest dev and configured via yaml.
/usr/local/lib/python3.9/site-packages/miio/device.py:158 Found an unsupported model 'zhimi.airpurifier.za1' for class 'AirPurifierMiot'. If this is working for you, please open an issue at https://github.com/rytilahti/python-miio/
/usr/local/lib/python3.9/site-packages/miio/miot_device.py:172 Unable to find mapping for zhimi.airpurifier.za1, falling back to zhimi.airpurifier.ma4
@Phreet Did you use the local_smartmi
branch?
@an0nfunc would it be possible to create a PR with your updates back to this repo so that the zhimi.airpurifier.za1 could be supported by default?
@FabFaeb As far as I understand, these changes would need to go into python-miio. https://github.com/rytilahti/python-miio/issues/1025 already requests support for the za1, but there seems to be no activity so far. I'll check later what exactly I would need to do to get it upstreamed.
@Phreet Did you use the
local_smartmi
branch?
You are so right. HACS didnt offer me branch selection - therefore it took your dev branch, not the local_smartmi
. Right branch selected and voila - it works, thanks for your code,
If someone will be interested I will share my fork of @holygrolli's branch https://github.com/dameq1/xiaomi_airpurifier_fork. I'm using this purifier so I'm updating it when it is needed. I also fixed problems which oryginal @holygrolli's mod had, like no possibility to set favorite speed or change lcd brightness. I modified my version using default branch so it will work also from hacs.
For anyone interested, I just submitted a PR to get the za1 supported by HA's existing xiaomi_miio
integration: https://github.com/home-assistant/core/pull/80387
Request Smartmi zhimi.airpurifer.za1 - Air Purifier support
Xiaomi App Detalis details:
Current config:
Current states: