Skip to content

SwellEquation/Lur

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

17 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

LUR โ€“ Legacy Universal Remote

A comprehensive web-based dashboard for controlling and managing IoT devices in smart home environments. LUR provides an intuitive interface to toggle devices, adjust settings, and manage your connected ecosystem through an accessible admin panel.

Status License Platform

Features

  • Multi-Device Support โ€“ Control lights, thermostats, fans, locks, cameras, monitors, speakers, sensors, and plugs

  • Device-Specific Controls:

    • Lights (๐Ÿ’ก) โ€“ On/off with brightness slider
    • Thermostat (๐ŸŒก๏ธ) โ€“ Temperature control (60โ€“85ยฐF)
    • Fan (๐ŸŒ€) โ€“ Speed adjustment (1โ€“5 levels)
    • Lock (๐Ÿ”’) โ€“ Lock/unlock with status indicator
    • Camera (๐Ÿ“น) โ€“ Recording start/stop
    • Monitor (๐Ÿ–ฅ๏ธ), Speaker (๐Ÿ”Š), Sensor (๐Ÿ“ก), Plug (๐Ÿ”Œ) โ€“ On/off toggles
  • Responsive Grid Layout โ€“ Adapts seamlessly to all screen sizes

  • Interactive UI โ€“ Intuitive hover effects, click feedback, and full keyboard navigation

  • Device Management โ€“ Add, edit, and delete devices through an admin panel

  • Modal Interface โ€“ Easy device configuration with name, type, and IP settings

  • Data Persistence โ€“ Automatic localStorage saves across sessions

  • Simulated Backend โ€“ Mock PHP endpoints for testing and development

Requirements

  • Modern web browser (Chrome, Firefox, Edge, Safari)
  • Local PHP development server (XAMPP, WAMP, or php -S localhost:8000)
  • Optional: Code editor (VS Code, Sublime Text, etc.)

Installation

1. Clone the Repository

git clone https://github.com/your-username/lur-legacy-universal-recording.git
cd lur

2. Start a Local Server

Option A: Using PHP Built-in Server

php -S localhost:8000

Option B: Using XAMPP

  • Place the project in C:\xampp\htdocs\lur\
  • Start Apache and PHP from the XAMPP Control Panel

3. Access the Dashboard

Open your browser and navigate to:

http://localhost:8000/index.html

The admin panel is accessible at:

http://localhost:8000/admin.html

Usage

Dashboard (index.html)

  • View Devices โ€“ All IoT devices displayed in a responsive grid
  • Control Devices:
    • Click buttons to toggle devices on/off
    • Lock/unlock doors with the lock button
    • Start/stop camera recording
    • Use sliders to adjust brightness, temperature, or fan speed
  • Manage Devices โ€“ Click the three-dot menu on any device to edit or delete
  • Access Admin โ€“ Click "Manage Devices" button to add new devices

Admin Panel (admin.html)

  • Add Device โ€“ Enter device name, select type, and optionally set IP address
  • Auto-Discovery โ€“ Simulate device discovery with predefined mock devices
  • Return Dashboard โ€“ Click "Back to Dashboard" to exit admin panel

Editing Devices

  1. Click the three-dot menu (โ‹ฎ) on any device card
  2. Select "Edit" to open the configuration modal
  3. Update device name, type, or IP address
  4. Save changes โ€“ dashboard updates automatically

Keyboard Navigation

Key Action
Tab Navigate between controls
Enter Activate buttons
Space Toggle or select

Project Structure

lur/
โ”œโ”€โ”€ index.html          # Main dashboard interface
โ”œโ”€โ”€ admin.html          # Device management panel
โ”œโ”€โ”€ styles.css          # Responsive styling (dark theme)
โ”œโ”€โ”€ script.js           # Dashboard logic and device control
โ”œโ”€โ”€ admin.js            # Admin panel functionality
โ”œโ”€โ”€ lighton.php         # Mock endpoint for device activation
โ”œโ”€โ”€ lightoff.php        # Mock endpoint for device deactivation
โ””โ”€โ”€ README.md           # Project documentation

Configuration

Update Device Control Endpoints

Place API calls in script.js:

// Example: API integration
fetch(`https://your-iot-api.com/device/${id}/control`, {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ action: 'on' })
});

Add Custom Device Types

Edit script.js to add new device categories:

case 'customDevice':
  return `<div class="device-card">
    <!-- Your custom HTML -->
  </div>`;

Customize Styling

Modify styles.css to change colors, spacing, or hover effects. The dashboard uses a dark theme with:

  • Primary background: #0f0f0f
  • Card background: #1a1a1a
  • Text color: #e8e8e8
  • Accent colors: Blue (#3498db), Green (#2ecc71), Red (#e74c3c)

Data Storage

Device configurations are stored in browser localStorage under the iotDevices key. This ensures your settings persist across sessions.

To reset to default devices:

localStorage.removeItem('iotDevices');
location.reload();

Notes

  • Simulation Mode โ€“ The dashboard currently simulates device control using localStorage and PHP endpoints
  • IP Addresses โ€“ Optional field, used only in fetch requests for simulation
  • Auto-Discovery โ€“ Currently returns predefined example devices; implementation of real UPnP/mDNS for device discovery planned

Extending LUR

Add Device Types

Update device initialization in admin.js:

const deviceTypes = ['light', 'thermostat', 'fan', 'lock', 'camera', 'monitor', 'speaker', 'sensor', 'plug', 'your-device'];

Enhance UI/UX

Customize styles.css for themes, animations, or additional layout options

Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m "Add amazing feature")
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a pull request

License

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

Support


Made with โค๏ธ for smart home enthusiasts and developers

About

Legacy Universal Remote. All in one self-hosted controller for IoT devices designed to be ran on low end hardware

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors