Is anyone using hostnames in the various host: fields for configurations? Do they pretty much universally work or is it more dependent on the integration?
I have my own DNS name, so my household items make use of it. It would be more convenient to use rokubedroom.myhostname.net instead of the IP for the device in the configuration as an example.
Can you advise how you have your DNS setup to be able to get this to work. Currently I’ve been using the IP and a static DHCP list in my setup. But so it’s more dynamic, I’m looking to move over to using the hostnames instead of IPs.
I use dnsmasq. dnsmasq works as a dhcp server and a DNS server.
I started with it on a Pi 1 and it worked well. If you define a fixed IP in the config file it will always give that IP address out to the specified MAC address. It will also return the IP address when the defined hostname is searched via DNS.
I have since moved to pi-hole. It also uses dnsmasq, and has a nice GUI for defining fixed addresses, and seeing what addresses have been handed out.
To do either of these (which basically are the same solution) you should turn off your DHCP server on your ISP supplied router. Let dnsmasq do it all.
I have dnsmasq on my OpenWRT router. So it looks like I can do exactly as you’ve setup with Pi-Home.
It looks like local DNS name resolution is happening automatically for some hosts on my network that haven’t had a static lease set (ie. OpenWRT will show the hostname.lan). And when I ping hostname.lan I’ll get a response from that host. Is this normal behaviour? And can HomeAssistant integrations handle those hostname.lan rather than an IP in each config?