network_scanner icon indicating copy to clipboard operation
network_scanner copied to clipboard

configuration.yaml not loaded

Open jmgutierrezm opened this issue 1 year ago • 13 comments

Hi All

I have created the configuration.yaml file into the network_scanner folder.

The content of the configuration.yaml is:

a4:ce:da:7f:92:e8;Router;Livebox5 aa:05:a2:a4:2a:b5;Repetidor wifi;Tp-Link RE330

But the configuration is not showed in lovelace card (I am using Flex Table).

Thanks

jmgutierrezm avatar Sep 17 '24 11:09 jmgutierrezm

does it show unknown device? could you verify if you are using the latest 1.0.7 version?

parvez avatar Sep 18 '24 12:09 parvez

I have updated readme to show how to configure in configuration.yaml. please confirm if the format is similar

parvez avatar Sep 19 '24 08:09 parvez

I have the same problem. I added the integration through HACS, and gave it my network IP range in the config UI when I added the device. That gives me, in a flex table, all the devices on my network. That works perfectly, bit of course they are all "Unknown device".

Now I want to add descriptions for the ones I know, which I am doing through configuration.yaml, although I'll probably move it to an included file for ease of editing one I have it working. The lines in my configuration.yaml are:

network_scanner:
  ip_range: "192.168.86.0/24"
  mac_mapping_1: "B8:31:B5:2F:18:B4;Surface Pro 8;Microsoft"

I wasn't sure if I needed to repeat the ip_range, but I did. And so far I have just one MAC address listed. After a full restart, this one device is still listed as "Unknown Device". I am running 1.0.7 - just installed it today.

I wonder if providing some config through the configuration UI during initial install is stopping it from looking at configuration.yaml? Just a thought. Anyway, it would be good to know what I'm doing wrong!

Thanks, Steve.

steverumsby avatar Sep 19 '24 15:09 steverumsby

Could you try one more thing? Go to settings > devices & services > entities > search for network_scanner and make sure there is only one entity for network_scanner. While developing I was in a weird state as had two entities from different versions. Cleaning them up fixed for me. See if you hav3 similar issue

parvez avatar Sep 19 '24 23:09 parvez

Could you try one more thing? Go to settings > devices & services > entities > search for network_scanner and make sure there is only one entity for network_scanner. While developing I was in a weird state as had two entities from different versions. Cleaning them up fixed for me. See if you hav3 similar issue

I have only one entity. I've only installed the most recent version, just yesterday.

Steve.

steverumsby avatar Sep 20 '24 09:09 steverumsby

I have also the same problem.

Novan007 avatar Sep 20 '24 18:09 Novan007

Ok, here's what's happening. If you first set up the integration through the UI and then customized it through configuration.yaml, you'll need to delete the original configuration from the UI.

Then you'll need to click "Add Entry" and it will populate with the full list of configuration.yaml customizations.

I believe the issue is this integration doesn't generate unique IDs for its platform. So you'll get an error in the log: "Platform network_scanner does not generate unique IDs. ID network_scanner_xxx.xxx.xxx.xxx/24 already exists - ignoring sensor.network_scanner"

dxmnkd316 avatar Sep 20 '24 22:09 dxmnkd316

I have delete the integration I have made in the config file. Then I have deleted the entity en create a new one. Then I have put the mac_mapping_1: the mac adres;device; provider,...mac_mapping_2.... . But I don't find any list in the configuration file. Dies anyone now where is written the list?

Novan007 avatar Sep 23 '24 17:09 Novan007

I have delete the integration I have made in the config file. Then I have deleted the entity en create a new one. Then I have put the mac_mapping_1: the mac adres;device; provider,...mac_mapping_2.... . But I don't find any list in the configuration file. Dies anyone now where is written the list?

Oke is working now. Thank you. First your configuration

network_scanner: ip_range: "192.168.86.0/24" mac_mapping_1: "B8:31:B5:2F:18:B4;Surface Pro 8;Microsoft" mac_mapping_2:" f6:c8:........................."

in the configuration.yaml file then go to settings, devices and delete the entity of the network scanner. then restart the home assistant. Then go to settings,devices and add integrations of the network scanner the mac_mapping have been completed.

Novan007 avatar Oct 02 '24 16:10 Novan007

Could you try one more thing? Go to settings > devices & services > entities > search for network_scanner and make sure there is only one entity for network_scanner. While developing I was in a weird state as had two entities from different versions. Cleaning them up fixed for me. See if you hav3 similar issue

I have only one entity. I've only installed the most recent version, just yesterday.

Steve.

Me too. All my devices have "name: Unknown Device", instead using the name that is in configurarion.yaml.

fcortijos avatar Oct 04 '24 21:10 fcortijos

Good morning, I've looked for Network_scanner via integrations and this is not found. I went ahead and downloaded the network_scanner folder and placed it in to a new folder under config > custom_components and then edited the lines network_scanner:
"configuration.yaml file with the . ;ines network_scanner: ip_range: "192.168.4.0/24" restated Home assistant and get an error, integration for translation: Integration 'network_scanner' not found. 2024-11-14 09:35:26.865 ERROR (MainThread) [homeassistant.setup] Setup failed for 'network_scanner': Integration not found.. I also do not see the integration in the UI. Clearly its a minor error on my side. Any suggestions would be greatly appreciated.

I haveHome assistant loaded directly on to an surface table.

TSBB avatar Nov 14 '24 14:11 TSBB

I'm encountering the same issue, where I've added the integration through the UI at first and added entries to the configuration.yaml but it won't update. I, too, had to delete the integration, restart Home Assistant and then add the integration again - not ideal.

FatalBulletHit avatar Dec 08 '24 20:12 FatalBulletHit

Hello, same problem for me. I finally use the flex table in a pop up card. In the code of the flex table, i compare the mac adress for write the Custom Name like this :

type: custom:flex-table-card
title: Devices
entities:
  include: sensor.network_scanner
sort_by: x.ip+
columns:
  - name: IP Address
    data: devices
    modify: x.ip
  - name: MAC Address
    data: devices
    modify: x.mac
- name: Custom Name
    data: devices
    modify: |-
      if (x.mac == "70:xx:xx:xx:xx:xx")
        "Google"
      else if (x.mac == "B8:xx:xx:xx:xx:xx" )
        "Chaudière"
      else if (x.mac == "58:xx:xx:xx:xx:xx" )
        "Projecteur étoiles"
      else
        "Unknow"
- name: Hostname
    data: devices
    modify: x.hostname
- name: Vendor
    data: devices
    modify: x.vendor

Image

cr4zybilly avatar Apr 23 '25 19:04 cr4zybilly