PHeonix25 / home-assistant-technitiumdns

This custom integration allows you to integrate TechnetiumDNS with Home Assistant, providing sensors for various DNS statistics.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GitHub branch check runs GitHub commit activity GitHub Issues or Pull Requests GitHub Release GitHub Release

technitiumDNS Integration for Home Assistant

This custom integration allows you to integrate technitiumDNS with Home Assistant, providing sensors for various DNS statistics.

Installation

Manual Installation

  1. Download the repository:
    • Clone the repository or download the ZIP file.
    git clone https://github.com/Amateur-God/home-assistant-technitiumdns.git
  2. Copy to Home Assistant:
    • Copy the custom_components directory into your Home Assistant configuration directory.
    cp -r home-assistant-technitiumdns/custom_components/technitiumdns /path/to/your/home-assistant/config/custom_components/

HACS Installation

  1. Add Custom Repository:

  2. Install the Integration:

    • Find technitiumDNS in HACS and click "Install".

Configuration

  1. Add the Integration:

    • Go to Home Assistant Configuration > Integrations.
    • Click on the "+" button to add a new integration.
    • Search for technitiumDNS and follow the configuration steps.
  2. Configuration via configuration.yaml:

    Add the following to your configuration.yaml:

    technitiumdns:
      api_url: "http://your-technitiumdns-url:technitum-port"
      token: "your-api-token"
      server_name: "your-server-name"
      username: "your-username"
      stats_duration: "LastDay"  # Options are LastHour, LastDay, LastWeek, LastMonth

Usage

This integration provides

Sensors for:

  • Total Queries
  • Blocked Queries
  • Clients
  • Top Clients
  • Top Domains
  • Top Blocked Domains
  • Total No Error
  • Total Server Failure
  • Total NX Domain
  • Total Refused
  • Total Authoritative
  • Total Recursive
  • Total Cached
  • Total Dropped
  • Zones
  • Cached Entries
  • Allowed Zones
  • Blocked Zones
  • Allow List Zones
  • Block List Zones
  • Update Available

Switches for:

  • Enable/disable Ad Blocking (will check current ad blocking state on initialization and set the switch to the correct position)

Buttons for:

  • Temporarily disable ad blocking for:
    • 5 mins
    • 10 mins
    • 30 mins
    • 60 mins
    • 1 day

Contributing

If you want to contribute to this project, feel free to fork the repository and submit a pull request. Issues and feature requests are also welcome.

License

This project is licensed under the GPL 3.0 License. See the LICENSE file for details.

Disclaimer

The non-English translations for this integration were generated by ChatGPT and may not be perfectly accurate. If you find any errors or improvements, please feel free to contribute.

About

This custom integration allows you to integrate TechnetiumDNS with Home Assistant, providing sensors for various DNS statistics.

License:GNU General Public License v3.0


Languages

Language:Python 100.0%