home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.57k stars 29.91k forks source link

0.112 - Xiaomi Air Purifier 3 disable #37302

Closed anglrus closed 4 years ago

anglrus commented 4 years ago

The problem

Xiaomi Air Purifier 3 is not active for 0.112 version

Environment

Problem-relevant configuration.yaml

Traceback/Error logs

Logger: homeassistant.components.xiaomi_miio.fan
Source: components/xiaomi_miio/fan.py:789
Integration: Xiaomi Miio (documentation, issues)
First occurred: 0:12:55 (37 occurrences)
Last logged: 0:31:48

Got exception while fetching the state: {'code': -5001, 'message': 'command error'}

Additional information

foglietti commented 4 years ago

I have the same issue with this release.

maciej-szalaj commented 4 years ago

Same issue here... HA updated to 0.112

SeraphimSerapis commented 4 years ago

+1, I can confirm this for my 3H

pkishino commented 4 years ago

same here

pkishino commented 4 years ago

was already getting strange errors since 0.111 but was still working there..not now

dj4shots commented 4 years ago

experienced the same problem on 3H. Last working version was 111.4

verabeniel commented 4 years ago

Same issue with my 3H

miecio08 commented 4 years ago

the same for me; / I try to reset the purifier and with a new token. nothing works

mrfoxbit commented 4 years ago

I have the same issue

rytilahti commented 4 years ago

Duplicate of #36993, upstream issue is here: https://github.com/rytilahti/python-miio/issues/730

GiaQuy commented 4 years ago

same for me , my air purifier 3 also doesn't work on version 0.112.1

rytilahti commented 4 years ago

Should work again in 0.112.2.

mrfoxbit commented 4 years ago

It's work again in HA 0.112.2 and python-miio 0.5.2.1. But i have error

My device is Xiaomi Air Purifier 3 (zhimi.airpurifier.ma4)

2020-07-04 17:48:52 ERROR (MainThread) [homeassistant.components.xiaomi_miio.fan] Got exception while fetching the state: {'code': -9999, 'message': 'user ack timeout'} 2020-07-04 18:24:04 ERROR (SyncWorker_10) [miio.miioprotocol] Unable to discover a device at address 192.168.100.227 2020-07-04 18:24:04 ERROR (MainThread) [homeassistant.components.xiaomi_miio.fan] Got exception while fetching the state: Unable to discover the device 192.168.100.227 2020-07-04 18:39:28 ERROR (MainThread) [homeassistant.components.xiaomi_miio.fan] Got exception while fetching the state: {'code': -9999, 'message': 'user ack timeout'} 2020-07-04 19:03:17 ERROR (SyncWorker_9) [miio.miioprotocol] Unable to discover a device at address 192.168.100.227 2020-07-04 19:03:17 ERROR (MainThread) [homeassistant.components.xiaomi_miio.fan] Got exception while fetching the state: Unable to discover the device 192.168.100.227 2020-07-04 19:05:21 ERROR (SyncWorker_14) [miio.miioprotocol] Unable to discover a device at address 192.168.100.227 2020-07-04 19:05:21 ERROR (MainThread) [homeassistant.components.xiaomi_miio.fan] Got exception while fetching the state: Unable to discover the device 192.168.100.227 2020-07-04 19:21:22 ERROR (SyncWorker_4) [miio.miioprotocol] Unable to discover a device at address 192.168.100.227 2020-07-04 19:21:22 ERROR (MainThread) [homeassistant.components.xiaomi_miio.fan] Got exception while fetching the state: Unable to discover the device 192.168.100.227 2020-07-04 20:26:52 ERROR (MainThread) [homeassistant.components.xiaomi_miio.fan] Got exception while fetching the state: {'code': -9999, 'message': 'user ack timeout'} 2020-07-04 20:39:16 ERROR (MainThread) [homeassistant.components.xiaomi_miio.fan] Got exception while fetching the state: {'code': -9999, 'message': 'user ack timeout'} 2020-07-04 20:51:18 ERROR (SyncWorker_13) [miio.miioprotocol] Unable to discover a device at address 192.168.100.227 2020-07-04 20:51:18 ERROR (MainThread) [homeassistant.components.xiaomi_miio.fan] Got exception while fetching the state: Unable to discover the device 192.168.100.227 2020-07-04 21:01:02 ERROR (SyncWorker_16) [miio.miioprotocol] Unable to discover a device at address 192.168.100.227 2020-07-04 21:01:02 ERROR (MainThread) [homeassistant.components.xiaomi_miio.fan] Got exception while fetching the state: Unable to discover the device 192.168.100.227 2020-07-04 21:22:13 ERROR (SyncWorker_7) [miio.miioprotocol] Unable to discover a device at address 192.168.100.227 2020-07-04 21:22:13 ERROR (MainThread) [homeassistant.components.xiaomi_miio.fan] Got exception while fetching the state: Unable to discover the device 192.168.100.227 2020-07-04 21:25:19 ERROR (SyncWorker_5) [miio.miioprotocol] Unable to discover a device at address 192.168.100.227 2020-07-04 21:25:19 ERROR (MainThread) [homeassistant.components.xiaomi_miio.fan] Got exception while fetching the state: Unable to discover the device 192.168.100.227 2020-07-04 21:39:46 ERROR (SyncWorker_9) [miio.miioprotocol] Unable to discover a device at address 192.168.100.227 2020-07-04 21:39:46 ERROR (MainThread) [homeassistant.components.xiaomi_miio.fan] Got exception while fetching the state: Unable to discover the device 192.168.100.227 2020-07-04 21:51:14 ERROR (SyncWorker_10) [miio.miioprotocol] Unable to discover a device at address 192.168.100.227 2020-07-04 21:51:14 ERROR (MainThread) [homeassistant.components.xiaomi_miio.fan] Got exception while fetching the state: Unable to discover the device 192.168.100.227 2020-07-04 21:52:02 ERROR (MainThread) [homeassistant.components.xiaomi_miio.fan] Got exception while fetching the state: {'code': -9999, 'message': 'user ack timeout'}

vampywiz17 commented 4 years ago

The error is gone on log, but the device is not working...

pkishino commented 4 years ago

Mine works again now but it created a new entity.. which doesn’t use a unique I’d so can’t rename it..

On Sun, Jul 5, 2020 at 18:39 vampywiz17 notifications@github.com wrote:

The error is gone on log, but the device is not working...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/37302#issuecomment-653865512, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7OFYTI76WBR7O7WIVLKM3R2BC5FANCNFSM4OOCEFEQ .

SeraphimSerapis commented 4 years ago

My 2 purifiers work great and no additional entities were created.

anglrus commented 4 years ago

For 112.2 it works but there is following error in the logs:

Logger: homeassistant.helpers.entity Source: components/xiaomi_miio/fan.py:641 First occurred: 9:50:42 (2 occurrences) Last logged: 11:05:05

Update for fan.xiaomi_air_purifier_3 fails ValueError: None is not a valid OperationMode

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 272, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 463, in async_device_update await self.async_update() # type: ignore File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/fan.py", line 783, in async_update for key, value in self._available_attributes.items() File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/fan.py", line 783, in for key, value in self._available_attributes.items() File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/fan.py", line 641, in _extract_value_from_attribute value = getattr(state, attribute) File "/usr/local/lib/python3.7/site-packages/miio/airpurifier_miot.py", line 115, in mode return OperationMode(self.data["mode"]) File "/usr/local/lib/python3.7/enum.py", line 310, in call return cls.new(cls, value) File "/usr/local/lib/python3.7/enum.py", line 564, in new raise exc File "/usr/local/lib/python3.7/enum.py", line 548, in new result = cls.missing(value) File "/usr/local/lib/python3.7/enum.py", line 577, in missing raise ValueError("%r is not a valid %s" % (value, cls.name)) ValueError: None is not a valid OperationMode

rytilahti commented 4 years ago

@anglrus that's a completely different issue. Please open an issue at https://github.com/rytilahti/python-miio/ and include the received payload when using miiocli --debug airpurifiermiot --ip <ip> --token <token> status.