• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

arendruni/homebridge-pihole: Pihole switch for Homebridge

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

arendruni/homebridge-pihole

开源软件地址:

https://github.com/arendruni/homebridge-pihole

开源编程语言:

TypeScript 95.3%

开源软件介绍:

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

  • Homebridge - HomeKit support for the impatient
  • Pi-hole - A black hole for Internet advertisements

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:

  • name Required. Accessory name, default is Pi-hole.

Pi-hole Configuration

  • auth Pi-hole auth token.
  • host Pi-hole host, default is localhost.
  • port Pi-hole port, default is 80.
  • ssl If the Pi-hole server should be connected to with SSL.
  • rejectUnauthorized If the HTTPS agent should check the validity of SSL cert, set it to false to allow self-signed certs to work. Default is true.
  • baseDirectory The directory where Pi-hole is found on the server, default is /admin/.
  • time How long Pi-hole will be disabled, in seconds, default is 0 that means permanently disabled.
  • reversed When set to true reverse the status of Pi-hole. When Pi-hole is off the plugin will be set to on and when Pi-hole is on the plugin will be set to off. Default is false.
  • logLevel Logging level, three different levels: 0: logging disabled, 1: logs only HTTP errors, 2: logs each HTTP response. Default is set to 1.

Device Information

  • 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).

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.



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap