Magic Mirror: by Khinds10
Magic Mirror: by Khinds10
Magic Mirror: by Khinds10
Magic Mirror
by khinds10
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 Locate your inserted microSD card via the df -h
A7 I2C Enable i2c interface Enable the English/US add the following line:
Keyboard
$ alias l='ls -lh'
sudo nano /etc/default/keyboard Change the following
line: XKBLAYOUT="us" Reboot PI for Keyboard $ source ~/.bashrc
uncomment the following line: sensor = Adafruit_DHT.DHT11 Comment the line out
syntax on DHT11 Install pin = 'P8_11' Uncomment the line and change the pin
number to 16
$ cd ~
pin = 16 Run the test
$ git clone
https://github.com/adafruit/Adafruit_Python_DHT.g... python simpletest.py
$ cd examples/
Step 7: Supplies Needed: RaspberriPi Zero (or Regular RaspberriPi Should Work)
DHT11 Humidistat
VCC -> 5V
In the /construction folder of the project 3D print the following attachments to build the picture frame borders and
tablet holders.
tablet-mounts.stl
Print the Following Frame Corner blocks and balsa wood attachments:
mirror-corner-blocks.stl
mirror-corners.stl
mirror-sides.stl
Gather together the frame balsa wood strips and the 3D printed attachments
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.
Screw the corners to the 4 corner blocks to hold the frame together.
Attach the tablets and Raspberry PiZero to the wood to eventually fix to the wall.
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)
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.
Create the Device Hub Project hosted on a PHP Create the tablet clock website
enabled webhost of your choice for the top tablet
to get data Create a PHP enabled website online with the
contents of the "tablet" folder in this project.
https://github.com/khinds10/DeviceHub
Configure the website: In the "tablet/server" folder of
Create Weather Tablet Project for the bottom the project, copy the config.shadow.php file to a file
tablet named "config.php" Edit the "config.php" configure
the $deviceHubAPI value to point to the device hub of
https://github.com/khinds10/WeatherTablet your choosing from the referenced project above
(https://github.com/khinds10/DeviceHub)
Setup Startup Scripts, Temp Logger to API script
each 3 minutes Example Apache2 Configuration File for the tablet
clock PHP website
In the raspberrypi folder of the project copy the
settings.shadown.py file to settings.py with the host DocumentRoot /var/www/tablet ServerName
file of the DeviceHub project above you have setup. myclocktablet.com ServerAdmin
webmaster@myclocktablet.com ErrorLog
$ crontab -e Add the following lines: ${APACHE_LOG_DIR}/error-clock-tablet.log
CustomLog ${APACHE_LOG_DIR}/access-clock-
*/3 * * * * python tablet.log combined Options FollowSymLinks
/home/pi//MagicMirror/raspberrypi/temp-check.py AllowOverride All Require all granted
$ sudo reboot