home-assistant-ecosystem / python-hole Goto Github PK
View Code? Open in Web Editor NEWPython API for interacting with a *hole instance.
License: MIT License
Python API for interacting with a *hole instance.
License: MIT License
Some users (myself included) are seeing the following error in the HA Log at startup:
Can not load data from *hole: xxxxxxxxxxxxx:80
Within the 'hole' package, the definition of 'async def get_data(self)' includes a hard-code timeout value of 5 seconds, which cannot be overridden from the pi_hole component in HA.
My preference would be to allow the HA pi_hole component to set/override this timeout value, especially since at startup, it may need to be adjusted due to increased resource demands or user hardware limitations.
It should be clarified that this issue doesn't appear to impact hole component usage, but rather just until the following data update (typically 5 min later), so very little impact is caused by this issue for most people.
Personally, I did run into an situation that caused this timeout to not allow a new pi_hole integration to be added to a running HA instance, when trying to add via the older yaml config entry method. Eventually, I had to install via the user interface's config entry method. But, no other reports of this situation have been reported, AFAIK.
I'm willing to work on the PR, if code owner gives thumbs up.
Is there a way to fetch the pi-hole messages and provide them for HA?
The api_db.php
provides an endpoint to retrieve those messages:
I would really love to have these messages available within HA as they might include broken adlists, rate limit warnings, disk usage warnings etc.; all types of messages can be viewed here.
After digging through the source I noticed the the /admin
is hard coded in the URL string.
I put my pi-hole behind Traefik with a piece of middleware so my /admin
is removed from the URL. This way, I access the dashboard via https://dns1.mydomain/
and https://dns2.mydomain/
. I tried integrating both pi-hole's into HA and stumbled upon this issue.
Before trying something (I know some python to make a PR but have no idea how to patch a module which somehow lives inside HA), I open this issue just to check if this will be an acceptable solution. A code example is put here:
I see that verify_tls
is an argument to the constructor of a Hole
object, but cannot determine where its value is utilized or honored.
Can you provide some clarification?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.