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
73.48k stars 30.7k forks source link

Unable to discover Xiaomi Miio device #92774

Open KitHubek opened 1 year ago

KitHubek commented 1 year ago

The problem

manny error at log: Unable to discover the device 12h - about 1k error lines

What version of Home Assistant Core has the issue?

2023.5.2

What was the last working version of Home Assistant Core?

dont know

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?

Logger: homeassistant.components.xiaomi_miio
Source: helpers/update_coordinator.py:204
Integration: Xiaomi Miio (documentation, issues)
First occurred: 7 maja 2023 21:16:13 (989 occurrences)
Last logged: 09:56:23

Error fetching zhimi.airpurifier.mb3 data: Unable to discover the device DEVIPADDR
Timeout fetching zhimi.airpurifier.mb3 data
Error fetching zhimi.fan.za5 data: Unable to discover the device DEVIPADDR
Error fetching zhimi.airpurifier.mb3_2 data: Unable to discover the device DEVIPADDR
Error fetching zhimi.fan.za5_2 data: Unable to discover the device DEVIPADDR

Additional information

No response

home-assistant[bot] commented 1 year 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.

(message by CodeOwnersMention)


xiaomi_miio documentation xiaomi_miio source (message by IssueLinks)

lweberru commented 1 year ago

Same issue here. Probably the api changed?

relektronik commented 1 year ago

I have exactly the same issue:

Logger: homeassistant.components.xiaomi_miio Source: helpers/update_coordinator.py:204 Integration: Xiaomi Miio (documentation, issues) First occurred: 11:51:29 (15 occurrences) Last logged: 12:21:19

Error fetching Oczyszczacz-Smartmi data: Unable to discover the device 192.168.0.59

Czikenbl commented 1 year ago

the same problem:

Logger: homeassistant.components.xiaomi_miio Source: helpers/update_coordinator.py:204 Integration: Xiaomi Miio (documentation, issues) First occurred: 16:39:59 (1 occurrences) Last logged: 16:39:59

Error fetching Mi Air Purifier 3/3H data: Unable to discover the device 10.10.10.93

WinsonT commented 1 year ago

Just to add more information, I'm facing the same problem, where a device (Xiaomi Air Purifier 4 Pro) became unavailable after few hours. But I noticed the IP that Home Assistant is trying to reach is wrong. Based on the Xiaomi Home app, my device IP is of a different value.

catalinbordan commented 1 year ago

the same problem:

` Logger: homeassistant.components.xiaomi_miio Source: helpers/update_coordinator.py:204 Integration: Xiaomi Miio (documentation, issues) First occurred: 10:34:13 (72 occurrences) Last logged: 12:55:38

Error fetching Mi Air Purifier 3/3H data: Unable to discover the device 192.168.0.90 `

2bbe commented 1 year ago

same here: 023-05-28 18:00:20.651 DEBUG (MainThread) [homeassistant.components.xiaomi_miio] Initializing with host 111.222.333.444 (token abcde...) 2023-05-28 18:00:25.657 DEBUG (SyncWorker_8) [homeassistant.components.xiaomi_miio] Unable to fetch timers, this may happen on some devices: Unable to discover the device 111.222.333.444 2023-05-28 18:00:30.652 DEBUG (MainThread) [homeassistant.components.xiaomi_miio] Finished fetching Roborock S6 data in 10.001 seconds (success: False)

Sk4hnt42 commented 1 year ago

I also have an issue discovering my Fan:

2023-06-16 00:01:08.160 DEBUG (MainThread) [homeassistant.components.xiaomi_miio] Finished fetching dmaker.fan.1c data in 5.008 seconds (success: False) 2023-06-16 00:01:08.161 WARNING (MainThread) [homeassistant.config_entries] Config entry 'dmaker.fan.1c' for xiaomi_miio integration not ready yet: Unable to discover the device 10.10.7.8; Retrying in background 2023-06-16 00:01:13.437 DEBUG (MainThread) [homeassistant.components.xiaomi_miio] Initializing with host 10.10.7.8 (token 2e438...) 2023-06-16 00:01:18.440 DEBUG (SyncWorker_7) [miio.miioprotocol] Unable to discover a device at address 10.10.7.8

I am using Home Assistant OS, the Fan is in a seperate VLAN.

mbuerki84 commented 1 year ago

same here...

Logger: homeassistant.components.xiaomi_miio Source: helpers/update_coordinator.py:229 Integration: Xiaomi Miio (documentation, issues) First occurred: 19:41:55 (2 occurrences) Last logged: 20:00:10

Error fetching Mi Air Purifier 3/3H data: Unable to discover the device 192.168.188.58

L-E-0-N commented 1 year ago

Same, also the Xiaomi Air purifier 3H

Logger: homeassistant.components.xiaomi_miio Source: helpers/update_coordinator.py:229 Integration: Xiaomi Miio (documentation, issues) First occurred: 18:03:09 (88 occurrences) Last logged: 22:09:55

Error fetching Xiaomi Air Purifier data: Unable to discover the device 192.168.1.233 Timeout fetching Xiaomi Air Purifier data

smarthomefamilyverrips commented 1 year ago

Same here with Smart Standing Fan 2 (2 pieces both same problem)

CAVACO-PT commented 1 year ago

Same Problem here :

Config entry 'Xiaomi Smart Air Purifier 4 Pro' for xiaomi_miio integration not ready yet: Unable to discover the device 10.5.6.2; Retrying in background

pedrams1 commented 1 year ago

I'm having a similar issue, the issues started around 2023.5ish, I anecdotally believe this behaviour starting around about the time this PR was merged https://github.com/home-assistant/core/pull/82601

Basically the fan will be added fine via the integration. But every few minutes it will go unavailable, and you can see the following in the logs:

2023-08-05 23:43:37.511 DEBUG (SyncWorker_0) [miio.miioprotocol] 192.168.4.39:54321 >>: {'id': 52, 'method': 'get_properties', 'params': [{'did': 'power', 'siid': 2, 'piid': 1}, {'did': 'fan_level', 'siid': 2, 'piid': 2}, {'did': 'swing_mode', 'siid': 2, 'piid': 3}, {'did': 'swing_mode_angle', 'siid': 2, 'piid': 5}, {'did': 'mode', 'siid': 2, 'piid': 7}, {'did': 'power_off_time', 'siid': 2, 'piid': 10}, {'did': 'anion', 'siid': 2, 'piid': 11}, {'did': 'child_lock', 'siid': 3, 'piid': 1}, {'did': 'light', 'siid': 4, 'piid': 3}, {'did': 'buzzer', 'siid': 5, 'piid': 1}, {'did': 'buttons_pressed', 'siid': 6, 'piid': 1}, {'did': 'battery_supported', 'siid': 6, 'piid': 2}, {'did': 'set_move', 'siid': 6, 'piid': 3}, {'did': 'speed_rpm', 'siid': 6, 'piid': 4}, {'did': 'powersupply_attached', 'siid': 6, 'piid': 5}]}
2023-08-05 23:43:37.840 DEBUG (SyncWorker_0) [miio.miioprotocol] 192.168.4.39:54321 (ts: 1970-01-24 00:10:26, id: 52) << {'id': 52, 'result': [{'did': 'power', 'siid': 2, 'piid': 1, 'code': 0, 'value': False}, {'did': 'fan_level', 'siid': 2, 'piid': 2, 'code': 0, 'value': 1}, {'did': 'swing_mode', 'siid': 2, 'piid': 3, 'code': 0, 'value': True}, {'did': 'swing_mode_angle', 'siid': 2, 'piid': 5, 'code': 0, 'value': 90}, {'did': 'mode', 'siid': 2, 'piid': 7, 'code': 0, 'value': 1}, {'did': 'power_off_time', 'siid': 2, 'piid': 10, 'code': 0, 'value': 0}, {'did': 'anion', 'siid': 2, 'piid': 11, 'code': 0, 'value': True}, {'did': 'child_lock', 'siid': 3, 'piid': 1, 'code': 0, 'value': False}, {'did': 'light', 'siid': 4, 'piid': 3, 'code': 0, 'value': 100}, {'did': 'buzzer', 'siid': 5, 'piid': 1, 'code': 0, 'value': False}, {'did': 'buttons_pressed', 'siid': 6, 'piid': 1, 'code': 0, 'value': 0}, {'did': 'battery_supported', 'siid': 6, 'piid': 2, 'code': 0, 'value': False}, {'did': 'set_move', 'siid': 6, 'piid': 3, 'code': -4005}, {'did': 'speed_rpm', 'siid': 6, 'piid': 4, 'code': 0, 'value': 0}, {'did': 'powersupply_attached', 'siid': 6, 'piid': 5, 'code': 0, 'value': True}], 'exe_time': 120}
2023-08-05 23:43:42.846 DEBUG (SyncWorker_0) [miio.miioprotocol] Unable to discover a device at address 192.168.4.39
2023-08-05 23:43:42.847 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Error fetching zhimi.fan.za5 data: Unable to discover the device 192.168.4.39
2023-08-05 23:43:42.848 DEBUG (MainThread) [homeassistant.components.xiaomi_miio] Finished fetching zhimi.fan.za5 data in 5.467 seconds (success: False)

After a minute or two discovery will work again any the device will come online again.

If there is some way to revert and disable "lazy discover" again I could test that to pinpoint whether this is really the issue

dameq1 commented 1 year ago

The same issue for zhimi.airpurifier.za1

2023-09-09 07:15:12.001 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Error fetching Smartmi Air Purifier data: Unable to discover the device 192.168.2.53
2023-09-09 07:24:41.203 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Error fetching Smartmi Air Purifier data: Unable to discover the device 192.168.2.53
2023-09-09 07:28:16.264 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Error fetching Smartmi Air Purifier data: Unable to discover the device 192.168.2.53
2023-09-09 07:30:47.182 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Error fetching Smartmi Air Purifier data: Unable to discover the device 192.168.2.53
dameq1 commented 1 year ago

@pedrams1 Very good spot. It seems that it works. With flag set to false I have unavailable state at least few times per hour. With flag set to true this behaviour gone.

@pedrams1 You can test this by downloading the component code (from branch matching your HA version) and placing it in config/custom_components. This will override the internal one. You just need to add the version tag to manifest.json and set that lazy_discover flag to true in init.py

Screenshot_20230910_133829 Screenshot_20230910_133851_io homeassistant companion android Screenshot_20230910_133857_io homeassistant companion android

relektronik commented 1 year ago

@pedrams1 Very good spot. It seems that it works. With flag set to false I have unavailable state at least few times per hour. With flag set to true this behaviour gone.

@pedrams1 You can test this by downloading the component code (from branch matching your HA version) and placing it in config/custom_components. This will override the internal one. You just need to add the version tag to manifest.json and set that lazy_discover flag to true in init.py

Screenshot_20230910_133829 Screenshot_20230910_133851_io homeassistant companion android Screenshot_20230910_133857_io homeassistant companion android

@dameq1 Can you describe step by step how to achive this?

I'm not sure what are the next steps to revert this bug, but can finally @syssi @rytilahti @starkillerOG look on this issue? It was opened in may what are your comment/action on this?

dameq1 commented 1 year ago

@relektronik

Done.

Remember that this component can fail after a core update if something changes.

pedrams1 commented 1 year ago

I can confirm reverting lazy discover to 'true' fixes this behaviour with these devices. Looking through the PR that changed the setting to default to 'false' - https://github.com/home-assistant/core/pull/82601 - it seems it was done for the same reason, that some devices have the same issue with the opposite setting - lazy discover set to 'true'.

The conclusion is some devices need it 'true' to function correctly, and some need it set to 'false' so a PR to revert the change above would recreate the issue somewhere else.

Is it possible to override the default setting for certain devices that need lazy discover to be set to 'true'? It probably makes sense to leave the default remaining as-is? From reading this thread, those devices would be at least (only quoting those that have provided the device code itself to avoid mistakes):

My Python skills aren't where they need to be to make the contribution myself, but I'll happily buy a coffee for the developer that raises the PR! :) fyi @mrwogu who raised the original PR.

rytilahti commented 1 year ago

We should probably keep the current default as-is, and just start collecting a list of models that require a specific setting. I created a draft PR (#100490) to get us started.

Feel free to add a comment there if your device is not already listed and switching the lazy_discover to True helps with it!

akeslo commented 1 year ago

I can't seem to get mine working again with the "lazy_discover = True" fix. I'm seeing following in logs:

2023-11-02 19:07:53.588 DEBUG (SyncWorker_0) [custom_components.xiaomi_miio] Unable to fetch timers, this may happen on some devices: Unable to discover the device 192.168.3.106 2023-11-02 19:07:53.588 DEBUG (SyncWorker_0) [miio.click_common] Unknown model, trying autodetection. None None 2023-11-02 19:07:58.555 DEBUG (MainThread) [custom_components.xiaomi_miio] Finished fetching Robo data in 10.003 seconds (success: False) 2023-11-02 19:07:58.604 DEBUG (SyncWorker_0) [miio.miioprotocol] Unable to discover a device at address 192.168.3.106

dameq1 commented 11 months ago

I can't seem to get mine working again with the "lazy_discover = True" fix. I'm seeing following in logs:

2023-11-02 19:07:53.588 DEBUG (SyncWorker_0) [custom_components.xiaomi_miio] Unable to fetch timers, this may happen on some devices: Unable to discover the device 192.168.3.106 2023-11-02 19:07:53.588 DEBUG (SyncWorker_0) [miio.click_common] Unknown model, trying autodetection. None None 2023-11-02 19:07:58.555 DEBUG (MainThread) [custom_components.xiaomi_miio] Finished fetching Robo data in 10.003 seconds (success: False) 2023-11-02 19:07:58.604 DEBUG (SyncWorker_0) [miio.miioprotocol] Unable to discover a device at address 192.168.3.106

Looks that you have 2 components trying to access 1 device: miio.miioprotocol and custom_components.xiaomi_miio

dersher commented 11 months ago

I have upgraded to 2023.11.2 but the issue still persists. My affected models are zhimi.fan.sa1 and zhimi.fan.za4.

dameq1 commented 11 months ago

I have upgraded to 2023.11.2 but the issue still persists. My affected models are zhimi.fan.sa1 and zhimi.fan.za4.

Because your devices are not on the list: Change was applied only for:

zhimi.fan.za5 zhimi.airpurifier.za1

Raised in the discussion.

patrykwoj91 commented 10 months ago

Hello, HA Core version: 2023.12.4

Problem: Tons of logs:

2023-12-29 11:00:09.285 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Error fetching purifier_room1 data: Unable to discover the device 172.16.16.100 2023-12-29 11:03:15.605 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Error fetching purifier_room2 data: Unable to discover the device 172.16.16.101

For my 2 zhimi.airpurifier.mb3 instances.

Could You please take a look?

Dutchstyler commented 10 months ago

Have this still a long time. Could be from the 2023.5.x version. Now on Core version 2023.12.3 Latest OS on a RPI4 and there is no solution?

Logger: homeassistant.components.xiaomi_miio Source: helpers/update_coordinator.py:306 Integration: Xiaomi Miio (documentation, issues) First occurred: 29 december 2023 om 18:09:23 (50 occurrences) Last logged: 04:24:46

Timeout fetching Lucy data - { Vacuum S50 from Xiaomi } Timeout fetching Air Purifier data - { zhimi.airpurifier.mb3 }

KitHubek commented 10 months ago

till now - no solutiion. Only one is change this intergation to Xiaomi Miot Auto from HASC, and all working i think better that with this official intergation. This integration working very good with no errors till 2023.5 after that many many errors at log check this hacs integration and You will see that errors happen occasionally

issue-triage-workflows[bot] commented 7 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

patrykwoj91 commented 7 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Issue still persist in 2024.3.3 version of Home Assistant

Integration: homeassistant.components.xiaomi_miio Device: zhimi.airpurifier.mb3

Error fetching Purifier1 data: Unable to discover the device xxx.xx.xx.xx
Source: helpers/update_coordinator.py:350

Unexpected error fetching Purifier1 data: byte indices must be integers or slices, not str
Source: helpers/update_coordinator.py:318

2 errors above are the most common one

chrcht commented 7 months ago

We should probably keep the current default as-is, and just start collecting a list of models that require a specific setting. I created a draft PR (#100490) to get us started.

Feel free to add a comment there if your device is not already listed and switching the lazy_discover to True helps with it!

@rytilahti I recently installed xiaomi_miio on my HA and immediately faced this problem for my zhimi.airpurifier.m1

Being super happy seeing the solution I applied it locally and also create PR immediately, but now I am a bit lost. I applied the mentioned here workaround as setting up the lazy discovery flag to False, but logs are still flooded with different message.

lazy_discover set to True (original)

2024-04-05 14:37:52.200 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Error fetching Air purifier data: Unable to discover the device XXX.XXX.XXX.XXX

vs lazy_discover set to False (custom)

2024-04-05 14:32:57.362 ERROR (MainThread) [custom_components.xiaomi_miio] Timeout fetching Air purifier data

so with this workaround I am back to original issue for which this flag was actually introduced. So both ways my logs are flooded anyway.

dawid-niedzwiecki commented 4 months ago

Any update on this issue? Come on, this is so frustrating...

Betacart commented 2 months ago

Same problem for Xiaomi Standig Fan zhimi.fan.za4

stalsbyt commented 2 months ago

Currnet version HASS in docker (homeassistant/home-assistant:dev) Mi Air Purifier 3/3H

homeassistant  | 2024-09-04 10:26:07.906 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Error fetching Mi Air Purifier 3/3H data: Unable to discover the device 192.168.54.17
homeassistant  | 2024-09-04 10:28:40.947 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Error fetching Mi Air Purifier 3/3H data: Unable to discover the device 192.168.54.17
homeassistant  | 2024-09-04 10:29:17.508 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Error fetching Mi Air Purifier 3/3H data: Unable to discover the device 192.168.54.17
homeassistant  | 2024-09-04 10:30:09.447 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Error fetching Mi Air Purifier 3/3H data: Unable to discover the device 192.168.54.17
homeassistant  | 2024-09-04 10:30:45.409 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Error fetching Mi Air Purifier 3/3H data: Unable to discover the device 192.168.54.17

tcpdump:

10:34:40.915432 enp3s0 Out IP 192.168.54.35.37092 > 192.168.54.17.54321: UDP, length 32
10:34:40.915456 enp3s0 Out IP 192.168.54.35.37092 > 192.168.54.17.54321: UDP, length 32
10:34:40.915470 enp3s0 Out IP 192.168.54.35.37092 > 192.168.54.17.54321: UDP, length 32
10:34:41.523769 enp3s0 In  IP 192.168.54.17.54321 > 192.168.54.35.37092: UDP, length 32
10:34:41.524764 enp3s0 Out IP 192.168.54.35.42949 > 192.168.54.17.54321: UDP, length 160
10:34:41.536405 enp3s0 In  IP 192.168.54.17.54321 > 192.168.54.35.37092: UDP, length 32
10:34:41.536439 enp3s0 Out IP 192.168.54.35 > 192.168.54.17: ICMP 192.168.54.35 udp port 37092 unreachable, length 68
10:34:41.552294 enp3s0 In  IP 192.168.54.17.54321 > 192.168.54.35.37092: UDP, length 32
10:34:41.552330 enp3s0 Out IP 192.168.54.35 > 192.168.54.17: ICMP 192.168.54.35 udp port 37092 unreachable, length 68
10:34:41.886067 enp3s0 In  IP 192.168.54.17.54321 > 192.168.54.35.42949: UDP, length 144
10:34:41.886853 enp3s0 Out IP 192.168.54.35.43979 > 192.168.54.17.54321: UDP, length 32
10:34:41.886887 enp3s0 Out IP 192.168.54.35.43979 > 192.168.54.17.54321: UDP, length 32
10:34:41.886909 enp3s0 Out IP 192.168.54.35.43979 > 192.168.54.17.54321: UDP, length 32
10:34:41.920659 enp3s0 In  IP 192.168.54.17.54321 > 192.168.54.35.43979: UDP, length 32
10:34:41.921308 enp3s0 Out IP 192.168.54.35.41977 > 192.168.54.17.54321: UDP, length 768
10:34:41.933366 enp3s0 In  IP 192.168.54.17.54321 > 192.168.54.35.43979: UDP, length 32
10:34:41.933409 enp3s0 Out IP 192.168.54.35 > 192.168.54.17: ICMP 192.168.54.35 udp port 43979 unreachable, length 68
10:34:42.005619 enp3s0 In  IP 192.168.54.17.54321 > 192.168.54.35.43979: UDP, length 32
10:34:42.005653 enp3s0 Out IP 192.168.54.35 > 192.168.54.17: ICMP 192.168.54.35 udp port 43979 unreachable, length 68
10:34:42.506605 enp3s0 In  IP 192.168.54.17.54321 > 192.168.54.35.41977: UDP, length 976
10:34:42.507432 enp3s0 Out IP 192.168.54.35.33199 > 192.168.54.17.54321: UDP, length 32
10:34:42.507467 enp3s0 Out IP 192.168.54.35.33199 > 192.168.54.17.54321: UDP, length 32
10:34:42.507489 enp3s0 Out IP 192.168.54.35.33199 > 192.168.54.17.54321: UDP, length 32
10:34:42.520401 enp3s0 In  IP 192.168.54.17.54321 > 192.168.54.35.33199: UDP, length 32
10:34:42.521194 enp3s0 Out IP 192.168.54.35.35173 > 192.168.54.17.54321: UDP, length 496
10:34:42.538622 enp3s0 In  IP 192.168.54.17.54321 > 192.168.54.35.33199: UDP, length 32
10:34:42.538659 enp3s0 Out IP 192.168.54.35 > 192.168.54.17: ICMP 192.168.54.35 udp port 33199 unreachable, length 68
10:34:42.607159 enp3s0 In  IP 192.168.54.17.54321 > 192.168.54.35.33199: UDP, length 32
10:34:42.607195 enp3s0 Out IP 192.168.54.35 > 192.168.54.17: ICMP 192.168.54.35 udp port 33199 unreachable, length 68
10:34:42.927787 enp3s0 In  IP 192.168.54.17.54321 > 192.168.54.35.35173: UDP, length 624
Rollocko commented 1 month ago

Same here

Error fetching Mi Air Purifier 3/3H data: Unable to discover the device 10.5.0.20

dawid-niedzwiecki commented 1 month ago

Same here with all xiaomi devices. Xiaomi integration basically not working at all. Should be removed or fixed from HA, since it's misleading.

syssi commented 1 month ago

@dawid-niedzwiecki Please be careful. Sometimes there is not enough free time to take care of everything. We are all volunteers.

syssi commented 1 month ago

Could somebody provide a brief summary what's the issue in detail? Is my undestanding correct:

  1. The device works in general
  2. The device is unavailable pretty often
  3. Everytime the device goes unavailable the noisy error is printed to the log
dameq1 commented 1 month ago

@syssi

Yes, your understanding is correct. Another point is that for some devices setting lazy_discover = True solved the issue completely and for others like mine zhimi.airpurifier.za1 significantly reduced the frequency of unavailable state occurrences. I'm not familiar with the code under the lazy_discover flag but it looks like some timeouts are extended which helped.

klem1 commented 1 month ago

Same problème here with my xiaomi vacuum

2024-09-13 12:11:46.295 DEBUG (SyncWorker_8) [miio.click_common] Unknown model, trying autodetection. None None 2024-09-13 12:11:51.291 DEBUG (MainThread) [homeassistant.components.xiaomi_miio] Finished fetching Robot aspirateur data in 10.002 seconds (success: False) 2024-09-13 12:11:51.300 DEBUG (SyncWorker_8) [miio.miioprotocol] Unable to discover a device at address 192.168.0.28

gaborpetras commented 1 month ago

Could somebody provide a brief summary what's the issue in detail? Is my undestanding correct:

  1. The device works in general
  2. The device is unavailable pretty often
  3. Everytime the device goes unavailable the noisy error is printed to the log

Yes, this is the case. I'm experiencing this issue with model: zhimi.humidifier.cb1

Rollocko commented 1 month ago

Could somebody provide a brief summary what's the issue in detail? Is my undestanding correct:

  1. The device works in general
  2. The device is unavailable pretty often
  3. Everytime the device goes unavailable the noisy error is printed to the log

Confirmed also from my side.

wary-hermit commented 1 month ago

Same thing happening, running on Docker Core 2024.9.3. Purifier tends to work, but every few minutes it becomes unavailable in dashboard for ~5-10 seconds.

SCR-20241005-ewia
2024-10-05 04:02:31.299 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Error fetching Mi Air Purifier 3/3H data: Unable to discover the device 192.168.8.132
2024-10-05 04:06:21.299 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Error fetching Mi Air Purifier 3/3H data: Unable to discover the device 192.168.8.132
2024-10-05 04:08:01.299 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Error fetching Mi Air Purifier 3/3H data: Unable to discover the device 192.168.8.132
2024-10-05 04:12:51.299 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Error fetching Mi Air Purifier 3/3H data: Unable to discover the device 192.168.8.132
2024-10-05 04:14:58.019 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Error fetching Mi Air Purifier 3/3H data: Unable to discover the device 192.168.8.132
2024-10-05 04:17:11.299 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Error fetching Mi Air Purifier 3/3H data: Unable to discover the device 192.168.8.132
2024-10-05 04:19:13.700 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Error fetching Mi Air Purifier 3/3H data: Unable to discover the device 192.168.8.132
2024-10-05 04:21:11.219 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Error fetching Mi Air Purifier 3/3H data: Unable to discover the device 192.168.8.132
2024-10-05 04:21:47.315 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Error fetching Mi Air Purifier 3/3H data: Unable to discover the device 192.168.8.132
2024-10-05 04:22:23.300 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Error fetching Mi Air Purifier 3/3H data: Unable to discover the device 192.168.8.132
2024-10-05 04:24:05.311 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Error fetching Mi Air Purifier 3/3H data: Unable to discover the device 192.168.8.132
2024-10-05 04:27:46.301 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Error fetching Mi Air Purifier 3/3H data: Unable to discover the device 192.168.8.132
2024-10-05 04:29:48.346 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Error fetching Mi Air Purifier 3/3H data: Unable to discover the device 192.168.8.132
2024-10-05 04:31:45.299 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Error fetching Mi Air Purifier 3/3H data: Unable to discover the device 192.168.8.132
2024-10-05 04:32:37.299 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Error fetching Mi Air Purifier 3/3H data: Unable to discover the device 192.168.8.132
2024-10-05 04:33:13.823 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Error fetching Mi Air Purifier 3/3H data: Unable to discover the device 192.168.8.132
2024-10-05 04:36:21.565 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Error fetching Mi Air Purifier 3/3H data: Unable to discover the device 192.168.8.132