home-assistant-ecosystem / python-hole

Python API for interacting with a *hole instance.
MIT License
9 stars 14 forks source link

HA Integration Pi-Hole Timeout at startup #6

Open rocket4321 opened 3 years ago

rocket4321 commented 3 years ago

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.

rocket4321 commented 3 years ago

Would it be helpful if I create a PR for code review?

lindsaymarkward commented 3 years ago

Thank you for starting this @rocket4321 . I would like the error to go away, so I hope this can be done!

Coolie1101 commented 3 years ago

Has this ever been resolved?, I have been following all the threads on this issue, still have the log entry.

viktak commented 2 years ago

Still happening on 2022.4.6

rjbudke commented 2 years ago

Still happening on 2022.6.1