Fing network scanner

Regarding vendors, it’s okey if it don’t find it sometimes. I have also a few devices which dont have Vendor and that’s why I added that friendly name so that I know which device is behind some mac address.

Hm in your case I will add both mac address for the same device.

I don’t think that Fing tool is the best one. For me was good enough because I didn’t have any
deal breaker problems.

I’m unfortunately going to remove it again.
it doesn’t work for me. now I get the following message again:

magnetics, [01/08/21 09:04]
:rotating_light: NETWORK ALERT! :rotating_light: Mac: 4C: CC: 6A: FB: 42: E5 changed IP address from IP-OLD: 192.168.1.1 to IP-NEW: 192.168.3.253 FingName: Micro-Star INTL DeviceName: donald.are-eigen.net

This is a static ethernet connection and when I ping to 192.168.1.1 I also get a response and I do a ping to 192.168.3.253 I get no response. it is therefore not correct what fing passes on.

This message also came in, also a static ip address:
magnetics, [01/08/21 11:33]
:rotating_light: NETWORK ALERT! :rotating_light: New Mac: IP: 192.168.2.50 FingName:

And this message is even stranger:
magnetics, [01/08/21 11:33]
:rotating_light: NETWORK ALERT! :rotating_light: New Mac: IP: g FingName:

I am a bit disturbed by all those notifications that I keep getting without there really being anything.
Too bad because I thought it was a very nice solution, but it must work well.

When I have a space in the $fing_name it will divide it to another array iterance and search for
ip=$fing_name
How to avoid that?
Like all my Raspberry Pi your scrip will search for (“empty” MAC and “Pi” for its I.P,) :dizzy_face:
This result of an Grep error and finally not known device then a annoying notifications.

I need to include or remove spaces from Fing output csv with an grep REGEX

Raspberry Pi” have a space in it and cause a new loop for constructing a array of:
empty MAC / and “Pi” for the I.P. grep comparison…
so an empty mac make grep to not correctly work and trigger not found in known and ignored tx file so MQTT alert!!!

Neep to remove space on the Fing output to csv… with awk or something like it…
Sorry, I’m new to linux txt and regex manipulations I do not quite get it

Edit:
Oups! got it !
I’ve forgot the

IFS="

"

before the loop!

1 Like

Where shoud i run those commands if i use HASS in Virtualbox?

You can run this script wherever you want. Only what you need is connectivity towards MQTT server. In my case, I have one Raspberry PI which is used for lot of stuff and on that I also run this script.

In your case, I’m not sure if you can access OS in HASS installation (I’m using docker installation). If you can than, for sure, you can run this in HASS virtual machine. But if you ask me, better solution will be to run it outside of virtual machine so that you dont need to touckle with network settings. This script has to have access to your home network, to be able to scan it and in virtual machine you have to be careful that you scan your home network and not your network inside virtual machine.

not quite understanding this. are you saying that I can or i can’t use API with my Fingbox?
I really hope I am able to since i paid good money for this device and you seem to keep pulling features from and putting into ‘premium’ which I don’t see why i should pay a monthly fee for something I bought and is used solely on my own network.

Welcome to the disgusted club - yes if you want access to the API you have to pay their monthly subscription.

So after paying them for the hardware, they now want you to pay them again on a monthly basis to access the API which is telling you about your own data that they are harvesting and monetising…

Many others are rather annoyed about all this, as can be seen on their forum in the thread you also posted into there. But of course as Fing got taken over a while back by venture capital, this is now all about the $ rather than the users like it used to be.

1 Like

absolute shame. I mean i could technically do most of what i use fing for myself using various linux tools. But just out of laziness and convenience i chose to buy a fingbox. Been waiting for so long for the API stuff so I could use the presence detection stuff within Home Assistant. Just wish it wasn’t so long ago i bought it else it would be on its way back to amazon.

NOT EVERYTHING HAS TO BE A SUBSCRIPTION SERVICE.
(I mean, i get it… i understand things when there is hosted services. SaaS etc. that a monthly/yearly subscription makes sense… just when its a product that is locally hosted on your network with no need for external hosted services… ?! even if it was a one off price, to unlock that functionality, if wouldn’t mind so much.

Corporate greeeeeeeed.

2 Likes

:satellite: Home Assistant Fing API Integration & Network Devices Display

For the people who want to use it (Thank you Mirekmal for pointing at the free API access, I have a fingbox and paid access so I never rechecked). This guide shows how to integrate Fing API with Home Assistant to monitor network devices. The setup includes:

:white_check_mark: Fetching device data using Fing API
:white_check_mark: Storing device information in a sensor
:white_check_mark: Displaying devices dynamically in Lovelace


:one: Setup: Fing API Sensor in configuration.yaml

Add the following REST sensor in your configuration.yaml file:

yaml

CopyEdit

sensor:
  - platform: rest
    name: network_devices
    resource: !secret fing_api_device_url  # Fing API URL stored in secrets.yaml
    value_template: "{{ value_json.networkId }}"  # Use networkId as sensor state
    json_attributes:
      - devices  # Store devices list as an attribute
    scan_interval: 60  # Update every 60 seconds

:small_blue_diamond: Secrets File (secrets.yaml)

To keep your API key private, store it in secrets.yaml:

yaml

CopyEdit

fing_api_device_url: "http://[ip]:[port]/1/devices?auth=[apikey]"  # Replace with your actual URL

:two: Lovelace UI: Display Network Devices in a Dynamic Card

Use the following Lovelace YAML to display network devices dynamically:

yaml

CopyEdit

type: vertical-stack
cards:
  - type: picture
    image: /local/fing_logo.png  # Custom logo

  - type: custom:card-templater
    card:
      type: markdown
      title: ""
      content: |
        ***📡 Network Devices - {{ states("sensor.network_devices") }}***
        {% set devices = state_attr('sensor.network_devices', 'devices') %}
        {% if devices %}
        {% for device in devices %}
        **Name:** {{ device.name | default('N/A') }}  
        **MAC:** {{ device.mac | default('N/A') }}  
        **IP:** {{ device.ip[0] | default('N/A') }}  
        **State:** {{ device.state | default('N/A') }}  
        **Type:** {{ device.type | default('N/A') }}  
        **Make:** {{ device.make | default('N/A') }}  
        **Model:** {{ device.model | default('N/A') }}  
        **First Seen:** {{ device.first_seen | default('N/A') }}  
        **Last Changed:** {{ device.last_changed | default('N/A') }}

        ---
        {% endfor %}
        {% else %}
          No devices found.
        {% endif %}

:small_blue_diamond: Features & Benefits

:heavy_check_mark: Automatic Network Monitoring – Devices update every 60 seconds
:heavy_check_mark: Custom Styling with Icons – Improves readability in Lovelace
:heavy_check_mark: Secure API Integration – API key stored safely in secrets.yaml
:heavy_check_mark: Expandable for More Details – Can be extended with additional attributes

Cheers

1 Like

Since ~2 years API is free for fingbox and application on Windows and Mac. It is only paid if you want to use fing agent on RPi (to be precise agent is paid subscription and API is included).

Ah nice, never checked that, still the API and reference as written works as described above. I changed my post!

arp doesn’t scan the whole network, just the clients the calling PC has connected to.

The way I have it is that the ARP cache will be on every host, but it’s the full table for the network, not per host.

How do you do that?
From my Linux cookbook:

Arp won’t show all devices on the local network, but only those that have had some form of communication with the host computer and have an entry in its ARP table.

I merely stated what my understanding was (“they way I have it”), which obviously was wrong. Spending more time reading up, I also see that the ARP cache is unique per networking interface (not even per host). Perhaps my misunderstanding stems from the fact that where I used the ARP cache, it was the one from my router, which obviously would know about all connected devices on the network.

The fping command will ping everything on your network, and it’s pretty fast:

fping -a -g 192.168.1.0/24 2>/dev/null

The redirect to /dev/null filters out the unconnected responses.
You can add | sort to the end to sort of sort the output.

Infortunately, fping is not installed on HAOS else someone could write an add-on.

1 Like

That’s neat. Very nice.

There are multiple ways (you can also use Nmap Tracker as standard integration to build in HA), I have a fing box for ages (with nac). Personally when I have time I would like to build the The Spinning Cube of Potential Doom The Spinning Cube of Potential Doom never came to it. Maybe somewhere in the future :slight_smile:

Before I go continue with the spnning cube, I went all overboard with two other solutions in the same realm. Stevemann was talking about fping.

I made a table view based on netstat:

And a force-drected graph based on netstat:

Maybe it will help someone