Skip to content

A simple version of the popular MagicMirror application

Notifications You must be signed in to change notification settings

austin0150/SimpleMirror

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SimpleMirror

A simple version of the popular MagicMirror application. SimpleMirror is a basic web page using JavaScript to show info like date/time, weather, and news feeds on a monitor positioned behind a pane of one way glass. This creates the illusion of a "Magic Mirror".

Why...

I spent far too long trying to use frameworks like Angular and React to create my own version of the MagicMirror application. So after many failed attempts, I decided to simply use plain Javascript to create my mirror application which i'm dubbing "SimpleMirror".

Hardware

I run this with a RaspberryPi zero-w, but it could be run on any RaspberryPi with wifi capability. The pin may change between RPIs for the PIR motion sensor.

Wiring Diagram for the PIR sensor

PIR Wiring

PI Setup

I used the latest Rasbian OS to run the app. The image came with Chromium which works well for SimpleMirror.

In the Chromium config flags, you can add "--start-fullscreen" to force Chromium to start in fullscreen.

I used python and bash scripts to automate the mirror and PIR sensor startup. There are 3 bash scripts and 2 python scripts.

To have these run on startup, I configured the startup.sh script to run on startup.

I reccomend placing all the scripts in the usr dir. So if you are using the "pi" user, these scripts should all be placed at "/home/pi/".

After you configure your Pi for wifi, and configure to run these scripts at start, your Pi should be ready.

OpenWeatherMap API

To use the weather functionality, you will need to generate your own free API key.
You can find the API here : https://openweathermap.org/
Once you create a free account, you can generate your own API key to place in SimpleMiror/js/weather.js line 2.