Skip to content

dx111ge/DoorDisplay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Door Display Controller

A WebSocket-based room status display system using ESP32-C6 with LCD display and a cross-platform desktop controller app.

Hardware Required

ESP32-C6-LCD-1.47 Development Board
Available on Amazon (Amazon affiliate link - no extra cost to you)

Image

Features:

  • 1.47" LCD Display (172×320)
  • ESP32-C6 with WiFi 6 & Bluetooth LE
  • Built-in button for notifications
  • Compact design perfect for door mounting

System Overview

ESP32 Device:

  • Displays room status (Available/Busy) with custom text
  • Connects via WiFi with WPA2/WPA3 support
  • WebSocket server for real-time updates
  • Physical button sends "ring" notifications

Desktop Controller:

  • Cross-platform Electron app (Windows/macOS)

  • Minimal, clean interface

  • Real-time status updates via WebSocket

  • Native OS notifications for door bell

    Image

Quick Start

1. ESP32 Setup

Install Required Libraries in Arduino IDE:

  • WebSockets by Markus Sattler
  • ArduinoJson by Benoit Blanchon
  • Adafruit GFX Library
  • Adafruit ST7789 Library

Configure WiFi:

  1. Open arduino/room.ino
  2. Update WiFi credentials:
const char* ssid = "YOUR_WIFI_SSID";        // Change this!
const char* password = "YOUR_WIFI_PASSWORD"; // Change this!

Upload to ESP32:

  1. Select board: "ESP32C6 Dev Module"
  2. Upload arduino/room.ino
  3. Note the IP address shown in Serial Monitor

2. Desktop App Setup

Install Dependencies:

cd electron-app
npm install

Run Development Version:

npm start

Build Native Applications:

# Windows executable
npm run build-win

# macOS application  
npm run build-mac

# Both platforms
npm run build

Built apps will be in the dist/ folder.

Usage

  1. Power on ESP32 - Display shows "Available" by default
  2. Launch desktop app - Enter ESP32 IP address and click "Connect"
  3. Control display - Select color (Available/Busy) and enter custom text
  4. Door bell - Press button on ESP32 to send ring notification to desktop

Project Structure

├── arduino/
│   ├── room.ino                    # Main ESP32 firmware
│   ├── Display_ST7789.h/.cpp       # Display driver
│   ├── LVGL_Driver.h/.cpp          # LVGL interface
│   └── PINS_ESP32-C6-LCD-1_47.h    # Pin definitions
├── electron-app/
│   ├── main.js                     # Electron main process
│   ├── minimal.html                # UI frontend  
│   ├── package.json                # Dependencies & build config
│   └── README.md                   # App-specific instructions
└── README.md                       # This file

Features

ESP32 Firmware:

  • ✅ WebSocket server with JSON messaging
  • ✅ WPA2/WPA3 WiFi support with automatic fallback
  • ✅ Power optimized (80MHz CPU, efficient sleep)
  • ✅ Button interrupt handling with debouncing
  • ✅ Landscape display mode (320×172)
  • ✅ Production-ready code (debug output removed)

Desktop Controller:

  • ✅ Native desktop app (Windows/macOS)
  • ✅ Real-time WebSocket communication
  • ✅ Native OS notifications for door bell
  • ✅ Minimal, intuitive interface
  • ✅ Automatic connection management

Technical Details

Communication Protocol:

// Display update (Desktop → ESP32)
{
  "color": "green|red",
  "line1": "  Main text", 
  "line2": "  Sub text"
}

// Ring notification (ESP32 → Desktop)
{
  "action": "ring",
  "timestamp": 1234567890
}

Power Consumption:

  • ESP32 running at 80MHz for power efficiency
  • Automatic WiFi power management
  • Optimized display updates

Troubleshooting

ESP32 won't connect to WiFi:

  • Ensure router is in WPA2/WPA3 mixed mode
  • Check SSID and password are correct
  • Some routers require 2.4GHz band selection

Desktop app won't connect:

  • Verify ESP32 IP address in Serial Monitor
  • Check firewall settings (port 81)
  • Ensure both devices are on same network

Display issues:

  • Verify all pin connections match schematic
  • Check power supply (USB should be sufficient)
  • Try different USB cable if display is dim

Development

Extending the firmware:

  • Add new message types in webSocketEvent()
  • Customize display layout in updateDisplay()
  • Modify button behavior in sendRingMessage()

Customizing the desktop app:

  • Edit minimal.html for UI changes
  • Modify main.js for Electron behavior
  • Add new features to WebSocket handler

License

MIT License - Feel free to modify and distribute.

Contributing

Issues and pull requests welcome! Please test on actual hardware before submitting.


Disclaimer: The Amazon link is an affiliate link. Using it supports this project at no extra cost to you.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published