Skip to content
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

Issues with platform: xiaomi_miio (After upgrade to Home Assistant 0.109.1) #34955

Closed
terenceng81 opened this issue Apr 30, 2020 · 29 comments
Closed

Comments

@terenceng81
Copy link

terenceng81 commented Apr 30, 2020

The problem

Two Fans and One Vacuum suddenly disappear in HA, no longer working.
The devices are still controllable by using their own official app.

Environment

Problem-relevant configuration.yaml

Fan:
  - platform: xiaomi_miio
      name: Bedroom 3 Air Humidifier
      host: 192.168.8.109
      token: xxxxxx
      model: zhimi.humidifier.v1
    - platform: xiaomi_miio
      name: Livingroom Air Purifier Pro
      host: 192.168.8.157
      token: xxxxxx
      model: zhimi.airpurifier.v6
vacuum:
  - platform: xiaomi_miio
    name: Livingroom Vaccum
    host: 192.168.8.139
    token: xxxxx

Traceback/Error logs

For fan template:
Configuration Invalid
Platform error fan.xiaomi_miio - cannot import name 'AirPurifierMiot' from 'miio' (/usr/local/lib/python3.7/site-packages/miio/__init__.py)

For vacuum
No configuration invalid error
xiaomi_miio: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 472, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/vacuum.py", line 459, in update
    self._fan_speeds = self._vacuum.fan_speed_presets()
AttributeError: 'Vacuum' object has no attribute 'fan_speed_presets'

Additional information

Nothing is changed, only upgraded the HA version to latest.

@probot-home-assistant
Copy link

Hey there @rytilahti, @syssi, mind taking a look at this issue as its been labeled with a integration (xiaomi_miio) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

@rytilahti
Copy link
Member

Is this a duplicate of #34567? Check also my comment at #34567 (comment).

@terenceng81
Copy link
Author

Is this a duplicate of #34567? Check also my comment at #34567 (comment).

Not duplicated as I have more device affected.

I have read the comment but not sure what to do next.

Would you mind to guide me?

Thanks!
Terence

@rytilahti
Copy link
Member

It's not about number of devices, it's about that missing miotpurifier class, but it should be there if your python-miio is version 0.5.0.1 as it should be.

What version of python-miio you have currently? What does the version.py file (as discussed in the link) says? If it's some older version (0.4.8 was the version for previous homeassistant versions), maybe you could try manually updating the package (pip install -U python-miio)?

@terenceng81
Copy link
Author

terenceng81 commented Apr 30, 2020

It's not about number of devices, it's about that missing miotpurifier class, but it should be there if your python-miio is version 0.5.0.1 as it should be.

What version of python-miio you have currently? What does the version.py file (as discussed in the link) says? If it's some older version (0.4.8 was the version for previous homeassistant versions), maybe you could try manually updating the package (pip install -U python-miio)?

Encounter the error below:

FYI I am using supervised version HA

➜  ~ pip install -U python-miio
Collecting python-miio
  Using cached python_miio-0.5.0.1-py3-none-any.whl (202 kB)
Collecting cryptography
  Using cached cryptography-2.9.2.tar.gz (517 kB)
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3.8 /usr/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-f7pe0ql9/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.6.0' wheel 'cffi>=1.8,!=1.11.3; platform_python_implementation != '"'"'PyPy'"'"''
       cwd: None
  Complete output (86 lines):
  Collecting setuptools>=40.6.0
    Using cached setuptools-46.1.3-py3-none-any.whl (582 kB)
  Collecting wheel
    Using cached wheel-0.34.2-py2.py3-none-any.whl (26 kB)
  Collecting cffi!=1.11.3,>=1.8
    Using cached cffi-1.14.0.tar.gz (463 kB)
  Collecting pycparser
    Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)
  Could not build wheels for cffi, since package 'wheel' is not installed.
  Installing collected packages: setuptools, wheel, pycparser, cffi
      Running setup.py install for cffi: started
      Running setup.py install for cffi: finished with status 'error'
      ERROR: Command errored out with exit status 1:
       command: /usr/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8sqvozq2/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8sqvozq2/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-xoy3x42s/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-f7pe0ql9/overlay --compile --install-headers /tmp/pip-build-env-f7pe0ql9/overlay/include/python3.8/cffi
           cwd: /tmp/pip-install-8sqvozq2/cffi/
      Complete output (68 lines):
      Package libffi was not found in the pkg-config search path.
      Perhaps you should add the directory containing `libffi.pc'
      to the PKG_CONFIG_PATH environment variable
      Package 'libffi', required by 'virtual:world', not found
      Package libffi was not found in the pkg-config search path.
      Perhaps you should add the directory containing `libffi.pc'
      to the PKG_CONFIG_PATH environment variable
      Package 'libffi', required by 'virtual:world', not found
      Package libffi was not found in the pkg-config search path.
      Perhaps you should add the directory containing `libffi.pc'
      to the PKG_CONFIG_PATH environment variable
      Package 'libffi', required by 'virtual:world', not found
      Package libffi was not found in the pkg-config search path.
      Perhaps you should add the directory containing `libffi.pc'
      to the PKG_CONFIG_PATH environment variable
      Package 'libffi', required by 'virtual:world', not found
      Package libffi was not found in the pkg-config search path.
      Perhaps you should add the directory containing `libffi.pc'
      to the PKG_CONFIG_PATH environment variable
      Package 'libffi', required by 'virtual:world', not found
      unable to execute 'gcc': No such file or directory
      unable to execute 'gcc': No such file or directory

          No working compiler found, or bogus compiler options passed to
          the compiler from Python's standard "distutils" module.  See
          the error messages above.  Likely, the problem is not related
          to CFFI but generic to the setup.py of any Python package that
          tries to compile C code.  (Hints: on OS/X 10.8, for errors about
          -mno-fused-madd see http://stackoverflow.com/questions/22313407/
          Otherwise, see https://wiki.python.org/moin/CompLangPython or
          the IRC channel #python on irc.freenode.net.)

          Trying to continue anyway.  If you are trying to install CFFI from
          a build done in a different context, you can ignore this warning.

      running install
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.8
      creating build/lib.linux-x86_64-3.8/cffi
      copying cffi/commontypes.py -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/model.py -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/pkgconfig.py -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/lock.py -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/cparser.py -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/verifier.py -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/recompiler.py -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/error.py -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/__init__.py -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/api.py -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/_embedding.h -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.8/cffi
      running build_ext
      building '_cffi_backend' extension
      creating build/temp.linux-x86_64-3.8
      creating build/temp.linux-x86_64-3.8/c
      gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Os -fomit-frame-pointer -g -Os -fomit-frame-pointer -g -Os -fomit-frame-pointer -g -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python3.8 -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.8/c/_cffi_backend.o
      unable to execute 'gcc': No such file or directory
      error: command 'gcc' failed with exit status 1
      ----------------------------------------
  ERROR: Command errored out with exit status 1: /usr/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8sqvozq2/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8sqvozq2/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-xoy3x42s/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-f7pe0ql9/overlay --compile --install-headers /tmp/pip-build-env-f7pe0ql9/overlay/include/python3.8/cffi Check the logs for full command output.
  ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3.8 /usr/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-f7pe0ql9/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.6.0' wheel 'cffi>=1.8,!=1.11.3; platform_python_implementation != '"'"'PyPy'"'"'' Check the logs for full command output.
➜  ~

@terenceng81
Copy link
Author

I ran the command below and still encounter the error

pip3 -V
pip3 install nltk
pip3 install --upgrade pip
python3 -m pip install --upgrade wheel
pip3 install -U setuptools
pip3 install -U pip setuptools
pip install -U python-miio

@terenceng81
Copy link
Author

terenceng81 commented Apr 30, 2020

It's not about number of devices, it's about that missing miotpurifier class, but it should be there if your python-miio is version 0.5.0.1 as it should be.

What version of python-miio you have currently? What does the version.py file (as discussed in the link) says? If it's some older version (0.4.8 was the version for previous homeassistant versions), maybe you could try manually updating the package (pip install -U python-miio)?

I tried to install Cryptography, libiffi-dev & libssl-dev, all failed :-/

/ $ pip uninstall python-miio
WARNING: Skipping python-miio as it is not installed.

Anyone could help?

@rytilahti
Copy link
Member

I have no idea how the supervisored version works (looks like its docker-based complete homeassistant system, so I suppose it should handle everything automatically?), but you are missing the compiler: unable to execute 'gcc': No such file or directory.

Anyway, did you check the things I mentioned? Is the version correct?

@terenceng81
Copy link
Author

I have no idea how the supervisored version works (looks like its docker-based complete homeassistant system, so I suppose it should handle everything automatically?), but you are missing the compiler: unable to execute 'gcc': No such file or directory.

Anyway, did you check the things I mentioned? Is the version correct?

Thanks for reply, Rytilahti.

BTW would you mind to guide me how do I check the python-miio version and where is this file located version.py file? I am new to HA and appreciate your helps.

@rytilahti
Copy link
Member

I was asking myself the same question, but maybe pip show python-miio is the easiest way to find out the version. Considering that xiaomi_miio is fairly widely used integration, I think the problem is somewhere in your setup. Otherwise, there would be a flood of comments how it's broken...

Anyways, let's try to find out why it is not working for you (there was also another person in the release comment thread) so we can avoid such mistakes in the future!

@terenceng81
Copy link
Author

I was asking myself the same question, but maybe pip show python-miio is the easiest way to find out the version. Considering that xiaomi_miio is fairly widely used integration, I think the problem is somewhere in your setup. Otherwise, there would be a flood of comments how it's broken...

Anyways, let's try to find out why it is not working for you (there was also another person in the release comment thread) so we can avoid such mistakes in the future!

Hi,

I understand but I think the problem should not be due to somewhere in my setup, reason being is that I restored the core to version 0.108.6, auto rebooted and the issue is gone, no config validation issue and the three devices are back to normal.

@terenceng81
Copy link
Author

I tested a few times and the issues persist. so I am quite sure the issue should be something to do with the core update for supervised version itself.

@djmalin
Copy link

djmalin commented May 1, 2020

Hello @rytilahti , I also have the same problem I have roborock.vacuun.m1s and earlier versions worked normally and now not, and I have an air purifier zhimi.airpurifier.ma4 I have waited for this integration for a long time and now it does not work, here are my logs;
Home Assistant 0.109.1
System | HassOS 3.13
Version | 219

2020-05-01 08:14:16 ERROR (MainThread) [homeassistant.config] Platform error: fan
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config.py", line 777, in async_process_component_config
platform = p_integration.get_platform(domain)
File "/usr/src/homeassistant/homeassistant/loader.py", line 279, in get_platform
f"{self.pkg_path}.{platform_name}"
File "/usr/local/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/fan.py", line 7, in
from miio import ( # pylint: disable=import-error
ImportError: cannot import name 'AirPurifierMiot' from 'miio' (/usr/local/lib/python3.7/site-packages/miio/init.py)
2020-05-01 08:14:16 INFO (MainThread) [homeassistant.setup] Setting up fan
2020-05-01 08:14:16 INFO (MainThread) [homeassistant.setup] Setup of domain fan took 0.0 seconds.
2020-05-01 08:14:16 INFO (MainThread) [homeassistant.setup] Setting up vacuum

2020-05-01 08:14:24 ERROR (MainThread) [homeassistant.components.vacuum] xiaomi_miio: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 472, in async_device_update
await self.hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/vacuum.py", line 459, in update
self._fan_speeds = self._vacuum.fan_speed_presets()
AttributeError: 'Vacuum' object has no attribute 'fan_speed_presets'

@darkcloud8
Copy link

Hi @rytilahti i also have the same problem since version 0.109.0. I'm using the Xiaomi Air Purifier 2S on the HASS.IO install on QNAP Virtual Station Ubuntu 18.04. It was working fine before i updated it. I'm also new to HA

2020-04-30 22:33:54 ERROR (MainThread) [homeassistant.config] Platform error: fan
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config.py", line 777, in async_process_component_config
platform = p_integration.get_platform(domain)
File "/usr/src/homeassistant/homeassistant/loader.py", line 279, in get_platform
f"{self.pkg_path}.{platform_name}"
File "/usr/local/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/fan.py", line 7, in
from miio import ( # pylint: disable=import-error
ImportError: cannot import name 'AirPurifierMiot' from 'miio' (/usr/local/lib/python3.7/site-packages/miio/init.py)
2020-04-30 22:53:27 ERROR (MainThread) [frontend.js.latest.202004271] https://192.168.0.4:8123/frontend_latest/chunk.12bbeb31a3fa2f85823e.js:3576:1743 Uncaught TypeError: Cannot read property 'url_path' of undefined
2020-04-30 23:17:49 ERROR (MainThread) [homeassistant.components.hassio] Platform error fan.xiaomi_miio - cannot import name 'AirPurifierMiot' from 'miio' (/usr/local/lib/python3.7/site-packages/miio/init.py)
2020-04-30 23:33:36 ERROR (MainThread) [homeassistant.components.webhook] Error processing webhook f1b5909487c376d5616eaba8f921f587693a7d089e8a8109fc535939937b75f6
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/webhook/init.py", line 78, in async_handle_webhook
response = await webhook["handler"](hass, webhook_id, request)
File "/usr/src/homeassistant/homeassistant/components/mobile_app/webhook.py", line 186, in handle_webhook
return await WEBHOOK_COMMANDS[webhook_type](hass, config_entry, webhook_payload)
File "/usr/src/homeassistant/homeassistant/components/mobile_app/webhook.py", line 131, in validate_and_run
return await func(hass, config_entry, data)
File "/usr/src/homeassistant/homeassistant/components/mobile_app/webhook.py", line 439, in webhook_update_sensor_states
await hass.data[DOMAIN][DATA_STORE].async_save(safe)
File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 141, in async_save
await self._async_handle_write_data()
File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 210, in _async_handle_write_data
self._write_data, self.path, data
concurrent.futures._base.CancelledError
2020-04-30 23:33:36 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140220053925712] Error handling message: required key not provided @ data['category']. Got None

@czekal
Copy link

czekal commented May 1, 2020

model: zhimi.airpurifier.v6 and model: zhimi.humidifier.ca1:
Logger: homeassistant.config
Source: components/xiaomi_miio/fan.py:7
First occurred: 10:01:48 (2 occurrences)
Last logged: 10:01:48

Platform error: fan
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config.py", line 777, in async_process_component_config
platform = p_integration.get_platform(domain)
File "/usr/src/homeassistant/homeassistant/loader.py", line 279, in get_platform
f"{self.pkg_path}.{platform_name}"
File "/usr/local/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/fan.py", line 7, in
from miio import ( # pylint: disable=import-error
ImportError: cannot import name 'AirPurifierMiot' from 'miio' (/usr/local/lib/python3.7/site-packages/miio/init.py)

@rytilahti
Copy link
Member

Can you check the contents of /usr/local/lib/python3.7/site-packages/miio/version.py? I bet it is showing 0.4.8, but I have no idea why the package is not updated correctly..

It should be 0.5.0.1 (as shown in the homeassistant's requirements_all.txt https://github.com/home-assistant/core/blob/0.109.1/requirements_all.txt#L1655 and xiomi_miios manifest file https://github.com/home-assistant/core/blob/0.109.1/homeassistant/components/xiaomi_miio/manifest.json#L5), which is where AirPurifierMiot is available.

@terenceng81
Copy link
Author

/usr/local/lib/

Hi Rytilahti,

I do have this folder,

I use the search command to find version.py and below is the reason.
➜ / find . -type f ( -name "version.py" )
./usr/lib/python3.8/site-packages/pip/_vendor/distlib/version.py
./usr/lib/python3.8/site-packages/pip/_vendor/chardet/version.py
./usr/lib/python3.8/site-packages/pip/_vendor/packaging/version.py
./usr/lib/python3.8/site-packages/chardet/version.py
./usr/lib/python3.8/site-packages/setuptools/_vendor/packaging/version.py
./usr/lib/python3.8/site-packages/setuptools/version.py
./usr/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/version.py
./usr/lib/python3.8/distutils/version.py

@terenceng81
Copy link
Author

terenceng81 commented May 1, 2020

I think I found the root-caused for my case. For others should be similar, try to disable one by one in your custom_folder.

Somehow the package below causing the issues, I commented it, restart HA and no more issue in the latest version HA 0.109.2.

https://github.com/syssi/xiaomi_cooker

Code I commented

#xiaomi_cooker:
#  name: Xiaomi Rice Cooker
#  host: 192.168.8.135
#  token: xxxx
#  model: chunmi.cooker.normal2

I do not know why perhaps I think the author can tell. @rytilahti @syssi

@rytilahti
Copy link
Member

That's odd. The cooker defines requirement as "python-miio>=0.4.8", which 0.5.0.1 should match just fine.. Glad you found the cause though, @czekal @darkcloud8 @djmalin, are you also using custom components?

@terenceng81
Copy link
Author

That's odd. The cooker defines requirement as "python-miio>=0.4.8", which 0.5.0.1 should match just fine.. Glad you found the cause though, @czekal @darkcloud8 @djmalin, are you also using custom components?

I suspect this because of i once see the error in the log saying it would cause compatibility issue but I could not remember the exact message.

Anyway by just disable this and the then do a hard HA reboot, issue gone. :_)

@djmalin
Copy link

djmalin commented May 1, 2020

@rytilahti ,so in custom_components I had the Mi Smart Multipurpose Kettle component and there was the old version of python-miio> = 0.4.8 and therefore I did not want to work when I changed the manifest.json file to python-miio == 0.5.0.1, all integrations started to work

@terenceng81
Copy link
Author

The version for xiaomi_cooker is 0.4.6, shall i change it to 0.5.0.1?

{
  "domain": "xiaomi_cooker",
  "name": "Xiaomi Mi Electric Rice Cooker integration for Home Assistant",
  "documentation": "https://github.com/syssi/xiaomi_cooker",
  "requirements": [
    "construct==2.9.45",
    "python-miio==0.4.6"
  ],
  "dependencies": [],
  "codeowners": [
    "@syssi"
  ]
}

@djmalin
Copy link

djmalin commented May 1, 2020

@terenceng81 yes
{
"domain": "xiaomi_cooker",
"name": "Xiaomi Mi Electric Rice Cooker integration for Home Assistant",
"documentation": "https://github.com/syssi/xiaomi_cooker",
"requirements": [
"construct==2.9.45",
"python-miio == 0.5.0.1"
],
"dependencies": [],
"codeowners": [
"@syssi"
]
}

@czekal
Copy link

czekal commented May 1, 2020

That's odd. The cooker defines requirement as "python-miio>=0.4.8", which 0.5.0.1 should match just fine.. Glad you found the cause though, @czekal @darkcloud8 @djmalin, are you also using custom components?

I have STYJ02YM:

{
"domain": "miio2",
"name": "Xiaomi miio vacuum STYJ02YM",
"documentation": "",
"requirements": [
"construct==2.9.45",
"python-miio==0.4.7"
],
"dependencies": [],
"codeowners": []
}

I change 0.4.7 to 0.5.0.1 and and everything works:)

@terenceng81
Copy link
Author

@terenceng81 yes
{
"domain": "xiaomi_cooker",
"name": "Xiaomi Mi Electric Rice Cooker integration for Home Assistant",
"documentation": "https://github.com/syssi/xiaomi_cooker",
"requirements": [
"construct==2.9.45",
"python-miio==0.5.0.1"
],
"dependencies": [],
"codeowners": [
"@syssi"
]
}

Yes, by changing to the version of python-miio to 0.5.0.1 fixed it.

By the way, there is a new release for the core, it bumps Cryptography from 2.9.1 to 2.9.2 which I failed to upgrade during troubleshooting.

https://github.com/home-assistant/supervisor/releases/tag/220

FYI only.

@sbobergje
Copy link

Great job locating. My error was in the custom component for xiaomi miio fan.

@darkcloud8
Copy link

That's odd. The cooker defines requirement as "python-miio>=0.4.8", which 0.5.0.1 should match just fine.. Glad you found the cause though, @czekal @darkcloud8 @djmalin, are you also using custom components?

i also have the Xiaomi miio vacuum STYJ02YM custom component, after changing it from 0.4.7 to 0.5.0.1 and did a hardware reboot everything is working again. thanks

@Ciubas
Copy link

Ciubas commented May 2, 2020

I have STYJ02YM where you change it: "python-miio==0.5.0.1" ?

I find it: custon_components/miio2/manifest.json

Thanks for this solution!

@rytilahti
Copy link
Member

rytilahti commented May 2, 2020

Please do not forget to report the issue also to the developers of those custom components. They should not do direct pinning on a single release, but prefer >= style pinning. Otherwise, these components will likely break again when python-miio version gets updated for the core integration.

semaphorism added a commit to semaphorism/clear_grass-ha that referenced this issue May 3, 2020
Update requirement in manifest.json for python-miio version to enable compatibility with 0.109.x.  In 0.109, python-miio is now at version 0.5.0.1. Current requirement breaks integration with other Xiaomi MIIO devices (see home-assistant/core#34955). Cleargrass and other Xiaomi devices may need to be removed and re-added in configuration.yaml for changes to take effect.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants