Git Product home page Git Product logo

domoticz-pi-hole-plugin's Introduction

Pi-hole Summary

This Domoticz plugin retrieves data from Pi-hole, a black hole for internet advertisements. Also a switch is added to enable/disable Pi-hole on your network.

Prerequisites

You must have Pi-hole installed. See https://pi-hole.net/ for more information.

Description

This plugin is calling the Pi-hole API by using http://<pihole adrress>/admin/api.php?summaryRaw. This will return:

{"domains_being_blocked":106002,"dns_queries_today":9341,"ads_blocked_today":1812,"ads_percentage_today":19.398352,"unique_domains":1387,"queries_forwarded":5522,"queries_cached":1820,"clients_ever_seen":8,"unique_clients":8,"status":"enabled"}

This plugin will create 10 devices. One of them is a switch (if the API Token is filled in) with which you can switch On or Off Pi-hole. The others devices gives you summary data from Pi-hole.

Installation

Python version 3.4 or higher required & Domoticz version 3.87xx or greater. To install:

  • Go in your Domoticz directory using a command line and open the plugins directory.
  • Run: git clone https://github.com/Xorfor/Domoticz-Pi-hole-Plugin.git
  • Restart Domoticz with sudo systemctl restart domoticz.

In the web UI, navigate to the Hardware page. In the hardware dropdown there will be an entry called "Pi-hole summary".

Updating

To update:

  • Go in your Domoticz directory using a command line and open the plugins directory then the Domoticz-Pi-hole-Plugin directory.
  • Run: git pull
  • Restart Domoticz with sudo systemctl restart domoticz.

Parameters

Parameter Value
Pi-hole address eg. pi-hole, or 192.168.1.231
Port default is 80
API Token required to switch on/off Pi-hole
Debug default is False

API Token

The API Token can be found in the Pi-hole web interface:

  1. Goto your Pi-hole web interface, eg. //192.168.1.231/admin/index.php
  2. Login
  3. Goto Settings -> API / Web interface
  4. Click on Show API token

Or from the command line more /etc/pihole/setupVars.conf, and look for the value of WEBPASSWORD.

domoticz-pi-hole-plugin's People

Contributors

slallemand avatar xorfor avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.