mirror of
https://github.com/bastienwirtz/homer.git
synced 2026-01-23 02:15:09 +00:00
feat(pihole): Support Pi-hole v6 API with session management (#875)
Add support for Pi-hole v6 API while maintaining v5 compatibility. The component now handles both API versions with proper session-based authentication for v6 and legacy authentication for v5. Includes automated retries, session caching, and proper cleanup. - Add new apiVersion config option (default: 5, accepts: 5,6) - Implement session-based auth with caching for v6 API - Add auto-retry mechanism with configurable attempts - Add periodic status polling for v6 API - Separate v5/v6 API handling logic for better maintenance - Improve error handling and status display - Update documentation with v6 API support details Breaking changes: None. V5 remains default for backward compatibility. V6 mode must be explicitly enabled by setting apiVersion: 6 in config.
This commit is contained in:
parent
1f6e6e7cce
commit
9307f5a926
3 changed files with 179 additions and 18 deletions
|
|
@ -471,10 +471,12 @@ The following configuration is available for the PiHole service.
|
|||
url: "http://192.168.0.151/admin"
|
||||
apikey: "<---insert-api-key-here--->" # optional, needed if web interface is password protected
|
||||
type: "PiHole"
|
||||
apiVersion: 5 # optional, defaults to 5. Use 6 if your PiHole instance uses API v6
|
||||
```
|
||||
|
||||
**Remarks:**
|
||||
If PiHole web interface is password protected, obtain the `apikey` from Settings > API/Web interface > Show API token.
|
||||
- If PiHole web interface is password protected, obtain the `apikey` from Settings > API/Web interface > Show API token.
|
||||
- For PiHole instances using API v6, set `apiVersion: 6` in your configuration. This enables session management and proper authentication handling.
|
||||
|
||||
## Ping
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue