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.88k stars 30.11k forks source link

Xiaomi Miio unable to discover the device “Xiaomi Mi Air Purifier 4” #111729

Open TreborR2 opened 7 months ago

TreborR2 commented 7 months ago

The problem

I can’t add the device “Xiaomi Mi Air Purifier 4” to Xiaomi Miio. The error message is "unable to discover the device "“ip address”. According to the specification, this device is supported. Other Xiaomi devices on the same network via Xiaomi Miio works for me. I tried to run “Xiaomi Mi Air Purifier 4” via hass-xiaomi-miot and it works. But there is not so good control of all functions. Any advice on what to try?

I tried turning on the debug log and it tried to find something like this:

2024-02-23 19:11:41.005 DEBUG (MainThread) [homeassistant.components.xiaomi_miio] Initializing with host 192.168.1.205 (token b9cf3…) 2024-02-23 19:11:41.007 DEBUG (SyncWorker_0) [miio.click_common] Unknown model, trying autodetection. None None 2024-02-23 19:11:46.013 DEBUG (SyncWorker_0) [miio.miioprotocol] Unable to discover a device at address 192.168.1.205 2024-02-23 19:11:46.014 DEBUG (MainThread) [homeassistant.components.xiaomi_miio] Finished fetching Xiaomi Smart Air Purifier 4 data in 5.009 seconds (success: False) 2024-02-23 19:11:47.395 DEBUG (SyncWorker_56) [miio.miioprotocol] Got a response: Container: data = Container: data = b’’ (total 0) value = b’’ (total 0) offset1 = 32 offset2 = 32 length = 0 header = Container: data = b’!1\x00 \x00\x00\x00\x00\x0e\x97\x0b\xd0\x00\x00\x11\x08’ (total 16) value = Container: length = 32 unknown = 0 device_id = unhexlify(‘0e970bd0’) ts = 1970-01-01 01:12:40 offset1 = 0 offset2 = 16 length = 16 checksum = b’\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff’ (total 16) 2024-02-23 19:11:47.396 DEBUG (SyncWorker_56) [miio.miioprotocol] Discovered 0e970bd0 with ts: 1970-01-01 01:12:40, token: b’ffffffffffffffffffffffffffffffff’ 2024-02-23 19:11:47.398 DEBUG (SyncWorker_56) [miio.miioprotocol] 192.168.1.201:54321 >>: {‘id’: 65, ‘method’: ‘get_properties’, ‘params’: [{‘did’: ‘power’, ‘siid’: 2, ‘piid’: 1}, {‘did’: ‘fan_level’, ‘siid’: 2, ‘piid’: 2}, {‘did’: ‘child_lock’, ‘siid’: 3, ‘piid’: 1}, {‘did’: ‘swing_mode’, ‘siid’: 2, ‘piid’: 3}, {‘did’: ‘power_off_time’, ‘siid’: 2, ‘piid’: 10}, {‘did’: ‘buzzer’, ‘siid’: 2, ‘piid’: 11}, {‘did’: ‘light’, ‘siid’: 2, ‘piid’: 12}, {‘did’: ‘mode’, ‘siid’: 2, ‘piid’: 7}]} 2024-02-23 19:11:47.665 DEBUG (SyncWorker_56) [miio.miioprotocol] 192.168.1.201:54321 (ts: 1970-01-01 01:12:40, id: 65) << {‘id’: 65, ‘result’: [{‘did’: ‘power’, ‘siid’: 2, ‘piid’: 1, ‘code’: 0, ‘value’: False}, {‘did’: ‘fan_level’, ‘siid’: 2, ‘piid’: 2, ‘code’: 0, ‘value’: 2}, {‘did’: ‘child_lock’, ‘siid’: 3, ‘piid’: 1, ‘code’: 0, ‘value’: False}, {‘did’: ‘swing_mode’, ‘siid’: 2, ‘piid’: 3, ‘code’: 0, ‘value’: False}, {‘did’: ‘power_off_time’, ‘siid’: 2, ‘piid’: 10, ‘code’: 0, ‘value’: 0}, {‘did’: ‘buzzer’, ‘siid’: 2, ‘piid’: 11, ‘code’: 0, ‘value’: True}, {‘did’: ‘light’, ‘siid’: 2, ‘piid’: 12, ‘code’: 0, ‘value’: True}, {‘did’: ‘mode’, ‘siid’: 2, ‘piid’: 7, ‘code’: 0, ‘value’: 0}], ‘exe_time’: 130}

image

I tried asking here first https://community.home-assistant.io/t/xiaomi-miio-unable-to-discover-the-device-xiaomi-mi-air-purifier-4/694473 but no one responded, so I try it here.

What version of Home Assistant Core has the issue?

core-2024.2.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Xiaomi Miio

Link to integration documentation on our website

https://www.home-assistant.io/integrations/xiaomi_miio/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 7 months ago

Hey there @rytilahti, @syssi, @starkillerog, mind taking a look at this issue as it has been labeled with an integration (xiaomi_miio) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `xiaomi_miio` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign xiaomi_miio` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


xiaomi_miio documentation xiaomi_miio source (message by IssueLinks)

TreborR2 commented 7 months ago

I updated to versin 2024.2.5

TreborR2 commented 6 months ago

2024.3.1

Minniemie commented 3 months ago

I have this same issue with the Xiaomi Smart Air Purifier 4 as well. It identifies as zhimi.airp.mb5a but failed to set up. Anyone able to find a solution? I tried using the Miio Auto integration but it is also unstable (drops connection 50% of the time) with this air purifier. Any feedback is much appreciated.

Stooovie commented 3 months ago

Same. Started in the last few months, perfect for a year before.

TreborR2 commented 4 weeks ago

And is there a solution? Will there be any solution?