Skip to content

Modern iOS app for secure, privacy-focused home automation. Control multiple Vera hubs, manage alarms and devices, and view cameras from multiple Blue Iris systems. Features multi-PIN access, real-time state updates, device control, and a SwiftUI interface.

License

Notifications You must be signed in to change notification settings

keturk/homepanel-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Home Panel App

iOS Swift Xcode License Platform

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.

✨ Key Features

  • πŸ” 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

πŸ“Έ Screenshots

Main Features

Alarm Control

Alarm Control
Multi-mode alarm control with PIN entry and traffic estimates

Automation

Automation
Device and scene control organized by rooms

Cameras

Live Cameras
Multi-camera surveillance with Blue Iris integration

Settings & Configuration

PIN Management

PIN Management
Master PIN and User PIN configuration

Hub Management

Hub Management
Configure Vera and other automation hubs

Device Selection

Device Selection
Select and organize devices by hub and room

Camera Settings

Camera Settings
Configure camera systems and credentials

Destinations

Favorite Destinations
Manage locations for traffic estimates

πŸš€ Quick Start

Prerequisites

  • 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)

Installation

  1. Clone the repository

    git clone <repository-url>
    cd home_panel
  2. Open in Xcode

    open HomePanelApp/HomePanelApp.xcodeproj
  3. Build and run

    • Select your target device or simulator
    • Press ⌘+R to build and run

Initial Configuration

  1. Set Vera Hub IP

    • Open Settings tab
    • Enter your Vera Hub IP address (e.g., 192.168.1.100)
  2. Configure Security

    • Set your 6-digit Master PIN
    • Add User PINs for family members
    • Test alarm mode changes
  3. 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

πŸ—οΈ Architecture

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  β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“š Documentation

The project uses a feature-oriented documentation structure with README files embedded within the codebase:

Code Documentation

Integration & Development

AI Context

User Interface

  • UI Documentation - Complete UI reference covering all screens, dialogs, and navigation flows

πŸ”§ Development

Building

# 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.sh

Testing

The 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 tests

Test Quality:

  • Protocol-based mocking for isolation
  • Async/await test patterns
  • Comprehensive edge case coverage
  • Performance benchmarks included

Code Style

  • Follow Swift naming conventions
  • Use @MainActor for UI-related classes
  • Implement proper error handling
  • Add documentation comments
  • Use async/await for network operations

πŸ›‘οΈ Security

  • 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

πŸ“‹ Requirements

System Requirements

  • iOS 18.2+ (Current: 18.7.1)
  • Xcode 16.4+ (Current: 16.4)
  • Swift 6.0
  • Local network access

Hardware Requirements

  • Vera Hub (for alarm control)
  • Blue Iris, Frigate, or other VMS (for camera surveillance)
  • iPad recommended for optimal experience

🚧 Roadmap

  • 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

🀝 Contributing

We welcome contributions! Please read our Contributing Guidelines for details on:

  • Code style and conventions
  • Pull request process
  • Testing requirements
  • Development workflow

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ“ž Support

For questions and support:


Built with ❀️ using SwiftUI and modern iOS development practices.

About

Modern iOS app for secure, privacy-focused home automation. Control multiple Vera hubs, manage alarms and devices, and view cameras from multiple Blue Iris systems. Features multi-PIN access, real-time state updates, device control, and a SwiftUI interface.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •