How to Install AdGuard Home Addon in Home Assistant

by Danny
0 comment

READING TIME: 7 MINUTES

In this guide, I’m going to show you how to setup and install AdGuard Home in Home Assistant. This will allow you to use your Home Assistant instance as your AdGuard server.

It’s important to point out that you don’t need to use the AdGuard Addon in Home Assistant to pull your AdGuard Home stats in HA. You can run AdGuard Home in a Docker container in Ubuntu and just plug in your Adguard Home IP and port number into the AGH integration. For purposes of this guide, and for simplicy sake, if you already have Home Assistant up and running, I recommend using the Home Assistant AdGuard Addon which is what I’ll be covering in this tutorial.

Home Assistant should have a static IP or IP reservation before continuing.

Estimated setup time: 15 minutes

Let’s get started!


What is AdGuard Home?

AdGuard Home is a network wide ad blocker. It acts a DNS server that redirects ad and tracking domains to a blackhole, virtually eliminating them from your network. Once configured, you can either add your Home Assistant IP address as a DNS entry manually to each device, or add it to your router to block ads on all devices in your network.

I’ll show you both methods in this article.

AdGuard Home works similarly to PiHole but integrates much better with Home Assistant, so that’s why I’m creating this guide and using AGH instead of the pihole integration.


Step 1: Add Home Assistant Community Add-ons

AdGuard Home isn’t an official addon; it’s a community addon, which means it doesn’t show up by default when you search for it under Supervisor. If you don’t have the Community Addon section added yet, you’ll need to add it.

If you search Supervisor for AdGuard Home and it shows up, then you already have the community addon store and can skip this step.

Add Community Addons

In the Addon Store page, click the 3 dots in the top right corner > Repositories.

Paste in this URL and click Add: https://github.com/hassio-addons/repository

You should now see a huge list of community addons to install, including AdGuard Home.


Step 2: Install AdGuard Home Community Addon

Go to Supervisor > Add-on Store in Home Assistant. In the search box, type “AdGuard Home

Click the addon, and then click Install.

Once installed, toggle on Watchdog and Show In Sidebar for quick access.

Then, Start the addon.


Step 3: Open Web UI

After starting it, click the Open Web UI button to make sure it’s working correctly.

You’ll notice that AdGuard Home is running but isn’t blocking anything yet. This is because we haven’t told any of our computers or devices in our network to start using AGH. This is normal.


Step 4: Test Ad-Blocking on 1 Device

Now that AGH is running properly, it’s time to test it out.

Before you start blocking ads across your whole network, it’s a good idea to block ads on a single device first as a quick test. I’m using my Android phone for this.

First, you’ll need to know your Home Assistant internal IP address. Mine is 192.168.68.124. You will also need to know the IP address of your phone.

Set Static IP on Android devices

  1. Pull down your notification bar until you see your wifi icon.
  2. Click and hold the wifi icon to open your wifi settings.
  3. Click the Gear, and then click the pencil icon. Under the DHCP section, expand it out and set it to Static.
  4. Enter your phone’s IP address, your gateway IP address (your routers’ IP address). Under DNS 1, change it to your Home Assistant IP address (192.168.68.124).
  5. Then click Save.

You will lose internet connection briefly. If it doesn’t automatically connect, you may need to restart the AdGuard Home addon from Supervisor. To test if it’s working, go to nytimes.com or msn.com which is notorious for serving a ton of ads.

Then, click the AdGuard Home sidebar icon in Home Assistant. You should start seeing some stats flow in AGH, like this:


Step 5: Addon Adguard Integration

Next, you should install the AdGuard integration. This will create a few new entities in Home Assistant, including switches to toggle AdGuard on or off, show block stats, and more. This will also allow you to use these entities in automations, such as toggling AGH off during a certain time of day

Configuration > Integrations. AdGuard should be discovered automatically.

Click Configure and then Submit.

Select an area such as your Office on the Success! popup.

You can then click 1 service to view all of the new entities you can add to Lovelace:


Step 6: Block Ads on all network devices

This step is optional. You can configure static IP addresses on each network device manually, or, you can add the Home Assistant (AdGuard) IP into the DNS settings of your router to automatically block ads for all devices.

Before doing this, you should be prepared to exclude certain devices from AGH. For example, my wife likes to click on Instagram ads and doesn’t want her devices to be blocked (I’ll show you how to do this in the next step).

Unfortunately, since all routers are different – I can’t show you exactly how to do this. The procedure for most routers is to log into your router via it’s IP address, open the Advanced settings, and locate the DHCP Server/DNS section. Under Primary DNS, add your Home Assistant IP address. I’m using a TP Link Deco M5 router.

You may need to restart your router or devices for the DNS settings to update across all devices.

Now, all devices, including any newly added devices, will automatically have advertisements blocked!


Step 7: Exclude a Device from AdGuard Home

If there are certain users or devices you’d like to exclude from AdGuard Home, meaning you don’t want to block ads for them, you can create a client exclusion.

Click AdGuard Home in your sidebar. Then click Settings > Client settings.

Click the green Add Client button.

Add the IP address of the device you want to exclude and uncheck Use Global Settings and Block Domains using filters and hosts files.

You will probably need to restart the AdGuard Home addon from Supervisor again after adding this exclusion.


Wrapping Up

Hopefully this guide helps you setup the AdGuard Home Addon in Home Assistant in 2021! It was considerably easier to set it up in HA than a Docker container.

One of the best parts about AGH is I can also block ads when connected to my WireGuard VPN.


My Favorite Home Assistant Devices

Below are some of the Home Assistant-compatible devices I personally use in my home. I highly recommend each of them.

The full list of all Home Assistant compatible & recommended devices I use can be found on my Equipment List page.

0 comment

You may also like

Leave a Comment