AdGuard Home
Included with Macro DeckTurn AdGuard Home protection on, off or pause it, and show its statistics on your deck.
AdGuard Home widgets in four sizes showing that protection is on, with buttons to pause it
- Pause protection for 5 minutes up to 24 hours, or a custom time
- Toggle protection and filtering with buttons that show the state
- A widget with pause buttons and DNS statistics
- Variables for queries, blocked share and response time
- Add as many AdGuard Home servers as you like
The AdGuard Home integration connects Macro Deck to the web interface of AdGuard Home, so it works with every AdGuard Home that you can open in a browser: on your router, a Raspberry Pi, a home server or a VPS. You can add as many servers as you like, for example one at home and one in the office, and choose the server in every action and widget.
What you can do
- Turn protection on or off, toggle it, or disable it temporarily for 5, 15 or 30 minutes, 1, 2, 8 or 24 hours, or a custom duration of up to 7 days. AdGuard Home turns it back on by itself.
- Turn blocking by filter lists on or off without changing the other protection settings, and download the latest version of every filter list.
- Add the AdGuard Home widget to show the protection status with pause buttons, the statistics, or both.
- Use the variables to show the number of DNS queries, the blocked share or the average response time on any button.
Some example setups:
- A Pause ads button with Disable protection temporarily for 15 minutes, for a site that does not work with blocking.
- A button with Toggle protection that lights up while protection is on.
- An AdGuard Home widget with Controls and statistics that shows the protection status, pause buttons and the number of blocked queries.
How it behaves
Macro Deck asks each server for its status every 5 seconds and for its statistics every 30 seconds. All widgets and variables of a server use the same answers, so adding widgets adds no requests. After an action, the status is read again right away. When a server cannot be reached or rejects the sign-in, its adguard_home_<instance>_is_reachable variable reads false, the other variables read as unavailable and the widget says so instead of showing old numbers. Macro Deck tries again every 30 seconds and updates by itself once the server is back.
What you need
- AdGuard Home whose web interface Macro Deck can reach, for example
http://192.168.1.2:3000. - The user name and password you sign in to AdGuard Home with, if it asks for a sign-in.
- For an
https://address: a certificate your computer trusts, or the Accept a self-signed certificate option.
Set it up
Step 1: Find the address of AdGuard Home
Open the AdGuard Home web interface in a browser and note the address including the port, for example
http://192.168.1.2:3000. If AdGuard Home is behind a reverse proxy under a path, note the path too.Step 2: Open the AdGuard Home integration
In Macro Deck, click Integrations in the sidebar and click AdGuard Home. On the Overview tab, click Add configuration in the Configuration section. Turning on the switch at the top right opens the same dialog, and the integration is turned on once the setup is done.
Step 3: Enter the server details
In the Connect to AdGuard Home dialog, enter:
- Configuration name: how the server is called in actions and widgets, for example
Home. - Address: the address of the web interface, including the port.
- Username and Password: the account you sign in to AdGuard Home with. Leave both empty if AdGuard Home does not ask for a sign-in.
- Accept a self-signed certificate: only for an
https://address whose certificate your computer does not trust.
Click Continue. Macro Deck checks the connection before it saves the configuration.
- Configuration name: how the server is called in actions and widgets, for example
Step 4: Add an action to a button
On the Deck page, click a button. The deck must be unlocked: when the Lock button shows at the top right, it is. The editor opens with Short Press selected. Click + Add action, select AdGuard Home on the left of the Add action dialog, pick Disable protection temporarily, choose the server under Instance and pick a Duration.
Step 5: Press the button
Press the button on your deck. AdGuard Home pauses protection and turns it back on by itself when the time is up.
Step 6: Add the widget
To see the status at a glance, add the AdGuard Home widget to a folder. In its settings, choose the Instance, the View (Protection controls, Statistics or Controls and statistics), the Pause buttons and the Statistics to show.
Actions8
Put these on a button or run them from a flow.
- Enable protection
- Turns protection on, also ending a pause.
- Disable protection
- Turns protection off until you turn it on again.
- Toggle protection
- Turns protection on when it is off, and off when it is on. The button lights up while protection is on.
- Disable protection temporarily
- Turns protection off for a set time of up to 7 days. AdGuard Home turns it back on by itself.
- Enable filtering
- Turns blocking by filter lists on.
- Disable filtering
- Turns blocking by filter lists off. Other protection stays as it is.
- Toggle filtering
- Turns blocking by filter lists on when it is off, and off when it is on.
- Update filter lists
- Downloads the latest version of every blocklist and allowlist.
Variables8
Show these values on buttons and widgets, or use them in conditions.
adguard_home_<instance>_is_reachable- Whether Macro Deck can currently reach the server.
adguard_home_<instance>_protection_enabled- Whether protection is on.
adguard_home_<instance>_protection_disabled_until- When a pause ends, as an ISO 8601 time, or empty.
adguard_home_<instance>_dns_queries,adguard_home_<instance>_blocked_queries- All DNS queries and those blocked by filter lists.
adguard_home_<instance>_blocked_percentage- Blocked queries as a share of all queries, in percent.
adguard_home_<instance>_avg_processing_time- The average response time in milliseconds.
adguard_home_<instance>_safebrowsing_blocked,adguard_home_<instance>_parental_blocked,adguard_home_<instance>_safesearch_enforced- The counts of blocked malware and phishing, blocked adult websites and enforced safe search.
adguard_home_<instance>_version- The AdGuard Home version.
Widgets1
Add these to your deck from the widget picker.
- AdGuard Home
- Shows the protection status and statistics of a server, with buttons to pause protection or turn it back on.
Frequently asked questions
Can I control more than one AdGuard Home?
Yes. Add one configuration per server. Every action and widget has an Instance field, and each server gets its own variables, named after the configuration name it had when you added it.
Does AdGuard Home have to run on the same computer?
No. Macro Deck talks to the web interface over the network, so AdGuard Home can run on a router, a Raspberry Pi or a VPS, as long as Macro Deck can reach its address.
Why does an action fail?
The action shows a message when the server cannot be reached, rejects the sign-in or does not support the request. A server whose sign-in is rejected shows on the Integrations page that it needs to be set up again.
Which time period do the statistics cover?
The period AdGuard Home keeps statistics for, which is 24 hours unless you changed it in AdGuard Home.
Where is my password stored?
The password is stored encrypted on your computer and is never sent to the deck or a browser.
More in Smart home and web
Home Assistant
Included with Macro DeckSwitch lights, run scenes and scripts, and show live states from your Home Assistant on your deck.
RSS feeds
Included with Macro DeckFollow RSS and Atom feeds, show their newest articles in widgets and react when new articles arrive.
HTTP
Included with Macro DeckSend HTTP requests from a button and save values from the response into variables.
Weather
Included with Macro DeckShow the current weather and the forecast for your locations on your deck, without an API key.