A modern, full-stack smart home control system built with React.js and Node.js for managing and monitoring Philips Hue lights, TP-Link Kasa devices, LIFX bulbs, Wyze devices, Xiaomi miIO devices, Eero mesh networks, Sonos speakers/amps, Apple TVs, Samsung Smart TVs, LG webOS Smart TVs, Ring doorbells, security cameras, and more.
- π± Modern UI: Sleek, responsive interface with Material-UI and Framer Motion animations
- π Real-time Updates: WebSocket connection for live device status updates
- π Device Discovery: Automatic network scanning using SSDP and mDNS/Bonjour
- Smart device detection with IPv4 preference over IPv6
- MAC address extraction for unique device identification
- Automatic deduplication to prevent multiple entries
- 15-second timeout for reliable Apple TV/AirPlay discovery
- iOS device detection via companion-link mDNS service
- πΉ IP Camera Integration: Full support for IP cameras with multiple stream types
- Generic camera proxy for any IP camera
- Multiple stream formats: Desktop (livesp.asp), Mobile (livemb.asp), MJPEG, Snapshot
- Stream type selector in camera viewer and device details
- Auto-detection of Hi3510-based cameras
- HTTP proxy to handle camera authentication
- π‘ Philips Hue Control: Full control of Hue lights, groups, rooms, and scenes
- π TP-Link Kasa: Control smart plugs, bulbs, and light strips with energy monitoring
- π‘ LIFX Control: Direct local control of LIFX smart bulbs and strips
- π± Wyze Devices: Control Wyze cameras, bulbs, plugs, sensors, and thermostats
- π€ Xiaomi miIO: Control Roborock robot vacuums and Xiaomi air purifiers
- π΅ Sonos Control: Play/pause, volume, track navigation for Sonos speakers and amps
- πΊ TV Control: Remote control for Samsung Smart TVs, LG webOS TVs, and Apple TVs
- Preserves custom device names (Living Room, Game Room, etc.)
- Filters out Mac computers from Apple TV list
- Detects Mac devices separately with 'mac' type classification
- Samsung TV AirPlay support via pyatv
- π Ring Integration: Monitor Ring doorbells and cameras
- π SmartThings Integration: Link SmartThings account for Nest thermostats and devices
- Token-based authentication via request headers
- Google Nest redirect to SmartThings (Nest requires SmartThings linking)
- π± iOS Device Detection: Discover iPhones and iPads on your network
- π Network Monitoring: Eero mesh network status and connected devices
- π Subnet Scanner: Angry IP Scanner-like port scanning and device identification
- π Smart Sidebar: Accurate device counts by type with intelligent filtering
- π¨ Beautiful Design: Gradient backgrounds, glass morphism effects, and smooth transitions
- π¦ Collapsible Sections: Quick Actions and Scenes start collapsed for cleaner UI
Before you begin, ensure you have the following installed:
- Node.js (v16 or higher) - Download here
- npm (comes with Node.js)
- Python 3 (for Apple TV control via pyatv)
- Git (optional, for version control)
cd c:\Users\jerry\Desktop\SmartHouse2524Install both server and client dependencies:
npm run install-allOr install them separately:
# Install server dependencies
npm install
# Install client dependencies
cd client
npm install
cd ..Create a .env file in the root directory:
cp .env.example .envEdit the .env file with your credentials:
# Server Configuration
PORT=5000
NODE_ENV=development
# Eero Configuration (Note: Requires unofficial API)
EERO_EMAIL=your_eero_email@example.com
EERO_PASSWORD=your_eero_password
# Ring Configuration
RING_EMAIL=your_ring_email@example.com
RING_PASSWORD=your_ring_password
# Wyze Configuration
WYZE_EMAIL=your_wyze_email@example.com
WYZE_PASSWORD=your_wyze_password
# Apple TV Configuration
APPLE_TV_IPS=192.168.1.100,192.168.1.101
# Camera Configuration (RTSP/HTTP URLs)
CAMERA_URLS=rtsp://admin:password@192.168.1.50:554/stream1
# Network Configuration
LOCAL_NETWORK_SUBNET=192.168.1.0/24
DISCOVERY_TIMEOUT=15000For Apple TV control, install pyatv:
pip install pyatvPair your Apple TV:
atvremote --id YOUR_APPLE_TV_IP pairStart both the backend server and React frontend:
npm startThis will:
- Start the Express server on
http://localhost:5000 - Start the React dev server on
http://localhost:3000 - Open your browser automatically
Backend only:
npm run serverFrontend only:
npm run clientBuild the React frontend for production:
npm run buildStatus:
Eero doesn't provide a public API. You'll need to:
- Use a community library like
eero-client(Node.js) - Configure email and password in
.env - Handle session management and 2FA if enabled
What You Can Control:
- View network status
- See connected devices
- Monitor internet speed
- View Eero device locations
Status: β Ready to use
Sonos devices are discovered automatically on your local network using UPnP.
Required:
- Sonos devices on the same network
- No credentials needed
What You Can Control:
- Play/Pause/Stop/Skip tracks
- Volume control with real-time slider
- View current track information with album art
- Progress bar with position/duration
- Favorites playback
- Multi-room zone support
Features:
- Now Playing / Last Played: Shows current or last played track even when stopped
- Bonded Device Detection: Subs and Boosts marked as bonded
- Auto-refresh: Live status updates every 3 seconds
- Speaker List: Shows model, state chips, and color-coded status
API Endpoints:
GET /api/sonos/discover- Discover Sonos devices (with state, model, bonded flag)GET /api/sonos/:ip/status- Full status with track info, device detailsGET /api/sonos/:ip/position- Get track position/durationPOST /api/sonos/:ip/play- Start playbackPOST /api/sonos/:ip/pause- Pause playbackPOST /api/sonos/:ip/stop- Stop playbackPOST /api/sonos/:ip/next- Next trackPOST /api/sonos/:ip/previous- Previous trackPOST /api/sonos/:ip/volume- Set volume (body:{ level: 0-100 })GET /api/sonos/:ip/favorites- Get favorites listPOST /api/sonos/:ip/favorite/:id- Play a favoriteGET /api/sonos/zones/all- Get all zone/group information
Status:
Apple TV control requires the pyatv Python library.
Required:
- Install pyatv:
pip install pyatv - Find your Apple TV IP address
- Pair device:
atvremote --id YOUR_IP pair - Add IP addresses to
.envfile
What You Can Control:
- Navigation (up, down, left, right, select)
- Play/Pause
- Home/Menu buttons
- App launching
Commands:
# Discover Apple TVs
atvremote scan
# Pair with Apple TV
atvremote --id YOUR_IP pair
# Test connection
atvremote --id YOUR_IP playingStatus: β Ready to use
Samsung TVs are discovered via SSDP/UPnP.
Required:
- Samsung Smart TV (2016 or newer)
- TV and server on same network
- First connection requires accepting prompt on TV
What You Can Control:
- Power on/off
- Volume up/down/mute
- Launch apps (Netflix, YouTube, etc.)
- Navigation
Common App IDs:
- Netflix:
11101200001 - YouTube:
111299001912 - Prime Video:
3201512006785 - Disney+:
3201901017640
API Endpoints:
GET /api/samsung/discover- Discover Samsung TVsGET /api/samsung/:ip/status- Get TV statusPOST /api/samsung/:ip/key- Send remote keyPOST /api/samsung/:ip/app- Launch appGET /api/samsung/:ip/apps- Get installed apps
Status:
Required:
- Ring account email and password
- Handle 2FA if enabled
- Configure credentials in
.env
What You Can Control:
- View live streams
- Access doorbell events
- Toggle motion detection
- View battery levels
- Access recorded videos
Setup:
RING_EMAIL=your_email@example.com
RING_PASSWORD=your_passwordNote: First connection may require 2FA verification.
API Endpoints:
GET /api/ring/devices- Get all Ring devicesGET /api/ring/doorbell/:id/events- Get doorbell eventsGET /api/ring/camera/:id/stream- Get stream URLPOST /api/ring/camera/:id/motion- Toggle motion detection
Status: β Ready to use
Supports RTSP and HTTP camera streams.
Required:
- Camera IP addresses
- RTSP or HTTP stream URLs
- Username/password (if required)
Setup:
CAMERA_URLS=rtsp://admin:password@192.168.1.50:554/stream1,rtsp://admin:password@192.168.1.51:554/stream2
CAMERA_USERNAME=admin
CAMERA_PASSWORD=your_passwordCommon RTSP Formats:
- Generic:
rtsp://username:password@ip:554/stream1 - Hikvision:
rtsp://username:password@ip:554/Streaming/Channels/101 - Dahua:
rtsp://username:password@ip:554/cam/realmonitor?channel=1&subtype=0 - Amcrest:
rtsp://username:password@ip:554/cam/realmonitor?channel=1&subtype=1
What You Can Do:
- Add/remove cameras
- View live streams
- Capture snapshots
- PTZ control (if supported)
API Endpoints:
GET /api/cameras- Get all camerasGET /api/cameras/:id/stream- Get stream URLGET /api/cameras/:id/snapshot- Get snapshotPOST /api/cameras/:id/ptz- PTZ controlPOST /api/cameras- Add new cameraDELETE /api/cameras/:id- Remove camera
Status:
Control your GE smart appliances including refrigerators, ovens, dishwashers, and laundry machines.
Required:
- GE SmartHQ account (create in GE SmartHQ mobile app)
- GE appliances registered in the app
- Configure credentials in
.env
What You Can Control:
- Refrigerators: Set fridge/freezer temperature, turbo cooling, ice maker control
- Ovens: Remote preheat, temperature control
- Dishwashers: Monitor status and cycles
- Laundry: Monitor washers and dryers
Setup:
GE_USERNAME=your_email@example.com
GE_PASSWORD=your_passwordSupported Models:
- GE Profile Refrigerators
- GE Cafe Refrigerators
- GE Smart Ovens & Ranges
- GE Dishwashers
- GE Washers & Dryers
Temperature Ranges:
- Fridge: 33Β°F to 42Β°F (recommended: 37Β°F)
- Freezer: -6Β°F to 6Β°F (recommended: 0Β°F)
API Endpoints:
GET /api/ge-appliances/refrigerators- Get all refrigeratorsPOST /api/ge-appliances/refrigerators/:id/temperature- Set temperaturePOST /api/ge-appliances/refrigerators/:id/icemaker- Control ice makerPOST /api/ge-appliances/refrigerators/:id/turbo- Enable turbo coolingGET /api/ge-appliances/ovens- Get all ovensPOST /api/ge-appliances/ovens/:id/control- Control oven
Status:
Control Samsung Family Hub refrigerators and other SmartThings-connected appliances.
Required:
- Samsung SmartThings account
- Appliances added to SmartThings app
- Personal Access Token from SmartThings Developer Portal
What You Can Control:
- Refrigerators: Monitor temperature, door status
- Ovens: Monitor cooking status
- Laundry: Monitor wash/dry cycles
Setup:
SAMSUNG_SMARTTHINGS_TOKEN=your_personal_access_tokenGetting Your Token:
- Go to https://account.smartthings.com/tokens
- Sign in with Samsung account
- Click "Generate new token"
- Select "Devices" permissions (read/write)
- Copy and save the token
Supported Appliances:
- Samsung Family Hub Refrigerators
- Samsung Smart Refrigerators
- Samsung Smart Ovens
- Samsung Smart Washers & Dryers
API Endpoints:
GET /api/samsung-appliances/refrigerators- Get all refrigeratorsPOST /api/samsung-appliances/refrigerators/:id/temperature- Set temperatureGET /api/samsung-appliances/devices- Get all devicesPOST /api/samsung-appliances/devices/:id/command- Execute command
Discover All Devices
POST /api/devices/discover
Get All Devices
GET /api/devices
Search Devices
GET /api/devices/search/:query
Get Device Details
GET /api/devices/:id
Remove Device
DELETE /api/devices/:id
Connect to ws://localhost:5000 for real-time updates:
const ws = new WebSocket('ws://localhost:5000');
ws.onmessage = (event) => {
const data = JSON.parse(event.data);
// Handle: device_discovered, device_updated, etc.
};- Responsive Design: Works on desktop, tablet, and mobile
- Dark Theme: Easy on the eyes with customizable Material-UI theme
- Gradient Backgrounds: Modern purple/blue gradients throughout
- Glass Morphism: Frosted glass effects on cards and panels
- Smooth Animations: Framer Motion for fluid transitions
- Real-time Status: Live WebSocket updates with connection indicator
- Sidebar Navigation: Easy access to all device categories
- Search & Filter: Quick device search functionality
SmartHouse2524/
βββ client/ # React frontend
β βββ public/
β βββ src/
β βββ components/ # Reusable components
β β βββ Navbar.js
β β βββ Sidebar.js
β β βββ DeviceCard.js
β βββ pages/ # Page components
β β βββ Dashboard.js
β β βββ SonosPage.js
β β βββ AppleTVPage.js
β β βββ SamsungPage.js
β β βββ RingPage.js
β β βββ CamerasPage.js
β β βββ EeroPage.js
β β βββ DeviceDetails.js
β βββ App.js
β βββ index.js
βββ server/ # Node.js backend
β βββ routes/ # API routes
β β βββ devices.js
β β βββ sonos.js
β β βββ appletv.js
β β βββ samsung.js
β β βββ ring.js
β β βββ cameras.js
β β βββ eero.js
β βββ services/ # Business logic
β β βββ deviceDiscovery.js
β βββ data/ # Stored device data
β βββ index.js # Express server
βββ .env # Environment variables
βββ .env.example # Example environment file
βββ package.json # Server dependencies
βββ README.md # This file
- Check Network: Ensure all devices are on the same network as the server
- Firewall: Disable firewall temporarily to test
- Multicast: Enable multicast/UPnP on your router
- Wait Time: Discovery can take 10-15 seconds
- Accept Prompt: First connection requires accepting on TV
- Token: Save the token from first connection
- Port: Ensure port 8002 is accessible
- Credentials: Double-check email/password in
.env - 2FA: Handle two-factor authentication
- API Access: These require unofficial APIs which may change
- RTSP Support: Web browsers don't natively support RTSP
- Convert: Use ffmpeg to convert RTSP to HLS or WebRTC
- VLC: Test stream URLs in VLC first
Added a Cloud Accounts Panel (accessible via sidebar icon) for linking cloud-based smart home services:
Supported Cloud Providers:
- Amazon Alexa - Control Echo devices and Alexa-enabled accessories
- Google Home - Manage Chromecast, Nest Hub, and Google Assistant devices
- Ring - Access Ring doorbells, cameras, and security systems
- Nest - Control Nest thermostats, cameras, and smoke detectors
- Samsung SmartThings - Unified hub for Samsung and third-party devices
- Apple HomeKit - iOS/macOS smart home ecosystem
- Tuya Smart - Control Tuya-based white-label smart devices
- Home Assistant - Local home automation platform integration
- Hubitat - Local-first smart home hub
- IFTTT - Automation triggers and actions
Features:
- One-click sign-in with provider branding and logos
- Secure credential storage with encryption
- Automatic token refresh for OAuth-based services
- Visual connection status indicators
- Quick-link buttons on device pages requiring authentication
Pages with Account Requirement:
- AlexaPage - Requires Amazon account
- RingPage - Requires Ring account
- GoogleHomePage - Requires Google account (with local discovery fallback)
- SmartThingsPage - Requires Samsung SmartThings account
Added a Test API button to all device pages that allows developers to:
- Test backend API endpoints directly from the UI
- View raw JSON responses with syntax highlighting
- Debug device connectivity and API responses
- See timestamps for when APIs were last called
Pages with Test API: AlexaPage, AppleTVPage, DeviceDetails, EeroPage, EpsonPage, HuePage, LGPage, LIFXPage, NanoleafPage, RingPage, SamsungPage, SmartThingsPage, SonosPage, TpLinkPage, WemoPage
- Now Playing / Last Played: Shows "π΅ Now Playing" when a speaker is active, "βΈοΈ Last Played" when stopped (keeps showing last track info)
- Bonded Device Detection: Sonos Subs and Boosts are now marked as "π Bonded" in the speaker list
- Enhanced Speaker List: Shows model name, playing state chip, and color-coded avatars
- Real-time Status: Auto-refresh for live playback updates, progress bar, album art
- Sidebar navigation menu now sorts by device count (most devices to least)
- Dashboard stays at top, device categories are sorted dynamically
- Each menu item shows accurate device count for its category
- Device type matching improved for accurate counts
- Fixed WeMo API 404 error in DeviceDetails (now uses
/api/wemo/status/allwith filtering) - Fixed SmartThingsPage.js
handleTestApiundefined error - Removed hardcoded localhost IPs - WebSocket URLs now dynamic
- Added missing device type mappings for sidebar counts
- Added
/api/appletv/:ip/statusendpoint for device info - Uses
pyatvPython package for discovery and status - Shows device name, model, MAC address, and playing status
- Friendly names displayed instead of raw device identifiers
- Added comprehensive client/src/pages/README.md with:
- Test API feature implementation guide
- Code patterns for adding Test API to new pages
- Table of all device pages and their API endpoints
- WeMo special handling documentation
- Environment Variables: Never commit
.envfile to Git - Network Security: Run on a secure, private network
- HTTPS: Use HTTPS in production
- Authentication: Add user authentication for production use
- API Keys: Rotate credentials regularly
- Firewall: Configure firewall rules appropriately
- User authentication and authorization
- Device grouping and scenes
- Automation rules and scheduling
- Voice control integration (Alexa, Google Home)
- Mobile app (React Native)
- HomeKit integration
- Energy monitoring dashboard
- Device usage analytics
- Push notifications
- Multi-user support
This project is for personal use. Ensure you comply with the terms of service for all integrated APIs and services.
This is a personal project, but suggestions and improvements are welcome!
For issues or questions, please create an issue in the repository or contact the system administrator.
Built with β€οΈ for SmartHouse 2524