Add wyby sync: proactive PIN provisioning from wyby admin portal
- wyby_client.py: headless login to admin.wyby.ch (OIDC auth-code flow with PKCE, cookie session) + booking extraction from the scheduler API (GetWallpaperData); PIN = last 6 digits of transaction Number; rental days derived from RentingStartDate / AllotmentRentingEndDate (exclusive midnight) - wyby_sync.py: for every upcoming booking ensure Glutz user, group membership and PIN with full-day validity; idempotent, self-healing against wyby's own late interface runs; dry-run default - deploy: wyby-sync.service + 15-min timer (24/7); extend_pins stays hourly as safety net - 39 tests; requests added via uv (available system-wide for the oneshot)
This commit is contained in:
@@ -11,3 +11,15 @@ GLUTZ_PASS=
|
||||
# Optional: Puffer in Minuten, den wyby um Buchungszeiten setzt (Default 15).
|
||||
# Nur ändern, wenn der Anbieter das Fenster der Schnittstelle anpasst.
|
||||
#WYBY_BUFFER_MIN=15
|
||||
|
||||
# wyby admin portal (https://admin.wyby.ch) — Login des Vermieter-Kontos
|
||||
WYBY_USER=
|
||||
WYBY_PASS=
|
||||
# Zuordnung wyby RentalObject-Id-Präfix -> Glutz-Gruppenname (kommagetrennt)
|
||||
WYBY_OBJECT_MAP=
|
||||
# Buchungs-Status-IDs, die synchronisiert werden (Default: bestätigt)
|
||||
WYBY_STATUS_IDS=a198f429-6e7d-4a46-b94f-08164c47e1a0
|
||||
# Glutz ActionProfile für neue Codes (2 = Profil der Buchungscodes)
|
||||
WYBY_ACTION_PROFILE_ID=2
|
||||
# Wie weit in die Zukunft Buchungen geholt werden (Tage)
|
||||
WYBY_HORIZON_DAYS=90
|
||||
|
||||
Reference in New Issue
Block a user