# Disable Pi-Hole for x sec. from Nr Dashboard

**URL:** <https://discourse.nodered.org/t/disable-pi-hole-for-x-sec-from-nr-dashboard/26011>\
**Category:** Share Your Projects\
**Created:** [3 May 2020 19:24 UTC](https://discourse.nodered.org/t/disable-pi-hole-for-x-sec-from-nr-dashboard/26011 "2020-05-03T19:24:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![edje11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edje11/32/572_2.png) [@edje11](https://discourse.nodered.org/u/edje11)\
**Post date:** [3 May 2020 19:24 UTC](https://discourse.nodered.org/t/disable-pi-hole-for-x-sec-from-nr-dashboard/26011/1 "2020-05-03T19:24:14Z")

</div>

[Pi-Hole](https://pi-hole.net/) is a very nice application the removes a huge amount of advertisement from your webpages and other applications.  
Running on a Raspberry pi it's a simple and cheap solution.

But sometimes you want to click on the advertisements after a google search. For this moment you need to disable Pi-hole for a short moment. This disabling is possible from the Pi-hole dashboard, but also from within the Nr-dashboard with this simple flow.

```auto
[{"id":"8210d6d0.3a93c8","type":"http request","z":"93b486a5.9a296","name":"DisableFor5m","method":"PUT","ret":"txt","paytoqs":false,"url":"http://192.168.1.250/admin/api.php?disable=300&auth=a474668aa050ccf1e076f3c796f21f9ab574361e9ff3873a5b3266","tls":"","persist":false,"proxy":"","authType":"","x":580,"y":220,"wires":[["8646d7dc.1bf01"]]},{"id":"21a8d434.ec58f4","type":"ui_button","z":"93b486a5.9a296","name":"","group":"c568498a.6b63f","order":0,"width":"4","height":"2","passthru":false,"label":"{{payload}}","tooltip":"","color":"","bgcolor":"{{backcolor}}","icon":"","payload":"a","payloadType":"str","topic":"","x":370,"y":220,"wires":[["8210d6d0.3a93c8"]]},{"id":"1e7dd7b1.23397","type":"inject","z":"93b486a5.9a296","name":"","topic":"","payload":"","payloadType":"date","repeat":"30","crontab":"","once":true,"onceDelay":0.1,"x":350,"y":320,"wires":[["4747ac1a.e5eec4"]]},{"id":"4747ac1a.e5eec4","type":"http request","z":"93b486a5.9a296","name":"CheckStatus","method":"PUT","ret":"txt","paytoqs":false,"url":"http://192.168.1.250/admin/api.php?status","tls":"","persist":false,"proxy":"","authType":"","x":570,"y":320,"wires":[["16c6b875.611e8"]]},{"id":"16c6b875.611e8","type":"json","z":"93b486a5.9a296","name":"","property":"payload","action":"","pretty":false,"x":770,"y":320,"wires":[["51905b8b.ffe9ac"]]},{"id":"51905b8b.ffe9ac","type":"switch","z":"93b486a5.9a296","name":"","property":"payload.status","propertyType":"msg","rules":[{"t":"eq","v":"disabled","vt":"str"},{"t":"eq","v":"enabled","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":910,"y":320,"wires":[["d3656120.8d202"],["aad3fea3.bd8df8"]]},{"id":"d3656120.8d202","type":"change","z":"93b486a5.9a296","name":"SetOrange","rules":[{"t":"set","p":"backcolor","pt":"msg","to":"orange","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"PiHole Disabled","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1090,"y":300,"wires":[["21a8d434.ec58f4"]]},{"id":"aad3fea3.bd8df8","type":"change","z":"93b486a5.9a296","name":"SetDefault","rules":[{"t":"set","p":"backcolor","pt":"msg","to":"","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"Disable Pihole","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1090,"y":340,"wires":[["21a8d434.ec58f4"]]},{"id":"8646d7dc.1bf01","type":"delay","z":"93b486a5.9a296","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":780,"y":220,"wires":[["4747ac1a.e5eec4"]]},{"id":"8fde4cc9.9ed9c8","type":"comment","z":"93b486a5.9a296","name":"Disable Pi-hole for 5minuts","info":"","x":370,"y":160,"wires":[]},{"id":"c568498a.6b63f","type":"ui_group","z":"","name":"PiHole","tab":"cb1110e8.87fd1","disp":true,"width":"4","collapse":false},{"id":"cb1110e8.87fd1","type":"ui_tab","name":"Tab 1","icon":"dashboard","order":1}]

```

In the HTTP request node you have to change the IP address to you Pi-hole server address. Here you can also change the duration in seconds.  
For the authenticaion you need to fill in your Pi-hole password, you can find it in your **/etc/pihole/setupVars.conf** file.  
Copy the data from the WEBPASSWORD line.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [6 May 2020 08:22 UTC](https://discourse.nodered.org/t/disable-pi-hole-for-x-sec-from-nr-dashboard/26011/2 "2020-05-06T08:22:15Z")

</div>

That could be very useful. Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [2 July 2020 19:24 UTC](https://discourse.nodered.org/t/disable-pi-hole-for-x-sec-from-nr-dashboard/26011/3 "2020-07-02T19:24:15Z")

</div>

This topic was automatically closed after 60 days. New replies are no longer allowed.
