I am using Ubiquiti's Unfi and finally figured out how to use hostname.domain DNS. But the Hubitat isn't supplying a hostname as all the other devices do. This should be a simple fix -- even better if I could override the default.
easy fix in unifi.. just add an alias for the client..
And not all other devices do.. In fact I have a large number of embedded devices that don't supply a hostname..
Another cool thing.. There is a hubitat icon available for the client device under device fingerprint...
The aliases are not added to /etc/hosts so do not work with the DNS. I agree that they should and, in fact, both my assigned names and the hostname should work but that's not the way it is now.
/etc/hosts is not where unifi stores hostnames.. It stores in the dns forwarding service..
And are you sure?
I don't use dns forwarding as I have my own real dns servers .. .
If an alias doesn't work for you.. Here is how to create a static entry in the forwarder:
Using UniFi here. Setting Alias in the controller on the Hubitat client like @bcopeland said worked great. I think I installed Bonjour/ZeroConf/Avahi on all my machines to get http://hubitat.local working too. iTunes has it embedded in it's exe installer on Windows and I think it's avahi on Linux.
http://hubitat.local indeed works. But there is also a standard naming scheme using hostname in the DNS as fully qualified names using my site name. It would be nice if hubitat also supported those names.
I should add that, I do know how to use static addresses but am trying to avoid as much special mechanisms because my goal is to have an implementation I can share with those with less expertise. The very fact that I'm using Unifi violates that principle but, alas, is necessary.
I have a related issue with the current Wiz driver is great but it currently relies on IP addresses and I want to shift to using names. Too many pieces that have to be linked together and I'm trying to figure out how to reduce the complexity for normal users.
So, rather than set up a static IP, they have to set up an alias? The second isn't a function that is available in all consumer grade routers, especially Netgear routers. But I don't know of a router that doesn't support static IPs.
Also, doesn't the alias you enter get tied to the IP address of the device? So, in order to set up an alias record, doesn't the device also have to have a static IP? How would the alias work if it changed IP addresses?
Ok.. Well it’s listed in the feature requests category..
But I wouldn’t hold out.. Might be a while..
On unifi it’s actually tied to the mac address..
But I agree with your point..
My Netgear router even limits the number of entries in the Static IP address table. So, I now have as many devices as possible that I can program a static IP into programmed that way. My next router WILL be DD-WRT compatible. Enough of this sh...stuff.
I'm sure you have more than one SBC available ... why not run dnsmasq on one as a DHCPd? And turn off the DHCP server on your router. I do something like that. I let my router assign just a single address by DHCP (for an SBC, which does the rest via dnsmasq).
I tried that at one point but it didn't work all that well. It ended up causing a big slow-down in my network.
I am also on Unifi and landed on this thread having the same request. Setting up local DNS names through the controller interface is a long-standing pain in the rear. Many threads of anguish on community.ui.com attest to this. If we could just add a hostname request in the DHCP request that would be elegant and so much simpler than mucking about assembling JSON overrides to controller provisions.