Earth & Moon Magic Mirror

by khinds10 in Circuits > Clocks

1738 Views, 12 Favorites, 0 Comments

Earth & Moon Magic Mirror

20181129_195812.jpg

Tablet Powered Magic Mirror Clock showing the Moon / Earth and current outside conditions.

Installation

Clone the project on a LAMP enabled webserver, (PHP/Apache).

$ cd /var/www

$ git clone https://github.com/khinds10/MoonClock.git

Apache2 Configuration File

ServerName moon.myserver.com
ServerAlias moon.myserver.com
ServerAdmin admin@moon.myserver.com
DocumentRoot /var/www/MoonClock
Options FollowSymLinks
AllowOverride All
Require all granted


Configure Application Settings

In the settings/ folder of the project copy the settings.shadow.php to settings.php, adjust the php values accordingly to match your local configuration.

// weather API
$weatherAPIURL = 'http://api.forecast.io/';
$weatherAPIKey = 'MY API KEY HERE';
$latitude = '42.512000';
$longitude = '-71.151510';

Special Feature

If you wish to have your temperatures color coded, more red for hot outside, more blue for cold outside, you can create and point this application at the following GitHub URL: https://github.com/khinds10/TemperatureAPI and assign the newly created URL to the following PHP value

// temperature color API
$temperatureColorAPI = 'http://my-temperature.api.net';

Supplies Needed

tablet.jpg
picture-frame.png
wood.png
2-way-mirror.png

1) Old Tablet

2) Picture frame large enough to surround the tablet completely inside

3) 2 Way Mirror size cut to fit the frame

4) Thin piece of wood, cut to the same HxW of the picture frame itself. This will be attached to the back of the entire picture frame, holding the tablet inside like it's inside of a thin box.

Constructing the Project

20181129_163903.jpg
20181129_164006.jpg
20181129_175934.jpg
20181129_195059.jpg

For good measure, paint the back panel (thin piece of wood) of the picture frame black to prevent it showing through the 2 way mirror.

Place the 2 way mirror in front of the tablet, I've placed a paint stick (also painted black on the front) to hold up the tablet screen higher in the frame to appear more centered.

FINISHING STEPS

20181129_195801.jpg

On the tablet itself install a "kiosk style" browser application, one that's meant to keep the same page displayed for long periods of time. It should also keep the screen on, so it doesn't turn off due to inactivity when it's inside the frame.

Point the kiosk browser app to your created new website above.

Screw the back panel (thin piece of wood) on the painting, Hang on the wall with USB power nearby.