DNS IP

The DNS IP integration集成将 Home Assistant 与您的设备、服务等连接和集成。 [Learn more] will expose an IP address, fetched via DNS resolution (every 2 minutes), as its value. It provides both IPv4 and IPv6 lookup as separate sensors depending on accessibility to resolvers.

  1. When you enable the integration集成将 Home Assistant 与您的设备、服务等连接和集成。 [Learn more] with the default value, it will query the OpenDNS nameservers with the hostname myip.opendns.com, which will resolve to your external/public IP address.
  2. If you specify a hostname, a regular DNS lookup will be performed, providing you the IP the hostname resolves to. If your hostname resolves to multiple IP addresses, the lowest IP will be returned as the state. The first 10 IPs will be returned in ascending order in the ip_addresses attribute.

配置

要将 DNS IP integration 添加到您的 Home Assistant 实例中,请使用此 My 按钮:

手动配置步骤

如果上述 My 按钮不起作用,您也可以手动执行以下步骤:

选项

DNS IP 的选项可以通过用户界面设置,具体步骤如下:

  • 浏览到您的 Home Assistant 实例。
  • 转到 设置 > 设备与服务
  • 如果配置了多个 DNS IP 实例,请选择您想配置的实例。
  • 选择集成,然后选择 配置
Resolver

You may override the default IPV4 and IPV6 nameservers that are being used by setting any nameserver IP address you like, for example 1.1.1.1 (IPV4) or 2606:4700:4700::1111 (IPV6).

Port

You may override the default DNS port of 53. This may be useful to bypass DNS filtering or redirection.