WakeOnPi: Motion-Activated Raspberry Pi Touchscreen
Posted on 16 Sep 2025 by Vithurshan Selvarajah — 2 min
Introduction
If you've ever wanted a Raspberry Pi dashboard that reacts to presence, WakeOnPi is the project for you. Designed for the Raspberry Pi 5 and the official Touch Display 2, it combines motion detection with smart display control to create a responsive, energy-efficient system.
Unlike tablets or traditional displays, the Pi’s touchscreen doesn’t natively support tap-to-wake, and alternative Android-based solutions can take 5–7 seconds to wake. WakeOnPi solves this with a lightweight, Python-based approach using the Camera Module 3 and OpenCV, waking the screen in under a second.
What is WakeOnPi?
WakeOnPi is a Python-powered project that:
- Detects motion using low-resolution grayscale frames for efficiency.
- Wakes the Raspberry Pi Touch Display in less than 1 second.
- Streams live MJPEG video over HTTP, suitable for integration with Home Assistant or other dashboards.
- Powers down the screen when idle to save energy.
It provides a compact alternative to running a separate tablet and camera setup, drawing less power and offering faster responsiveness.
Key Features
- Fast Motion Detection: Low-resolution frames allow rapid detection without taxing the Pi.
- Responsive Display Control: Screen wakes almost instantly when motion is detected.
- Live Video Streaming: MJPEG streaming allows remote monitoring through a browser.
- Energy Efficiency: Turns off the display when idle, conserving power.
- Integration-Friendly: Easily integrates with smart home systems like Home Assistant.
Installation & Setup
- Clone the Repository:
git clone https://github.com/vithurshanselvarajah/WakeOnPi.git
- Navigate to the Project Folder:
cd WakeOnPi
- Install Dependencies: Ensure Python 3 and pip are installed, then run:
pip install -r requirements.txt
Configure the Script: Edit the
wakeonpi.pyfile to adjust motion detection sensitivity, streaming options, and display settings.Run WakeOnPi:
python wakeonpi.py
Once running, the system continuously monitors for motion, wakes the display when someone approaches, and powers it down when idle.
Use Cases
- Smart Mirrors: Wake your display when someone is nearby.
- Security Cameras: Efficiently stream live footage only when motion is detected.
- Digital Signage: Reduce energy consumption by only activating displays when needed.
Why WakeOnPi Matters
Traditional setups either keep displays on constantly or rely on slow wake methods. WakeOnPi combines computer vision, fast display control, and efficient streaming to create a smarter, more responsive Raspberry Pi setup. It’s perfect for hobbyists, home automation enthusiasts, and anyone looking to save power while maintaining a responsive interface.
Learn More
For source code, installation instructions, and contributions, visit the WakeOnPi GitHub Repository.