Skip to content

Increase v6 timeouts and allow changing them#34

Open
ryt51V wants to merge 1 commit intohome-assistant-ecosystem:masterfrom
ryt51V:async-timeout
Open

Increase v6 timeouts and allow changing them#34
ryt51V wants to merge 1 commit intohome-assistant-ecosystem:masterfrom
ryt51V:async-timeout

Conversation

@ryt51V
Copy link

@ryt51V ryt51V commented Aug 23, 2025

Changes

For connections to Pi-hole v6 instances:

  • Allows setting a custom async timeout.
  • Sets the default async timeout to 15 seconds (as opposed to the previous timeouts all individually hardcoded to 5 seconds).

Impact

  • Partially solves HA Integration Pi-Hole Timeout at startup #6, in that it will allow the HA pi_hole component to customise the timeout itself for Pi-hole v6. (Would fully solve if equivalent change made for v5 - or if/when python-hole removes v5 support.)
  • In its default state, will mean the module is much more permissive for Pi-hole v6 instances running on slower hardware.

Notes

I have tested these changes within Home Assistant against a Pi-hole v6 instance running on a Raspberry Pi 1B, which is still technically supported by the Pi-hole project.

Although seemingly trivial, I have not made equivalent changes for v5, as I do not have a Pi-hole v5 instance to test with.

@nicjansma
Copy link

Agreed with this change, makes my RPi 1B work in HA (due to API level checks taking over 5 seconds)

@VincentSC
Copy link

Could it also be possible to add a button "retry", in the cases this is not enough?

@Olen
Copy link
Contributor

Olen commented Nov 26, 2025

I think the HA-integration should raise a ConfigEntryNotReady and HA should automatically retry:

https://developers.home-assistant.io/docs/integration_setup_failures/

The problem seems to be that when the error happens, it seems lika PH is returning "Authentication failed: Invalid password", so it is not possible to differentiate between an actual wrong password and this error.

@VincentSC
Copy link

it seems lika PH is returning "Authentication failed: Invalid password"

If I follow the bug(s) correctly, this is because the initialization has not been finalized before the plugin starts. So GH gives that error, because it probably gets an empty password served.

This is two blind threads trying to collaborate. Increasing the time-out will therefore not be the real solution, as it will come back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants