Known Devices Names in Logbook

Hi everyone,

I’ve gotten “NMAP” device_tracker working properly (almost, I still go “away” when my device sleeps every now and then… still have to tweak the timeout settings and what not I think).

But my question I have now is now do I change the device name with in the logbook?

I have the name of the person showing up on the “Status” page correctly (with image), but the logbook still shows the device ID (that I assume Home Assistant assigned). It’s the same “ID” that shows in the known_devices file.

141aa38b3e1e:
  hide_if_away: false
  icon:
  mac: 14:1A:A3:8B:XX:XX
  name: Person
  picture: /local/person.png
  track: true
  vendor: Motorola Mobility LLC, a Lenovo Company

So the logbook will show 141aa38b3e1e with it’s graph. How can I get it to show “Person”.

Thanks.

Hi,
Can you please help about the location of person.png? I am running Hassio 0.57.2 and placed it under /config/www but not showing image as icon.

My setup keep hanging every few minutes and have the below entries in configuration.yaml:

device_tracker:
  - platform: nmap_tracker
    hosts: 
      - 192.168.0.1/24
      - 192.168.0.15/24
    track_new_devices: no
    interval_seconds: 60
    home_interval: 30
    exclude:
      - 192.168.0.201
      - 192.168.0.202
      - 192.168.0.203
      - 192.168.0.204
      - 192.168.0.206
      - 192.168.0.207
      - 192.168.0.208
      - 192.168.0.210
      - 192.168.0.211
      - 192.168.0.214
      - 192.168.0.216
      - 192.168.0.217
      - 192.168.0.219
      - 192.168.0.220
      - 192.168.0.225

192.168.0.15/24 is wifi extender, by scanning router alone all devices are not discovered so I added extender as a host. Any help appreciated.
Thanks,
Mukesh

You need to place the image setting in the known_devices.yaml file. The config code in my OP was from the known_devices.yaml file. The way I did this was to add the device_tracker setting in the configuration.yaml and then start up Home Assistant. I let it start successfully & waited a minute watching the log. I saw the nmap scanner run. Then I stopped Home Assistant.

After that my known_devices.yaml file was populated. So I edited it as needed (renamed the devices I wanted to track, add a image, hide the ones I don’t want, etc.) and then restarted Home Assistant.

Also, I just noticed you subnet notation. I don’t think it makes sense.

      - 192.168.0.1/24
      - 192.168.0.15/24

Is the same. These notations are both saying “the range of 192.168.0.1-192.168.0.254”. Check your notation here:
192.168.0.1/24 = http://jodies.de/ipcalc?host=192.168.0.1&mask1=24&mask2=
192.168.0.15/24 = http://jodies.de/ipcalc?host=192.168.0.15&mask1=24&mask2=

I don’t think that will mess up your configuration. It might make nmap scan the same devices twice though.

Unfortunately I did not use icon setup from known_devices.yaml, instead I used a template to create sensor for each family member. It helps clubbing multiple phones owned by single person into a single sensor and tried to assign an icon to every sensor. I have the icon but don’t know where to place it for sensor to show. I placed it under /config/www/ in Hassio environment.

#  configuration.yaml
  - platform: template
    sensors:
      mxxxx_home:
        value_template: '{% if is_state("device_tracker.mxxxx_iphone", "home") or is_state("device_tracker.mxxxx_xphone", "home" ) %}home{% else %}away{% endif %}'
      pxxxx_home:
        value_template: '{% if is_state("device_tracker.pxxxx_gphone", "home") %}home{% else %}away{% endif %}'
      nxxxx_home:
        value_template: '{% if is_state("device_tracker.nxxxx_iphone", "home") %}home{% else %}away{% endif %}'

customize.yaml:

    sensor.mxxxx_home:
      friendly_name: Mxxxx
      icon: /local/mxxxx.png
    sensor.pxxxx_home:
      friendly_name: Pxxxx
      icon: /local/pxxxx.png
    sensor.nxxxx_home:
      friendly_name: Nxxxx
      icon: /local/nxxxx.png

#groups.yaml:
  My_Family:
    name: Occupancy
    entities:
    - sensor.mxxxx_home
    - sensor.pxxxx_home
    - sensor.nxxxx_home

  Admin_View:
    name: Administrator
    view: yes
    entities:
    - group.System_Monitor
    - group.AwayMode
    - group.My_Family

Router 192.168.0.1 scan is not able to show all devices connected to extender 192.168.0.15 as a result I have added extender as a host in yaml with same network settings and extender should use same range of IP as allocated by router.

Sorry, templating goes over my head. I’m not 100% how to do what you want. Maybe start a new thread?

As for my initial problem of how to change the name that shows up in the history/logbook. I found that once the history goes “beyond” when the device was tracked it will fall off automatically and not show up anymore. So it’ll just sort itself out eventually.

I have two simple problems:

  1. Where to place a customized icon images for an item in Hassio environment? Placing it under /config/www doesn’t work.

  2. My router doesn’t register devices connected to wifi extender as a result I have to scan extender by adding it to the host list along with router using NMAP. This setup hangs every few minute and I have to reboot, unable to find the cause of problem.