Magic Mirror




About: 3D printing and designing RaspberryPI projects for a few years now

Wall Based Magic Mirror for Current Weather & Time Display

Step 1: Flashing RaspberriPi Hard Disk / Install Required Software (Using Ubuntu Linux)


Create your new hard disk for DashboardPI

Insert the microSD to your computer via USB adapter and create the disk image using the dd command

Locate your inserted microSD card via the df -h command, unmount it and create the disk image with the disk copy dd command

$ df -h /dev/sdb1 7.4G 32K 7.4G 1% /media/XXX/1234-5678

$ umount /dev/sdb1

Caution: be sure the command is completely accurate, you can damage other disks with this command

if=location of RASPBIAN JESSIE LITE image file of=location of your microSD card

$ sudo dd bs=4M if=/path/to/raspbian-jessie-lite.img of=/dev/sdb (note: in this case, it's /dev/sdb, /dev/sdb1 was an existing factory partition on the microSD) Setting up your RaspberriPi

Insert your new microSD card to the raspberrypi and power it on with a monitor connected to the HDMI port


user: pi pass: raspberry

Change your account password for security

sudo passwd pi

Enable RaspberriPi Advanced Options

sudo raspi-config

Choose: 1 Expand File System

9 Advanced Options

A2 Hostname change it to "MagicMirror"

A4 SSH Enable SSH Server

A7 I2C Enable i2c interface Enable the English/US Keyboard

sudo nano /etc/default/keyboard Change the following line: XKBLAYOUT="us" Reboot PI for Keyboard layout changes / file system resizing to take effect

$ sudo shutdown -r now Auto-Connect to your WiFi

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf Add the following lines to have your raspberrypi automatically connect to your home WiFi (if your wireless network is named "linksys" for example, in the following example)

network={ ssid="linksys" psk="WIRELESS PASSWORD HERE" }

Reboot PI to connect to WiFi network

$ sudo shutdown -r now

Now that your PI is finally on the local network, you can login remotely to it via SSH. But first you need to get the IP address it currently has.

$ ifconfig Look for "inet addr: 192.168.XXX.XXX" in the following command's output for your PI's IP Address Go to another machine and login to your raspberrypi via ssh

$ ssh pi@192.168.XXX.XXX Start Installing required packages

$ sudo apt-get update

$ sudo apt-get upgrade

$ sudo apt-get install vim git python-smbus i2c-tools python-imaging python-smbus build-essential python-dev rpi.gpio python3 python3-pip libi2c-dev python-requests Update local timezone settings

$ sudo dpkg-reconfigure tzdata select your timezone using the interface Setup the simple directory l command [optional]

$ vi ~/.bashrc

add the following line:

$ alias l='ls -lh'

$ source ~/.bashrc

Fix VIM default syntax highlighting [optional]

$ sudo vi /etc/vim/vimrc

uncomment the following line:

syntax on DHT11 Install

$ cd ~

$ git clone

$ cd Adafruit_Python_DHT/

$ sudo python install

$ sudo python

$ cd examples/

$ vi

Change the following line:

sensor = Adafruit_DHT.DHT11 Comment the line out

pin = 'P8_11' Uncomment the line and change the pin number to 16

pin = 16 Run the test


You should see a metric reading of Temp and Humidity displayed on the command line.

Step 2: Supplies Needed: 12" X 24" Acrylic See-Through Mirror, 3mm

Step 3: Supplies Needed: Balsa Wood Strips 0.125 X 0.5 Inches

Step 4: Supplies Needed: 12x24 Inch Black Picture Frame

Step 5: Supplies Needed: OLD Android Tablets (x2)

Step 6: Supplies Needed: DHT11 Humidistat

Step 7: Supplies Needed: RaspberriPi Zero (or Regular RaspberriPi Should Work)

Step 8: Build and Wire the Device

DHT11 Humidistat

VCC -> 5V


DATA -> GPIO 16 / PIN 36

Step 9: ​3D Print Brackets

In the /construction folder of the project 3D print the following attachments to build the picture frame borders and tablet holders.

Print the Following Tablet Holders:


Print the Following Frame Corner blocks and balsa wood attachments:




Step 10: Assembly

Gather together the frame balsa wood strips and the 3D printed attachments

Step 11: Assembly (cont.)

Assemble the balsawood strips inside the corner brackets (sliding the balsawood through the side brackets, make sure they're square against the corners of the picture frame. Paint everything black with spray paint.

Step 12: Assembly (cont.)

Screw the corners to the 4 corner blocks to hold the frame together.

Step 13: Assembly (cont.)

Attach the tablets and Raspberry PiZero to the wood to eventually fix to the wall.

Step 14: Assembly (cont.)

Attach to the wall the board. (Note the 2 screws on the top left and right, they will be used to hold up the picture frame with frame border attached to place in front of the tablets to shine through the mirror)

Step 15: Finish Assembly

Finally replace the cardboard piece inside the picture frame with a two way mirror and on each corner of the picture frame screw into the corner (3D printed) blocks to hold the picture frame to the frame border.

Step 16: Software Required

Create the Device Hub Project hosted on a PHP enabled webhost of your choice for the top tablet to get data

Create Weather Tablet Project for the bottom tablet

Setup Startup Scripts, Temp Logger to API script each 3 minutes

In the raspberrypi folder of the project copy the file to with the host file of the DeviceHub project above you have setup.

$ crontab -e Add the following lines:

*/3 * * * * python /home/pi//MagicMirror/raspberrypi/

Verify the display starts working on reboot

$ sudo reboot

Create the tablet clock website

Create a PHP enabled website online with the contents of the "tablet" folder in this project.

Configure the website: In the "tablet/server" folder of the project, copy the config.shadow.php file to a file named "config.php" Edit the "config.php" configure the $deviceHubAPI value to point to the device hub of your choosing from the referenced project above (

Example Apache2 Configuration File for the tablet clock PHP website

DocumentRoot /var/www/tablet ServerName ServerAdmin ErrorLog ${APACHE_LOG_DIR}/error-clock-tablet.log CustomLog ${APACHE_LOG_DIR}/access-clock-tablet.log combined Options FollowSymLinks AllowOverride All Require all granted




    • Growing Beyond Earth Maker Contest

      Growing Beyond Earth Maker Contest
    • Frozen Treats Challenge

      Frozen Treats Challenge
    • Colors of the Rainbow Contest

      Colors of the Rainbow Contest

    21 Discussions


    7 months ago

    I was thinking of doing a partial magic mirror similar to yours, would you say there is a visible difference where the screens meet the mirror?


    11 months ago

    Very cool and a really nice instructable. Having seen this, I was inspired to try something a bit simpler. My first effort uses a small picture frame, some mirror window film and an old Android phone with an app called "Wall Mirror". Maybe 35 minutes to put the whole thing together.

    1 reply

    Reply 11 months ago

    That's great! I have like 2 more projects to post here, yikes, have to document the steps, thanks for the visit.


    1 year ago

    This looks to be an amazing project, but it's way over my pay grade to create! ;) Of course, I have *several* tablets that have gone wheels up and I'll be continuing to save them ... just in case my technology level gets raised sometime in the near future ~ LOL

    Incredibly technology challenged, but love looking at the awesome creations :) TrudyNC


    1 year ago

    The project can just use 1 or 2 tablets pointing to website(s) of your choice that would show useful information.

    I've made my own websites showed above to get all fancy to show room temperature (using the Raspberry PI broadcasting from the local humidistat). The Living Room and Bedroom temps are from weather clocks (my other instructable broadcasting local temps there).

    I use a kiosk browser app called simply "Full Screen Browser". I load the URLs manually in it. Thanks for visiting!


    1 year ago

    A century ago tablets would have been the equivalent of magic. Now we have spare tablets laying that we have nothing better to do than play around with. At this rate, in another hundred years having robot overlords doesn't sound that crazy anymore... Oh well. Cool project ;)

    4 replies

    Reply 1 year ago

    shoot! 20years ago someone with a tablet would have been accused of having alien technology simply because of the screen resolution.

    I remember a conversation with co-workers after the Dick Tracer comic strip was discontinued in about 1970. In the preceding 5 yrs, everything that had seemed totally sci-fi was available. The really two big things Dick Tracey had was a miniature radio and a digital watch!


    Reply 1 year ago

    Don't forget the 2-way wrist TV! That's what inspired the Apple watch (sort of).


    Reply 1 year ago

    And then there was Star Trek (or "Star Blecch," for MAD mag fans), with a plethora of concepts that have come to fruition in the past two decades.

    Sooner than we think, this type of tablet will seem like the first ones made of stone.


    Reply 1 year ago

    I still wonder at the magic of led lights and how we take them for granted. They are science fiction from my childhood. There is a company that takes an led light and powers it with a gravity generator that works with a bag of rocks so that people living in extreme poverty can have light and eliminate dangerous kerosene lanterns. I wish I was 10 years old now so I could see what wonders the next 50 years will bring. I do hope we figure out how to bring food, water, sanitation, basic medical needs and electricity to the poorest of the poor.


    1 year ago

    What do you use on the tablets? I mean, do you manually open the browser? or you have some automated script or app that opens and browses to the correct website?


    1 year ago

    There is some nice ideas here. Although, I do not know anything about PHP..:-)

    The DHT 11 sensor is a 5v device. Is this not a problem wiring it to 3.3v logic of the pi?


    1 year ago

    This is not a very universal project. I mean. Why do you need two tablets and a raspberry pi??? Maybe LCD + raspberry pi would be more of a project for most people.


    1 year ago

    This is a useful method for displaying information on-screen without directly connecting screens (or dismantling / cannabilizIng old devices). And I really appreciate the detail - lots of CLI stuff to chew on.

    Are the screens in the mirror always on or do you have a method for remote control?

    1 reply

    Reply 1 year ago

    Outstanding project.

    I would like to connect the USB or HDMI output of a PC to a glass rather than to a secondary screen.

    Could i use a simplified version of this instructable for that purpose?


    1 year ago

    I notice that you have two local temps showing (bed & living), do you have 2 of these mirrors talking together or just a remote sensor. Btw love the project.


    1 year ago

    I never owned a Tablet so forgive my ignorance about it.

    does it connect to the internet? If so, can the android tablets be set to show the weather without all the Raspberry stuffs?


    1 year ago

    Very nice looking mirror. Can you do other things with the tablets?


    1 year ago

    Great project!