Mosquito MQTT broker name?

Hey,

This issue may make sound stupid easy but:
I installed the Mosquito mqtt broker in supervised mode following the documentation: https://www.home-assistant.io/integrations/mqtt/

I try to connect to it with a client but I can’t figure out what address/hostname I should point to… I can use the IP address of the HASS server (I guess ?) but what if I don’t want to use IP addresses ? I use DHCP and I don’t want to hardcode IP in my MQTT client. Is there a way to use a “mqtt hostname” so I can keep my config dynamic ?

Thank you

No. Your external client will always need to know the ip of the HA server. If you insist on HA server using dhcp, you should configure your dhcp server (likely your router) to provide a static lease for your HA sever’s MAC address. This will make IP always the same.

Basic networking stuff. You will need to have a DNS server on your network, and then you can configure your mqtt server as a CNAME for your HA server.

Thank you guys. I’ll go for the IP lease as it is the easiest way.