Open msavazzi opened 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!
(message by CodeOwnersMention)
xiaomi_miio documentation xiaomi_miio source (message by IssueLinks)
stesso mio problema con Xiaomi Smart Air Purifier 4 installato con l'integrazione xiaomi miio sia automatico che con l'inserimento del token.
2023-02-04 17:49:58.387 WARNING (MainThread) [homeassistant.config_entries] Config entry 'zhimi.airp.mb5' for xiaomi_miio integration not ready yet: Unable to discover the device 192.168.1.76; Retrying in background 2023-02-04 17:49:58.406 WARNING (MainThread) [homeassistant.config_entries] Config entry 'zhimi.airp.mb5' for xiaomi_miio integration not ready yet: Unable to discover the device 192.168.1.76; Retrying in background 2023-02-04 17:49:58.411 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Xiaomi Smart Air Purifier 4' for xiaomi_miio integration not ready yet: Unable to discover the device 192.168.1.76; Retrying in background
I have the same issue with my Mi Air Purifier 3H. Any progress?
I have tried a custom xiaomi_airpurifier one and no problem with connection... I ma waiting on a fix, but meantime using this workaround.
Having the same issue with my Zhimi Air Purifier 3 (ma4) after it was disconnected from Wi-Fi (edit: this was incorrect), interestingly, my Roborock S6 MaxV behaves just fine. The air purifier was purchased from AliExpress so it's linked to a cn
Xiaomi account.
2023-04-04 12:56:29.180 DEBUG (MainThread) [homeassistant.components.xiaomi_miio] Finished fetching zhimi.airpurifier.ma4 data in 5.044 seconds (success: False)
2023-04-04 12:56:29.181 DEBUG (MainThread) [homeassistant.config_entries] Config entry 'zhimi.airpurifier.ma4' for xiaomi_miio integration not ready yet: Unable to discover the device 192.168.2.23; Retrying in 10 seconds
2023-04-04 12:56:29.181 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [139964701399488] Sending {"id":181,"type":"event","event":[{"type":"updated","entry":{"entry_id":"c7a63a5a69be1b3cf988c46c48c9fbf1","domain":"xiaomi_miio","title":"zhimi.airpurifier.ma4","source":"user","state":"setup_retry","supports_options":true,"supports_remove_device":false,"supports_unload":true,"pref_disable_new_entities":false,"pref_disable_polling":false,"disabled_by":null,"reason":"Unable to discover the device 192.168.2.23"}}]}
2023-04-04 12:56:44.519 DEBUG (SyncWorker_5) [miio.miioprotocol] Unable to discover a device at address 192.168.2.23
2023-04-04 12:56:44.522 DEBUG (MainThread) [homeassistant.components.xiaomi_miio] Finished fetching zhimi.airpurifier.ma4 data in 5.010 seconds (success: False)
2023-04-04 12:56:44.522 DEBUG (MainThread) [homeassistant.config_entries] Config entry 'zhimi.airpurifier.ma4' for xiaomi_miio integration not ready yet: Unable to discover the device 192.168.2.23; Retrying in 20 seconds
2023-04-04 12:56:39.511 DEBUG (MainThread) [homeassistant.components.xiaomi_miio] Initializing with host 192.168.2.23 (token 8dd27...)
2023-04-04 12:56:39.513 DEBUG (SyncWorker_5) [miio.click_common] Unknown model, trying autodetection. None None
OK I think I've found the problem specific to my setup - I have two separate networks, one for most of my devices (this includes the NAS that my home assistant instance is running on) and another one for IoT devices. If the Xiaomi device isn't on the same subnet as the Home Assistant instance, it will fault, otherwise it works fine.
For those of you who don't want to deal with Xiaomi's platform, some air purifiers use an ESP32 to communicate over Wi-Fi. A custom ESPHome component that talks to the air purifier's onboard STM32 to enable controls of its various features is available here - https://github.com/jaromeyer/mipurifier-esphome
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.
Not stale
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.
I'm having the exact same issue as @cydia2020 for having a different subnet for the host and the discovered device. Will try with the same subnet later.
I am using the last version of HA, got the same error with the xiaomi air purifier on a different vlan, there are no firewall blocking rules between them so all the traffic should be allowed. Is it confirmed that moving it to the same vlan should fix it?
2023-10-19 14:02:21.517 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Mi Air Purifier 3/3H' for xiaomi_miio integration not ready yet: Unable to discover the device 192.168.x.x; Retrying in background
I am using the last version of HA, got the same error with the xiaomi air purifier on a different vlan, there are no firewall blocking rules between them so all the traffic should be allowed. Is it confirmed that moving it to the same vlan should fix it?
2023-10-19 14:02:21.517 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Mi Air Purifier 3/3H' for xiaomi_miio integration not ready yet: Unable to discover the device 192.168.x.x; Retrying in background
Correct, moving the device to the same VLAN as HA should fix it.
my mi purifier is on same vlan, don't have multiple ones and yet I get same error.
deleting and adding integration again fixed it. but I don't think it's a permanent fix.
Same problem here, just noticed (xD).
Is there any work in progress for this?
Thanks!
same issue: "Error fetching Mi Air Purifier Pro H data: Unable to discover the device 192.168.13.121"
I've only 1 VLAN with 3 AP in mesh.
with app is OK and in the LAN I didn't register any disconnection
My HA is in one VLAN, the IOT devices like the Air Purifier 3H are in another VLAN, with a firewall/router in between. It used to work, about 2 years ago, then not so much somewhere around the summer of 2022 for me. A lot of changes happened in these 2 years. Fresh HA hardware, new HA versions, new firewall code, fresh Xiaomi firmware...
But today I could confirm that the problem is really my network setup and the seperate VLANS. To confirm this, I had to setup a spare Raspberry PI with HA, put it on the same wireless VLAN & SSID as the IOT Xiaomi devices and the Xiaomi Miio integration works perfectly.
I will still have a look if a Avahi service that services mDNS can help as that helped me with the Ikea Dirigera hub that could not be found with the Ikea Smart Home App until Avahi was configured on the router.
The same issue here. I have 3 MI devices in the same network as the HA server. After pairing to HA the integration works for a while and devices are lost....
It's fixable. I spend some time on it, and the root cause of much of the issues is that those Purifier 3H devices ONLY respond to packets coming from either "the Xiaomi Cloud servers" or from an device with an IP address on the same subnet. Having your HA in another subnet, even without any firewall rules blocking anything is not allowed by the firmware of the Purifiers. So you can either move your HA or Purifiers around, or you can do some IP masquerading so that packets coming from a HA in another subnet or VLAN, seems to be coming from a device on the subnet/vlan of the Purifiers.
If you happen to use Pfsense as a firewall then this will fix it:
It's fixable. I spend some time on it, and the root cause of much of the issues is that those Purifier 3H devices ONLY respond to packets coming from either "the Xiaomi Cloud servers" or from an device with an IP address on the same subnet. Having your HA in another subnet, even without any firewall rules blocking anything is not allowed by the firmware of the Purifiers. So you can either move your HA or Purifiers around, or you can do some IP masquerading so that packets coming from a HA in another subnet or VLAN, seems to be coming from a device on the subnet/vlan of the Purifiers.
If you happen to use Pfsense as a firewall then this will fix it:
I don't think I understood correctly; I have a single Vlan, all devices, including my HA server, are on the same network. I don't think this is the problem
Thanks @ha-reporting2023, I was able to masquerade the packet by setting NAT:Outbound as follows:
Interface | Source | Source Port | Destination | Destination Port | NAT Address | NAT Port | Static Port |
---|---|---|---|---|---|---|---|
IOT_VLAN | <HA IP address> |
* | <Air Purifier IP address> |
* | IOT_VLAN address | * | NO |
Same Problem. My solution will be to get rid of these Xiaomi Purifiers :D I was already not so happy to have to use something different than ZHA.
The Levoit Purifiers seem to be best integrated into HA at the moment.
I'm not sure that the Levoit integration is all that great looking at https://www.home-assistant.io/integrations/vesync/
But the 99 euro price for a Core 200S is inline with the Xiaomi pricing.
I'm not sure that the Levoit integration is all that great looking at https://www.home-assistant.io/integrations/vesync/
- you are still very cloud dependent,
- you are still very dependent on the app to make network changes
- the integration breaks from time to time
- EU models may not always be supported
But the 99 euro price for a Core 200S is inline with the Xiaomi pricing.
Any better alternatives? Philips is also cloud based.
The vital 200s looks great will wait till it's better HA integrated maybe. But I really want to go far away from Xiaomi.
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.
Not stale
Hey @ChristBKK I own an smaller Levoit purifier too and I would throw it out the window every time I have to deal with it.
I have everything integrated into HA, some custom parts indeed, but I just gave up with the Levoit purifer and just use its own app. Why?
Hope my next purifier will be matter compliant xD
The problem
I've installed the Xiaomi MIIO integration (https://www.home-assistant.io/integrations/xiaomi_miio/) using the direct link from page. It asked me the credential and after detected correctly the Air Purifier but then:
and I get an infinite sequence of:
What version of Home Assistant Core has the issue?
core-2023.1.6
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