A modern iOS home automation application built with SwiftUI for controlling Vera Hub alarm systems and camera surveillance. Features advanced multi-PIN security, real-time state monitoring, and live video streaming from multiple sources.
- π Advanced Security: Multi-PIN system with Master PIN and User PINs
- π¨ Alarm Control: Real-time Vera Hub alarm state management
- πΉ Camera Surveillance: Live video streaming with Blue Iris integration
- π Lockout Protection: Prime number delay system with persistent lockout state
- π Traffic Estimates: Real-time travel time estimates to favorite destinations
- π± Modern UI: SwiftUI with responsive design for iPhone and iPad
- π Local Network: Secure local-only communication
- β Comprehensive Testing: 148+ unit tests covering all core functionality
Alarm Control |
Automation |
Live Cameras |
- Xcode: 16.4+ (Current: 16.4)
- iOS: 18.2+ (Current: 18.7.1)
- Swift: 6.0
- Vera Hub: Connected to your local network
- Camera System: Blue Iris, Frigate, or other VMS (optional)
-
Clone the repository
git clone <repository-url> cd home_panel
-
Open in Xcode
open HomePanelApp/HomePanelApp.xcodeproj
-
Build and run
- Select your target device or simulator
- Press β+R to build and run
-
Set Vera Hub IP
- Open Settings tab
- Enter your Vera Hub IP address (e.g., 192.168.1.100)
-
Configure Security
- Set your 6-digit Master PIN
- Add User PINs for family members
- Test alarm mode changes
-
Camera Features β Production Ready
- Multi-VMS Support: Blue Iris (fully implemented), Frigate, RTSP, MJPEG, Generic Web View (adapter pattern ready)
- Dynamic Camera Management: Up to 2 cameras with user-defined names
- VMS Type Selection: Choose camera system type in settings
- Master PIN Protection: All settings require Master PIN verification
- Real-time Configuration: IP address, port, username, and password management
- Error Handling: User-friendly error messages with retry options
- Pull-to-refresh: Manual refresh capability for camera feeds
- Adapter Pattern: Clean separation between generic interfaces and VMS-specific implementations
Built with modern iOS development practices:
- SwiftUI: Declarative UI framework with modern design patterns
- MVVM: Clean separation of concerns with @MainActor ViewModels
- Dependency Injection: Protocol-based architecture with DependencyContainer
- Async/Await: Modern Swift concurrency with actor-based services
- Keychain: Secure credential storage with iCloud Keychain sync
- Split-View Interface: Modern settings with resizable panes and organized menu system
- Multi-VMS Support: Adapter pattern for camera systems (Blue Iris, Frigate, RTSP, MJPEG)
- Multi-Hub Support: Universal hub abstraction with Vera Hub integration
- Event-Driven Updates: Real-time UI synchronization through Combine publishers
- Actor-Based Architecture: Thread-safe services with modern concurrency patterns
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β SwiftUI Views β β ViewModels β β Services β
β β β β β β
β β’ AlarmTabView βββββΊβ β’ AlarmViewModelβββββΊβ β’ UnifiedAlarm β
β β’ CameraWebView β β β’ CameraVM β β β’ CameraConfig β
β β’ SettingsSplitView β β’ AutomationVM β β β’ HubService β
β β’ DeviceSelection β β β’ SettingsContextβ β β’ KeychainSvc β
β β’ AutomationTabViewβ β β’ PINManagementVMβ β β’ SceneService β
β β’ PINEntryView β β β’ LockoutVM β β β’ LockoutMgr β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β β β
βββββββββββββββββββββββββΌββββββββββββββββββββββββ
β
βββββββββββββββββββ
β Data Models β
β β
β β’ AlarmState β
β β’ PINData β
β β’ Device β
β β’ CameraConfig β
βββββββββββββββββββ
The project uses a feature-oriented documentation structure with README files embedded within the codebase:
- Main App Architecture - Overall app architecture and design patterns
- Features Overview - All app features and capabilities
- Core Infrastructure - Core services and shared models
- Shared Components - Reusable components and utilities
- Settings Management - Split-view settings architecture
- Camera System - Multi-VMS camera management
- Automation System - Device selection and control
- Integration Guides - External API integration and development guides
- Development Tools - Setup, building, testing, and development scripts
- PROJECT_CONTEXT.md - Comprehensive standalone document for AI tools
- UI Documentation - Complete UI reference covering all screens, dialogs, and navigation flows
# Compile check
./scripts/compile_check.sh
# Run all tests
./scripts/run_tests.sh
# Open in Xcode
./scripts/open_xcode.sh
# Check syntax errors
./scripts/check_syntax_errors.shThe app includes 148+ comprehensive unit tests covering all core functionality:
Test Coverage:
- Alarm System (40+ tests): State management, mode changes, PIN validation
- Security (30+ tests): PIN hashing, lockout manager, master PIN operations
- Hub Integration (25+ tests): HubScopedID, device management, scene execution
- Camera System (20+ tests): Configuration, credential storage, VMS adapters
- Data Models (20+ tests): Serialization, validation, business logic
- Utilities (13+ tests): IP validation, destination store, favorite destinations
Running Tests:
# Run all tests via script
./scripts/run_tests.sh
# Or via xcodebuild
xcodebuild test -scheme HomePanelApp -destination 'platform=iOS Simulator,name=iPhone 17'
# Or in Xcode
# Press Cmd+U to run all testsTest Quality:
- Protocol-based mocking for isolation
- Async/await test patterns
- Comprehensive edge case coverage
- Performance benchmarks included
- Follow Swift naming conventions
- Use
@MainActorfor UI-related classes - Implement proper error handling
- Add documentation comments
- Use async/await for network operations
- Local Network Only: No external network communication
- Keychain Storage: All credentials stored securely
- PIN Hashing: Secure PIN storage with salt
- Lockout Protection: Advanced brute force protection with persistent state
- iOS 18.2+ (Current: 18.7.1)
- Xcode 16.4+ (Current: 16.4)
- Swift 6.0
- Local network access
- Vera Hub (for alarm control)
- Blue Iris, Frigate, or other VMS (for camera surveillance)
- iPad recommended for optimal experience
- Alarm System: Complete with advanced security and real-time monitoring
- Camera Surveillance: Multi-VMS support with dynamic camera management
- Automation System: Multi-hub device control with device selection interface
- Hub Integration: Universal hub abstraction with state management
- Settings Management: Split-view interface with organized menu system
- Device Selection: Comprehensive device and scene selection interface
- Recording Controls: Playback and motion detection for cameras
- Push Notifications: Alarm event notifications
- Widgets: Home screen widgets for quick access
- Apple Watch: Companion app for quick control
We welcome contributions! Please read our Contributing Guidelines for details on:
- Code style and conventions
- Pull request process
- Testing requirements
- Development workflow
This project is licensed under the MIT License - see the LICENSE file for details.
For questions and support:
- Check the documentation for detailed guides
- Review known issues
- Open an issue for bugs or feature requests
Built with β€οΈ using SwiftUI and modern iOS development practices.







