core: Xiaomi-Aqara Gateway via Integration page can't be found because of lack of option "host" in new integration GUI

The problem

Trying to add my old Xiaomi Aqara Gateway with the new GUI integration page - not working.

Environment

dev false
docker false
hassio false
installation_type Home Assistant Core
os_name Linux
os_version 4.19.66-v7+
python_version 3.7.3
timezone Europe/Moscow
virtualenv true
  • Home Assistant Core release with the issue: >0.111.4
  • Last working Home Assistant Core release (if known): 0.111.4
  • Operating environment (OS/Container/Supervised/Core): Core
  • Integration causing this issue: xiaomi_aqara
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/xiaomi_aqara/

Problem-relevant configuration.yaml


Traceback/Error logs

OSError: [Errno 99] Cannot assign requested address

Additional information

Multicasts (used by discovery) not working well in my network, so, gateway can’t be finded. Old yaml configuration had the option “host” to set the ip of gateway directly. I used that option and my Gateway had work without problem. Now i can’t add it back because that option (host) is not exists in new integration, so, it is not possible to add Gateway anymore.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 3
  • Comments: 26 (14 by maintainers)

Most upvoted comments

@starkillerOG While I appreciate your hard work and generally understand the push to move away from YAML to config flows, it’s really annoying when the new config flows lack feature parity with the most important YAML use cases. In this particular case it’s the inability to configure the integration manually by entering the gateway IP address/MAC address/token. When such feature parity doesn’t exist it doesn’t make sense to remove the YAML configuration - it’s a sure way to annoy the users. Especially when the troubles with the discovery have been well known.

In my case I’m not quite sure what’s happening - I can see the multicast packets on the VLAN interface using tcpdump, both the outgoing whois one to 224.0.0.50:4321 and the incoming heartbeat ones from <gateway_ip>:4321 -> 224.0.0.50:9898, but the discovery still fails. I have a nftables firewall in place but I have the allowed UDP packets to port 9898, which was the solution to the gateway disconnecting after a set amount of time previously (2 hours or something).

I’m pretty sure it’s something in my networking setup, but until I figure it out, it would be great to be able to configure the gateway manually, especially when it has a fixed IP address and even a local hostname, so there’s no need for discovery.

actually will not be part of 0.113.2, see the status of this PR to check for updates: https://github.com/home-assistant/core/pull/37469 as soon as that gets merged it will be fixed in the next release. It is ready to be merged tho, so schould be in a couple of days.

@meichthys be sure you are like this image

also be sure you have restored the old config section in the configuration.yaml, you know

xiaomi_aqara:
  gateways:
   - mac: F0B429CBFE14
   blah blah

@meichthys You do something wrong. It must work. Are you copied the folder “xiaomi_aqara” from "where_your_homeassistant_installed/lib/python3.7/site-packages/homeassistant/components/ " (not dig inside folder, just the folder with all content) to the folder “/home/homeassistant/.homeassistant/custom_components/” and then restarted HASS?

@meichthys As the workaround, you may get the component from 0.111.4 and put it in your “custom_components” folder. I use it like this - It works.

For now I’ve reverted to 0.111.4 since i rely on this integration a lot. In case anyone else reverts to 0.111.4, you may need to also remove your homeassistant_v2.db and reboot homeassistant. I think this is needed because v0.112.0 restructured the database which broke backward compatibility.

Same here. Multicast never worked for me, but setting the xiaomi gateway ip in the host setting fixed it. Worked for two years. Still broken in 0.112.4