Skip to content
Branch: master
Go to file

Latest commit


Failed to load latest commit information.
Latest commit message
Commit time


Uses a custom webserver to handle outgoing requests and filesystem operations.

Don't forget to enable ping response for IPv4 in your devices' firewalls to allow the esave script to work.

Can show:

  • Current date and time, optionally with a binary clock
  • Calendar
  • Current weather and a five-day forecast
  • Indoor temperature (if you have an DS18B20 temperature sensor attached)
  • Current gas price at your local gas station
  • Departure times at your local station (if the service provider uses HAFAS ReST API)

Check config.json for all available customization options. The config needs to be added as parameter to the site request – see the entry in /home/pi/.config/lxsession/LXDE-pi/autostart below.


Moment.js 2.12.0

Weather Icons 2.0


For Raspbian Stretch.

sudo nano /etc/modprobe.d/8192cu.conf

# disable Edimax-WLAN Power Saving
options 8192cu rtw_power_mgnt=0 rtw_enusbss=0

sudo nano /boot/config.txt

# activating 1-wire with pullup

sudo raspi-config

# set hostname
2 -> N1: magic-mirror

# install all needed programs
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get install chromium-browser unclutter zsh -y
wget -O ~/.zshrc
chsh (/usr/bin/zsh)
sudo apt-get clean

# copy MagicMirror/ to /home/pi/
# copy to /home/pi/

sudo nano /home/pi/.config/lxsession/LXDE-pi/autostart

#@xscreensaver -no-splash
# chromium in kioskmode
@xset s off
@xset -dpms
@xset s noblank
@chromium-browser --noerrdialogs --kiosk --incognito http://localhost/site?config={"position":{"left":["time","calendar"],"middle":["gas"],"right":["weather","transport"]},"time":{"showWithSeconds":true,"showYear":true},"temp":{"sensorAttached":true}}

# sudo nano /etc/rc.local

# disable HDMI at bootup
tvservice -o;

# mark script as executable
sudo chmod +x /home/pi/

# execute the script at startup
sudo crontab -e

@reboot /home/pi/ > /dev/null 2>&1
#@reboot /home/pi/ > /home/pi/esave.log
#0 23 * * * /sbin/shutdown -h 0
@weekly /sbin/shutdown -r now
@reboot rm -rf /home/pi/.config/chromium/Singleton*


A locally running server which handles all outgoing traffic to prevent stuff like CORS (Cross-Origin Resource Sharing).

Temperature Sensor

If you have one, enter your own DS18B20 sensor ID in temperature.go (const sensorId).

Compile for Raspi 2 Model B (Windows)

See build.cmd.


# copy file to ~

sudo mv ~/MagicMirror-server /usr/bin
sudo chmod +x /usr/bin/MagicMirror-server

# start the server on startup
sudo crontab -e

@reboot /usr/bin/MagicMirror-server -port 80 -dir /home/pi/MagicMirror 2>>/home/pi/MagicMirror-server.log


Client and server code for a Magic Mirror.




No releases published
You can’t perform that action at this time.