An advanced browser-based smart home control interface featuring interactive floor plan visualization and real-time device management capabilities. Built with modern web technologies and seamlessly integrated with Home Assistant.
Smart Home Dashboard revolutionizes smart home control by providing an intuitive, visual approach to device management through customizable floor plans.
- π Interactive floor plan-based device management
- π― Drag-and-drop entity placement interface
- β‘ Real-time device state monitoring and control
- π Secure Home Assistant integration via WebSocket
- π Extensible plugin system with security scanning
- π± Responsive design with theme support
- πΎ Offline configuration persistence
- ποΈ Multi-floor support with zoom capabilities
The dashboard implements a modern, layered architecture:
- Frontend Layer: React-based SPA with TypeScript
- State Management: React Context for efficient state handling
- Communication: WebSocket for real-time Home Assistant integration
- Storage: Browser LocalStorage for configuration persistence
- Plugin System: Dynamic loading with security validation
- Build System: Vite 4.0+
- UI Framework: React 18.0+
- Language: TypeScript 5.0+
- Compiler: SWC 1.3+
- Styling: styled-components 6.0+
- Communication: home-assistant-js-websocket 8.0+
- Testing: Jest 29.0+, React Testing Library 13.0+
- Node.js 16.0+
- npm 8.0+ or yarn 1.22+
- Modern web browser (Chrome 90+, Firefox 90+, Safari 15+)
- Home Assistant instance with WebSocket API enabled
# Clone the repository
git clone https://github.com/yourusername/smart-home-dashboard.git
# Navigate to project directory
cd smart-home-dashboard
# Install dependencies
npm install
# Create environment configuration
cp .env.example .env
# Start development server
npm run dev
- Copy
.env.example
to.env
- Configure Home Assistant connection:
VITE_HA_URL=http://your-ha-instance:8123 VITE_HA_TOKEN=your_long_lived_access_token
- Start the development server:
npm run dev
npm run dev
- Start development servernpm run build
- Build production bundlenpm run test
- Run test suitenpm run lint
- Lint source codenpm run format
- Format source codenpm run analyze
- Analyze bundle size
smart-home-dashboard/
βββ src/
β βββ components/ # React components
β βββ hooks/ # Custom React hooks
β βββ contexts/ # React contexts
β βββ services/ # API services
β βββ utils/ # Utility functions
β βββ types/ # TypeScript definitions
β βββ plugins/ # Plugin system
βββ public/ # Static assets
βββ tests/ # Test files
βββ vite.config.ts # Vite configuration
Plugins extend dashboard functionality through a secure API:
interface DashboardPlugin {
id: string;
version: string;
initialize: () => Promise<void>;
cleanup: () => Promise<void>;
}
- Upload floor plan image (SVG format recommended)
- Configure scale and orientation
- Add multiple floors if needed
- Save configuration
- Select entity from sidebar
- Drag to desired location on floor plan
- Configure entity properties
- Save placement
- Single tap: Toggle device state
- Long press: Open detailed control dialog
- Swipe gestures: Adjust values (brightness, temperature)
- Token-based authentication with Home Assistant
- Secure WebSocket communication (WSS)
- Session management with automatic token refresh
- Local storage encryption for sensitive data
- Secure plugin validation and sandboxing
- Content Security Policy implementation
We welcome contributions! Please see our Contributing Guidelines and Code of Conduct for details.
- Fork the repository
- Create a feature branch
- Implement changes
- Add tests
- Submit pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- π Documentation
- π Issue Tracker
- π¬ Discussions