-
Notifications
You must be signed in to change notification settings - Fork 407
Feature: Kiosk Mode (3/7) - Screensaver Views #4199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Part 1 of Kiosk Mode implementation. This PR adds the foundation for Kiosk Mode: ## KioskSettings.swift - Complete settings model with all configuration options - Codable for persistence - Includes enums for screensaver modes, clock styles, photo sources, etc. - Entity trigger configurations - Dashboard rotation settings ## KioskConstants.swift - Centralized constants for animations, timing, notifications - Notification names for kiosk events ## Utilities - IconMapper: Converts MDI icons to SF Symbols - TouchFeedbackManager: Haptic and audio feedback - AnimationUtilities: Shared animation helpers These types form the foundation that subsequent PRs will build upon.
Part 2 of Kiosk Mode implementation. Depends on PR home-assistant#4197. ## KioskModeManager (~970 lines) Central coordinator for all kiosk functionality: - Enable/disable kiosk mode - Screen state management (on, dimmed, screensaver) - Brightness control with day/night scheduling - Idle timer and activity tracking - Dashboard navigation - Entity trigger subscriptions - HA WebSocket integration ## Security (~760 lines) - SecurityManager: PIN and biometric authentication - SettingsManager: Settings persistence ## Dashboard (~360 lines) - DashboardManager: Dashboard rotation and scheduling ## Camera Detection (~320 lines) - CameraDetectionManager: Motion and presence detection using front camera ## App Launcher (~360 lines) - AppLauncherManager: Launch external apps, return handling ## WebViewController Integration (~565 lines) - WebViewController+Kiosk: Kiosk overlay management - Modified WebViewController: Made properties internal for kiosk access
Part 3 of Kiosk Mode implementation. Depends on PRs home-assistant#4197 and home-assistant#4198. Adds screensaver functionality with multiple display modes: Files added (~52K): - ClockScreensaverView.swift: Clock display with multiple styles (large, minimal, digital, analog) - CustomURLScreensaverView.swift: Display custom HA dashboard as screensaver - EntityStateProvider.swift: Fetches and formats entity states for display - PhotoManager.swift: Manages photo loading from device, iCloud, and HA media - PhotoScreensaverView.swift: Photo slideshow with transitions - ScreensaverViewController.swift: UIKit controller coordinating screensaver presentation Features: - Multiple screensaver modes: clock, photos, dim, blank, custom URL - Clock styles: large, minimal, digital, analog with entity display - Photo sources: device albums, iCloud, Home Assistant media - Pixel shift for burn-in prevention - Day/night brightness scheduling
Part 4 of Kiosk Mode implementation. Depends on PRs home-assistant#4197, home-assistant#4198, home-assistant#4199. Adds navigation lockdown and overlay UI components: Files added (~39K): - EdgeProtectionView.swift: Invisible edge barriers preventing swipe gestures - QuickActionsView.swift: Quick launch panel for third-party apps - SecretExitGestureView.swift: Hidden gesture sequence to exit kiosk mode - StatusOverlayView.swift: Connection status, battery, and time display Features: - Edge protection blocks iOS system gestures (Control Center, notifications) - Configurable secret tap pattern for secure kiosk exit - Quick actions panel with app shortcuts - Status bar overlay with connection indicator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds screensaver display modes and photo management as part 3 of a 7-part kiosk mode feature. It introduces multiple screensaver modes (clock, photos, custom URL, dim, blank) with various display styles, photo slideshow functionality from multiple sources (local, iCloud, Home Assistant media), and integration with the main WebViewController through a comprehensive extension. The changes include ~1,700 lines across screensaver views, photo management, entity state providers, and supporting utilities for animations, feedback, and security.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| WebViewController.swift | Changed private properties to internal for kiosk mode access; added screensaver integration hooks |
| WebViewController+Kiosk.swift | New comprehensive extension integrating kiosk mode with WebViewController |
| TouchFeedbackManager.swift | New utility for haptic and sound feedback |
| IconMapper.swift | New utility mapping Material Design Icons to SF Symbols |
| AnimationUtilities.swift | New utility providing consistent animation definitions |
| SettingsManager.swift | New manager for settings import/export functionality |
| SecurityManager.swift | New manager for biometric authentication and security features |
| ScreensaverViewController.swift | New controller managing screensaver view lifecycle |
| PhotoScreensaverView.swift | New SwiftUI view for photo slideshow screensaver |
| PhotoManager.swift | New manager handling photo loading from multiple sources |
| EntityStateProvider.swift | New provider for real-time Home Assistant entity states |
| CustomURLScreensaverView.swift | New view displaying custom URL content in WebView |
| ClockScreensaverView.swift | New view displaying clock with multiple styles and entity data |
| KioskSettings.swift | New comprehensive settings model (794 lines) |
| KioskModeManager.swift | New central manager coordinating kiosk functionality (972 lines) |
| KioskConstants.swift | New constants file for consistent values |
| DashboardManager.swift | New manager for dashboard rotation and scheduling |
| CameraDetectionManager.swift | New manager for camera-based motion/presence detection |
| AppLauncherManager.swift | New manager for external app launching |
| project.pbxproj | Xcode project file updates adding new source files |
- Renamed isEnabled to isKioskModeEnabled for clarity - Removed exitPIN (using device-based authentication only) - Changed allowDevicePasscodeExit default to true Co-Authored-By: Claude Opus 4.5 <[email protected]>
|
All review feedback has been addressed:
Ready for re-review. 🙏 |
|
Closing to restructure the PR series. See #4197 for details. |
Summary
Part 3 of 7 - Screensaver display modes and photo management.
Files Added (~1,700 lines)
ClockScreensaverView.swiftCustomURLScreensaverView.swiftEntityStateProvider.swiftPhotoManager.swiftPhotoScreensaverView.swiftScreensaverViewController.swiftScreensaver Modes
Clock Styles
Photo Sources
Test Plan
PR Series
🤖 Generated with Claude Code