I’m a student doing a project about creating a dashboard interface to display on a big screen. A idea was to add a ping element to the dashboard. Every 5 minutes a ping to 8.8.8.8 to check the connection with the internet. When it has checked the connection and is has succeed, it would get a green light on the dashboard, or red when it has failed to get a response.
I am trying to replicate what you did but am having issues. The card shows NaN and I am not sure the system is even pinging or returning the latency values.
I configured the ping per the official instructions and rebooted the system:
I noticed your YAML referenced a ‘sensor’ instead of ‘binary_sensor’ so I am hoping you could help me a bit further.
I am having quite a few networking issues thanks to beta Unifi (networking equipment) firmware so I am hoping this card will help me eliminate networking issues when having HASS issues.
@parautenbach The instructions you referenced are the ones I used. I see it talks about attributes and I believe I need to use templates to use them but being only 1 month into HASS, I am not sure I fully understand how to do that yet.
You’re half way there. The binary sensor has an attribute for round trip time (have a look at it in Developer Tools / States). Unfortunately the mini-graph card can’t use attributes, so we need to make a template sensor:
Not sure why the Max is 39.88ms given a recursive ping to 8.8.8.8 pretty much never deviates from 8ms. Anyhow, we’ll see what it says after a longer run period.
If you click on the graph it will give you a more detailed view in the pop-up. You can expand the pop-up horizontally by clicking on the pop-up title too.
I guess the latency discrepancy between my PC and the RPI4 is due to load, power, etc. It is only 1 or 2ms but still surprising given both are currently under very low load.
Is it also possible to ping other ip adresses. Like for example. We have multiple Active Directories running in our school production environment, we want to show the connectivity between these, whether they’re online or not online. Just a simple reply like the 8.8.8.8 is enough.
The binary sensor configuration is correct. The template sensor configuration is not. template: needs to be hard up against the margin. If you had posted the text I could have copied and pasted it and shown you. I can’t do that with an image.