Add HAOS-Server sync for optional centralized management (Phase 5)
Some checks failed
Validate / Hassfest (push) Has been cancelled
Some checks failed
Validate / Hassfest (push) Has been cancelled
Enable the HAOS integration to optionally connect to the standalone Immich Watcher server for config sync and event reporting. Server-side: - New /api/sync/* endpoints: GET trackers, POST template render, POST event report - API key auth via X-API-Key header (accepts JWT access tokens) Integration-side: - New sync.py: ServerSyncClient with graceful error handling (all methods return defaults on connection failure) - Options flow: optional server_url and server_api_key fields with connection validation - Coordinator: fire-and-forget event reporting to server when album changes are detected - Translations: en.json and ru.json updated with new fields The connection is fully additive -- the integration works identically without a server URL configured. Server failures never break HA. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -21,6 +21,7 @@ from .api.templates import router as templates_router
|
||||
from .api.targets import router as targets_router
|
||||
from .api.users import router as users_router
|
||||
from .api.status import router as status_router
|
||||
from .api.sync import router as sync_router
|
||||
|
||||
logging.basicConfig(
|
||||
level=logging.DEBUG if settings.debug else logging.INFO,
|
||||
@@ -69,6 +70,7 @@ app.include_router(templates_router)
|
||||
app.include_router(targets_router)
|
||||
app.include_router(users_router)
|
||||
app.include_router(status_router)
|
||||
app.include_router(sync_router)
|
||||
|
||||
# Serve frontend static files if available
|
||||
_frontend_dist = Path(__file__).parent / "frontend"
|
||||
|
||||
Reference in New Issue
Block a user