Our IT department does not like static Ip addresses. I am looking at installing 10-20 pi zeros feeding one dashboard. He is asking if he can leave it DHCP and assign a hostname instead.
He has asked for specific examples of why I don't want to do this. Honestly, right now its just becasue I can access, edit and keep track of my devices easier with static I'd's. Can anyone else give me some input? Maybe his idea is better?
In terms of keeping track, what's the difference between an IP address and a hostname? They are both short strings of characters that you need to write down somewhere and remember which is assigned to which. The hostname has the benefit of letting you give them more meaningful names than the digits of an ip address.
The only word of caution I will give you is to make sure you set the flowsFile property in your settings file so that it doesn't do the default behaviour of using the hostname in the file name - because any DNS failure could lead to NR failing to find the expected flow file otherwise.
Pis also usually have avahi service running by default so once hey have a hostname you can find them by ping the-hostname.local - but the key thing is as Nick says to ensure you fix the flow file name in the settings.js file.
Many routers also supply a DNS server populated with the "hostname" of the DHCP client when they connect.
I've never figured out what makes the .local required or not. Our ATT fiber router doesn't require the .local, nor did my ASUS, but my Jetson Nano did when connected to either one did require I add .local when connecting to my MQTT server.
My new Netgear is consistent requiring .local all the time.
Few netcams support avahi service and are not generally easy to set a unique "hostname" so static IP are often required. Trust me, unique and meaningful hostnames are way better than using static IP numbers.
Thanks all, I've always been partial to ip on my machines because if I wanted to move them or change locations I just needed to update the spreadsheet with asking IT to change names on their end(because they need to go through their bosses to do so)
But good to know we can use the host names without any issues.