![Home-Assistant-Network-Device-Status Home-Assistant-Network-Device-Status using fping](https://en.techblog.co.il/wp-content/uploads/2019/02/Home-Assistant-Network-Device-Status-496x381.png)
In this guide i’ll explain how to use fping command to check network devices status (online/offline) and your internet connection status under custom component i have created.
but first, make sure fping is installed on your system using the following command:
sudo apt-get install fping --yes
Now, under your configuration folder create new directory and name it “custom_components”, and inside create another one and name it “sensor”.
Next, create new file and name it “device_status.py” and the result should look like this:
add the following text to “device_status.py”, save it and restart Home-Assistant.
Now we will add the component configuration into configuration.yaml file by adding the following lines of code:
In this example we are using fping and pinging 8.8.8.8 (Google public DNS).
if there will be response it means that the internet connection is up, otherwise your internet connection is down.
Here is another example using Multiple device monitoring:
Good luck!.
Leave a Reply