Skip to content
Motion controlled SmartMirror
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
Motion fixed valueError in Aug 3, 2018
public Remove unused css files Sep 14, 2016
LICENSE Update README to clarify how to change the config to use the pi camera Jun 12, 2017
config.js Take and upload photo widget Jun 17, 2016
motion.js Replace arrow function to a basic one for compatibility Oct 17, 2016
package.json Remove agario-client from modules Jun 27, 2016
server.js Separate motion logic from server Jun 27, 2016
widgets.js Take and upload photo widget Jun 17, 2016


Motion controlled SmartMirror showing time and temperature in background with the possibility of adding any widget to the menu. The camera is behind the two-way mirror to get the best possible look. The screen and camera are managed by a raspberry pi. The motion is managed by a server running in python with OpenCV, the server web is in NodeJS.


Showing the display of the main menu and a use case on the widget Cinema (movie times of my local theater)


Show full webm preview -


  • Recognition of gestures : palm, thumbs up/down, slide up/down/right/left
  • Time and outside temperature
  • Widgets :
    • Photo : take a photo and upload it to Dropbox
    • Map : display local Google Map
    • Cinema : movie time of local theater
    • DoodleJump : play the game (hard with the latency)
    • News : show international news


The motion server can't recognize gestures on a new environment : lights, hand colors... affect the process, that's why by launching the file and tweak the HSV min/max values and others configs properly you can set it up for your home. To begin the tracking make an open palm like shown in the picture below.

Debugging gesture Show webm preview


  • Software :
    • OpenCV 2.x
    • Python 3.x
    • NodeJS
  • Hardware :
    • Two Way Mirror
    • Raspberry pi
    • Camera (I'm using the NoIR but any camera should do)
    • LED Monitor (Preferably that cover the whole surface of your two way mirror)


  • Web server :
  • Motion server :
    • Install OpenCV 2.x and cv2 wrapper for python (should be in the opencv package)
    • pip install numpy
    • pip install tornado
    • python for debug infos or python for silent process
    • for the tracking settings
      • To use the Pi Camera set useCameraBoard.piCamera in to true and install the package picamera pip install "picamera[array]"


The motion server was made in python to learn the language, but it should have been made in C/C++ to gain execution speed and flowness in the gestures recognitions. Also, python environment kinda sucks at the moment, the difficulty to set it up for python3 + opencv2 + windows and then linux was exhausting, I don't recommend.

You can’t perform that action at this time.