Resolving hostnames

Home Assistant, OS directly on my Raspberry PI, does not always resolve hostnames even though the DNS is set up.
Because of this, I have to configure my P1 meter OpenTherm gateway by IP address, whereas a hostname would be easier.
This concerns a real DNS server, not an mdns (.local).

If you say so.
Do you have a question? https://community.home-assistant.io/t/how-to-help-us-help-you-or-how-to-ask-a-good-question/

Yes, allocating static IP addresses in the DHCP section of your router config bypasses the need for mDNS searching to locate your devices on your LAN, one I consider faster, consistent, more reliable, and easier for troubleshooting as you have done some planning.

mDNS and DNS are separate things. You may have misunderstood their roles in your configuration strategy and implementation.

1 Like

I mean from HomeAssistant. My HomeAssistant has a fixed IP address and a hostname, which works. If I want to add other integration from my network, I can’t do that with a hostname. Neither in my search domain .lan nor with mdns (.local).

As an example:
~ nslookup p1meter.lan Server: 172.30.32.3
Address: 172.30.32.3#53

** server can’t find p1meter.lan: NXDOMAIN

~ nslookup p1meter.lan 192.168.1.254 Server: 192.168.1.254
Address: 192.168.1.254#53

Name: p1meter.lan
Address: 192.168.1.98

I understand that HomeAssistant runs from the image in a container, from there 127.

192.z and 172.x are different subLANs. You have to get the data packets from one to the other for them to interoperate and talk to each other. Check your configuration documentation carefully as you may have missed a vital step…

I don’t understand that. 127 is a lookback address. 192 is my physical network, and of course, I have configured my router for DNS in the GUI.

127.x vs 172.x vs 192.x. Different. Networking doesn’t tolerate lysdexia.

Slow down. Look at external vs internal vs what’s in a container.

Any clues in your logs? System as well as DNS? Your Raspberry Pi welcome screen display if you connect a monitor?

List all the IP addresses - HomeAssistant server (your Raspberry Pi), router, your OpenTherm gateway, and the device you are browsing from.

172.30.x.x is probably the internal Docker network used by containers to communicate internally in the Docker environment.

Yes, and they still need to be configured to pass packets across the network.