Could someone please tell me how assign a specific name to a specific IP address using the “nmap” device tracker? I have seen references to tracked devices this way in several places, but I cannot find anywhere any example of how to define them. My automations work fine using the “unfriendly” names, but this is a clumsy way to refer to the devices. (I have to say that, although I find HA itself to be really awesome and robust, the documentation for it is really severely lacking.)
Below is what I have now. Guessing only, I’ve tried adding both “name” and “entity_id” as attributes to each definition. Neither causes an error, but neither works either. As I say, I can’t find a full specification of the “nmap” tracker syntax anywhere. Even the tags below had to be gathered from several different examples. Spcifically, I’m tracking individual iPhones, and I want to assign the owners’ names to each (static) IP.
If you are using NMap, there should be a know_devices.yaml file in same directory as your configuration file. NMap should have created this for you - you don’t have to create it. Your attributes go in there. For example one entry in my know_devices.yaml reads:
1921681165:
name: 192.168.1.165
mac: 18:B4:30:20:05:FB
picture:
track: yes
hide_if_away: no
name: Here is where you can put in the friendly name you were looking for.
picture: Either a local or full URL reference to an image to replace the default icon or use MDI icons
track: Yes or No (whether status is shown and updated)
hide_if_away: If the state is “away”, the object will not be shown.
Hi, @rpitera. That’s super… Thank you very much. I had indeed discovered this file myself, but I would not have imagined putting settings in there instead of (or as well as) the configuration file. It would still be nice if the full syntax options of all HA options were documented.
Glad I could help! HA is still a relatively young project that is growing very quickly and like all open source projects, it can only get better by user input and contributions. I am still a noob but I am trying to answer any question I can to help out and free the developers and key persons to do the work that they do best. Plus sharing knowledge is something in my nature. There is an ongoing project to improve the documentation, which is something I hope to get involved in at some point. A lot of it is in there; it’s just in different places and I’m sure at some point soon will be pulled together.
I have a question related to this, not sure if I should post as new thread but let’t try here:
I want to output the IP of each tracked device, since they’re getting that dynamically. How would that be possible? Right now I’m using device tracker with nmap and I’ve set upp a bunch of devices in known_devices.yaml. Away/Home is nice and all, but I’d rather see the IP. =)