Enable or Disable pi-hole from Alexa

The easiest way to enable or disable ad-blocking from your pi-hole using Alexa is to install fauxmo – with which you can create fake Belkin devices that are Alexa-enabled.

You then configure fauxmo with URLs like this:

# disable for 600 seconds
http://YOUR.PIHOLE.IP/admin/api.php?disable=600&auth=YOUR_AUTH_CODE
# enable
http://YOUR.PIHOLE.IP/admin/api.php?enable&auth=YOUR_AUTH_CODE
# get status
http://YOUR.PIHOLE.IP/admin/api.php?status&auth=YOUR_AUTH_CODE

Get YOUR_AUTH_CODE from the WEBPASSWORD= line in /etc/pihole/setupVars.conf

See example conf at GitHub

Resolving local hosts on Android

Google seem determined to break local name resolution on your home network on your Android phone, redirecting DNS lookups to their servers. Presumably this is partly to prevent solutions like pi-hole making a dent in their ad revenue and tracking.

Easiest way round this is to install DNSChanger and specify your local DNS servers – this works like a fake local VPN and your local hosts will resolve.