Advice on monitoring internet connectivity in HA

Living in a rural area, South Devon, I am reliant on using a Airband point to point wireless solution for my internet. A fixed POE dish on the outside of my house points to a mast on a hill many miles away. Airband provide a Nokia Beacon 2 Wi-Fi router in the house. I have a admin login for it, but its fairly locked down by the ISP.

Generally its reliable, but we do seem to experience some slowness and potentially micro-outages.

I’m looking for a way to monitor my internet connectivity and graph it in Home Assistant.

As a minimum monitoring and graphing pings to a few DNS servers. Even better, a way to monitor bandwidth/throughput/performance on a regular basis and graph that too. (Without impacting usage)

Any suggestions or simple ideas on how this can be achieved?

I use these two:

How do you manage to use these 2 integrations to see if devices are reachable/online?
Do you make use of yaml to make custom sensors for all the devices/websites/etc?
The documentation does not seem to tell how the custom sensors should look codewise…

I suddenly remembered I had looked at ICMP many months ago, then got waylaid with other things.

Just added a couple more pings and setup a quick dashboard to show the data:

Thats good for ping’s. It would be useful if we could run something that performs a small upload and download once every 5 mins, then provides the speed statistics.

Even better if there was data that could be got from the router, but I haven’t found anything while Googling…

You add them via the GUI.

Use the ping sensor to ping something online. It creates a binary sensor you can use to trigger an automation if it goes to the ‘off’ state.

If you set up the DNSIP sensor without any domain to check it will get your public ip address. It will go to the state unavailable when it can’t reach the internet. You can trigger an automation off that.

Do not run this 24/7. It uses a lot of data.

You’re probably better off watching the ping round trip time.

This, combined with the ping sensors, is probably the best I can hope for at the moment. I did look at a couple of stand-alone network monitoring tools, but too complex and time consuming to setup for what I need right now.

@tom_l - thankyou for the very fast, and useful suggestions :slight_smile:

Here is my updated dashboard for this.

Hey @Blue407 what type of control are you using for the top sections please?

Im trying to replicate this dashboard

The closest I could get is with a History graph Card but it doesn’t seem to let me change the bottom row or add an icon on the right

Hi. These are setup as Uptime cards. Hope this helps.

Thanks

I was able to use that control after a bit of messing around i.e.

type: custom:uptime-card
entity: binary_sensor.192_168_2_1
title_template: Router connectivity
icon: mdi:router-network-wireless
title_adaptive_color: true
average_template: "[[[ return variables.uptime.toFixed(2); ]]]% uptime"
tap_action:
  action: url
  url_path: http://192.168.2.1/
duration:
  quantity: 3
  unit: day

I want to check wifi speed… someone ?

I recently published a Home Assistant App that covers this use case without requiring a separate Docker host, external scripts, or a Home Assistant automation for scheduling:

DigitalHouses Speedtest

It runs the official Ookla Speedtest CLI directly as a Home Assistant App and creates a single MQTT device in Home Assistant.

Main features:

  • scheduled speed tests with a configurable interval;
  • manual speed-test button;
  • download, upload, ping, jitter and packet-loss sensors;
  • independent connectivity checks against 8.8.8.8 and 1.1.1.1;
  • the speed test is skipped when both connectivity targets are unavailable;
  • preferred Ookla server IDs with automatic fallback;
  • nearby-server discovery from Home Assistant;
  • ISP, external IP, selected server, server ID and Ookla result URL;
  • MQTT Discovery, so the device and entities appear automatically;
  • optional Recorder package for history and analysis.

It is currently an initial public release, version 1.0.0, tested on Home Assistant OS with amd64 architecture. MQTT is required.

Installation repository:

Feedback and test reports are welcome.