Pi-hole plugin for Homebridge
- Homebridge - HomeKit support for the impatient
- Pi-hole - A black hole for Internet advertisements
- Install this plugin
npm install -g homebridge-pihole
- Update your configuration file. See sample-config.json in this repository for a sample.
See the Pi-hole installation section for more details.
There are the following options:
name
Required. Accessory name, default is Pi-hole.
auth
Pi-hole auth token.host
Pi-hole host, default islocalhost
.port
Pi-hole port, default is80
.time
How long Pi-hole will be disabled, in seconds, default is 0 that means permanently disabled.logLevel
Logging level, three different levels: 0: logging disabled, 1: logs only HTTP errors, 2: logs each HTTP response. Default is set to 1.
manufacturer
Custom manufacturer, default is Raspberry Pi.model
Custom model, default is Pi-hole.serial-number
Should be a 9 digit number in the string format 123-456-789.
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).
- Login into your Pi-hole Admin Console.
- Navigate to the Settings page and then to the API / Web interface tab.
- 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.
- A new window will open showing a QR code, copy the Raw API Token below the QR code.
- Paste your API token in the homebridge configuration file.