arendruni / homebridge-pihole

Pi-hole switch for Homebridge
https://www.npmjs.com/package/homebridge-pihole
MIT License
157 stars 9 forks source link
homebridge homebridge-plugin npm-package pi-hole

Homebridge Pi-hole verified-by-homebridge

npm npm Codacy Badge Build Status MIT license

Pi-hole plugin for Homebridge. This plugin publishes a virtual switch that disables Pi-hole, making it easier to temporarily turn off the ad-blocker. Supports SSL connections and can be configured with a timer to turn Pi-hole back on.

Requirements

Installation

  1. Install this plugin npm install -g homebridge-pihole
  2. Update your configuration file. See sample-config.json in this repository for a sample.

See the Pi-hole installation section for more details.

Configuration

There are the following options:

Pi-hole Configuration

Device Information

See the sample-config.json file to see an example of how to configure the accessory. In the example the configured accessory will disable Pi-hole for a time interval of two minutes (120 seconds).

How to get a Pi-hole authentication token

  1. Login into your Pi-hole Admin Console.
  2. Navigate to the Settings page and then to the API / Web interface tab.
  3. At the bottom of the page click on the Show API Token button, a popup window will ask for confirmation, go ahead and click on Yes, show API token.
  4. A new window will open showing a QR code, copy the Raw API Token below the QR code.
  5. Paste your API token in the homebridge configuration file.