Use DNS names instead of IP address

With the release of 0.66.0, I had to adjust the “host” attribute in the hue-bridge definition. While prior to 0.66.0 (0.65.6 to be precisely) a DNS hostname was accepted (here: ‘philips-hue’), now only an IP address is valid.

This is applicable to many components within Home Assistant and contradicts the concept of DHCP which is surely widely used in typical home automation setups. Besides, I don’t see IPv6 addresses supported anywhere.

Please consider, that if a host is to be addressed, a DNS name should be supported as valid alternative to an IP address.

Agreed, Hue will break for me too. @balloob why hosts are now not allowed?

This is a preparation of 0.67 where we’ll store the auth in a new format. Allowing host names makes everything a lot more complicated.

We’ll accept a PR to add support back again.

Will it accept IPv6? Is Python capable of IPv6?

Usually using IP addresses instead of FQDN makes everything complicated :slight_smile:
In IPv6 network it would be very cumbersome to use addresses (I don’t think that hue bridge currently supports IPv6, however).

1 Like

I expect that most users will not use hostnames and instead rely on discovery.

I guess discovery works for most people. My stuff is sprinkled around separate buildings and networks with different security levels, so I ended up assigning fixed IPs and names to most devices.

Also dead because 66.0 broke DNS. Thanks. :roll_eyes:

This is a step back. You can maintain DNS address, autodiscover or whatever.

I have a network at home where my DHCP gives the same ip address to the devices + DNS for internal resolution and custom firewall rules among VPN.

I don’t like to rely on autodiscover and open my firewall to allow the autodiscover.

1 Like

So I submitted a minimal PR:
https://github.com/home-assistant/home-assistant/pull/13823

It would be really nice to use hostnames again.

Well as of 2021.12 I can see DNS names in my log files for almost anything - one exception: ESPHome.

Error getting initial data for 192.168.178.45: Timeout waiting for response for <class 'api_pb2.ListEntitiesRequest'>
12:46:13 – (WARNING) ESPHome

It would be nice, if ESPHome would also log names instead of IP addresses.