<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Enable or disable ads with Pi-hole on a Raspberry Pi]]></title><description><![CDATA[<p dir="auto"><a href="https://youtu.be/o9A016LgxXI" rel="nofollow ugc">This video</a> shows how you can say, <strong>Alexa, turn off ads</strong> or <strong>Hey Google, turn on ads</strong> to toggle ads on or off on your network.</p>
<p dir="auto">Use <a href="https://www.triggercmd.com/forum/topic/606/windows-script-to-prep-sd-card-for-raspberry-pi-with-triggercmd-agent">this article</a> to setup your Raspberry Pi if you haven't already.</p>
<p dir="auto">Use the Smart Home <a href="https://www.triggercmd.com/forum/topic/538/using-the-alexa-smart-home-skill-the-first-time">Alexa skill</a> or <a href="https://www.triggercmd.com/forum/topic/579/new-triggercmd-smart-home-google-assistant-action">Google Assistant action</a>.</p>
<p dir="auto">Use a line like this in your /root/.TRIGGERcmdData/commands.json:</p>
<pre><code>{"trigger":"PiHole","command":"/usr/local/bin/pihole_on_off.sh","ground":"background","voice":"ads","allowParams":"true"},
</code></pre>
<p dir="auto">This is the bash script I wrote to /usr/local/bin/pihole_on_off.sh and made it executable with <strong>chmod +x /usr/local/bin/pihole_on_off.sh</strong></p>
<pre><code>#!/bin/bash
case "$1" in
  "off")
    pihole enable
    ;;
  "on")
    pihole disable
    ;;
  *)
    echo "Run this with on or off as the parameter."
    exit 1
    ;;
esac
</code></pre>
<p dir="auto">This page gives a list of pihole commands:|<br />
<a href="https://docs.pi-hole.net/core/pihole-command/" rel="nofollow ugc">https://docs.pi-hole.net/core/pihole-command/</a></p>
]]></description><link>https://www.triggercmd.com/forum/topic/825/enable-or-disable-ads-with-pi-hole-on-a-raspberry-pi</link><generator>RSS for Node</generator><lastBuildDate>Tue, 18 Aug 2026 02:15:34 GMT</lastBuildDate><atom:link href="https://www.triggercmd.com/forum/topic/825.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 13 Aug 2020 00:12:05 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Enable or disable ads with Pi-hole on a Raspberry Pi on Fri, 14 Aug 2020 21:21:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/russ" aria-label="Profile: Russ">@<bdi>Russ</bdi></a> Works now, thanks!</p>
]]></description><link>https://www.triggercmd.com/forum/post/2674</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/2674</guid><dc:creator><![CDATA[Furkan Cevik]]></dc:creator><pubDate>Fri, 14 Aug 2020 21:21:19 GMT</pubDate></item><item><title><![CDATA[Reply to Enable or disable ads with Pi-hole on a Raspberry Pi on Fri, 14 Aug 2020 20:12:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/furkan-cevik" aria-label="Profile: Furkan-Cevik">@<bdi>Furkan-Cevik</bdi></a>, good question.  I should have covered this in the video.  You need to enable one of these:</p>
<ul>
<li><a href="https://www.triggercmd.com/forum/topic/538/using-the-alexa-smart-home-skill-the-first-time">"TRIGGERcmd Smart Home" Alexa skill</a></li>
<li><a href="https://www.triggercmd.com/forum/topic/579/new-triggercmd-smart-home-google-assistant-action">"TRIGGERcmd Smart Home" Google Assistant action</a></li>
</ul>
<p dir="auto">Then your commands become Smart Home switches and you can say, Alexa (or Hey Google), turn on/off ads.</p>
<p dir="auto">Your command will run on your Raspberry Pi with <strong>on</strong> or <strong>off</strong> as the parameter.</p>
]]></description><link>https://www.triggercmd.com/forum/post/2670</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/2670</guid><dc:creator><![CDATA[Russ]]></dc:creator><pubDate>Fri, 14 Aug 2020 20:12:08 GMT</pubDate></item><item><title><![CDATA[Reply to Enable or disable ads with Pi-hole on a Raspberry Pi on Fri, 14 Aug 2020 19:20:01 GMT]]></title><description><![CDATA[<p dir="auto">Hey Russ, so i set up everything like u said.</p>
<p dir="auto">I can run the script like u with  /usr/local/bin/pihole_on_off.sh on/off.</p>
<p dir="auto">I also can enable/disable it on my trigger cmd command management.</p>
<p dir="auto">But how do i do with with my voice? can i change what i need to say? Im confused here lol.</p>
]]></description><link>https://www.triggercmd.com/forum/post/2669</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/2669</guid><dc:creator><![CDATA[Furkan Cevik]]></dc:creator><pubDate>Fri, 14 Aug 2020 19:20:01 GMT</pubDate></item><item><title><![CDATA[Reply to Enable or disable ads with Pi-hole on a Raspberry Pi on Fri, 14 Aug 2020 16:19:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/cutezator" aria-label="Profile: Cutezator">@<bdi>Cutezator</bdi></a>, I kept getting confused but I think I got it right because I'm saying "turn off ads" not "turn off pi hole".  Turning off ads means enabling pi hole.</p>
]]></description><link>https://www.triggercmd.com/forum/post/2661</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/2661</guid><dc:creator><![CDATA[Russ]]></dc:creator><pubDate>Fri, 14 Aug 2020 16:19:45 GMT</pubDate></item><item><title><![CDATA[Reply to Enable or disable ads with Pi-hole on a Raspberry Pi on Fri, 14 Aug 2020 15:40:56 GMT]]></title><description><![CDATA[<p dir="auto">Hello.<br />
Nice hack <img src="https://www.triggercmd.com/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=6297cc46437" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /><br />
I think you inverted the commands, Off should be "pihole disable".</p>
]]></description><link>https://www.triggercmd.com/forum/post/2660</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/2660</guid><dc:creator><![CDATA[Cutezator]]></dc:creator><pubDate>Fri, 14 Aug 2020 15:40:56 GMT</pubDate></item></channel></rss>