Skip to content

dansl/MagicMirror-Photo-Frame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MagicMirror Photo Frame

WORK IN PROGRESS

The concept is to have a "smart photo frame" that syncs your photos from dropbox or can easily upload photos via sftp, while also showing things like the current time and weather, and have basic touch controls. I used the app MagicMirror for simplicity sake. I tried to keep the steps as simple as possible, but this may require you to have some comfort with using Linux and command line.

Setup a Raspberry Pi with a small 7" or 10" touch screen, run MagicMirror and a few modules, and you will have a self-hosted smart photo frame!

Hardware

  • Raspberry Pi 4 or better + Power Cable
  • Raspberry Pi compatable Touch Display (any size, but 7" or 10" recommended)
  • SD Card 32GB or more

Steps

  • Setup Raspian OS on your Raspberry Pi.
  • Follow the MagicMirror tutorial setup or follow command below.
    • NOTE: At the time of writing this, nodejs on Raspian is on version 20, to simplify the process this will use version 2.30.0 of MagicMirror. For the latest version, follow the official MagicMirror setup and manually install the latest nodejs.
    • In Terminal run these commands in order:
      • sudo apt install nodejs npm
      • wget https://github.com/dansl/MagicMirror-Photo-Frame/raw/refs/heads/main/Assets/MagicMirror.zip
      • unzip MagicMirror.zip
      • cd MagicMirror
      • npm install
  • Install these Modules:
    • NOTE: The steps listed below are using downloaded copies, if you want the up-to-date version, follow the repo's setup process.
    • MMM-BackgroundSlideshow
      • cd ~/MagicMirror/modules/
      • wget https://github.com/dansl/MagicMirror-Photo-Frame/raw/refs/heads/main/Assets/MMM-BackgroundSlideshow.zip
      • unzip MMM-BackgroundSlideshow.zip
      • cd MMM-BackgroundSlideshow
      • npm install
    • MMM-Pages
      • cd ~/MagicMirror/modules/
      • wget https://github.com/dansl/MagicMirror-Photo-Frame/raw/refs/heads/main/Assets/MMM-pages.zip
      • unzip MMM-pages.zip
    • MMM-TouchButton
      • cd ~/MagicMirror/modules/
      • wget https://github.com/dansl/MagicMirror-Photo-Frame/raw/refs/heads/main/Assets/MMM-TouchButton.zip
      • unzip MMM-TouchButton.zip
      • cd MMM-TouchButton
      • npm install
    • MMM-ModuleScheduler
      • cd ~/MagicMirror/modules/
      • wget https://github.com/dansl/MagicMirror-Photo-Frame/raw/refs/heads/main/Assets/MMM-ModuleScheduler.zip
      • unzip MMM-ModuleScheduler.zip
      • cd MMM-ModuleScheduler
      • npm install --omit=dev
  • Download the Config.js and Custom.css files from this repo.
    • cd ~/MagicMirror/config
    • wget https://github.com/dansl/MagicMirror-Photo-Frame/raw/refs/heads/main/config.js
      • Edit the Config.js file and find "/home/pi/Pictures". You may need to change this path to match your Pictures path on the Raspberry Pi.
      • Edit the Config.js file and change the weather module's lat and lon variables to be your locations latitude and longitude.
    • cd ~/MagicMirror/css
    • wget https://github.com/dansl/MagicMirror-Photo-Frame/raw/refs/heads/main/custom.css
  • Add your images to the "~/Pictures" folder.
  • Run MagicMirror with the below commands.
    • cd ~/MagicMirror
    • npm start
  • By Default, it's set on a schedule of 7am to 11pm. Durring that time it will show the photo slideshow, outside that time it will dim the modules and show "Good Night" on the screen with no slideshow. This can be changed by editing the "~/MagicMirror/config/config.js" file.

Recommendations

  • Setup Autostart on boot with PM2.
    • sudo npm install -g pm2
    • pm2 startup
      • Copy and paste the command that it asks you to run, then continue to the next step.
    • cd ~
    • nano mm.sh
      • Paste the below text into the window, then press 'ctrl+x', press 'y', press 'enter'
        cd ./MagicMirror
        DISPLAY=:0 npm start
        
    • chmod +x mm.sh
    • pm2 start mm.sh
    • pm2 save
    • cd ~/Desktop
    • wget https://github.com/dansl/MagicMirror-Photo-Frame/raw/refs/heads/main/Start-Slideshow.desktop
    • chmod +x Start-Slideshow.desktop
  • Setup Dropbox or another service to easily sync your photos to the Pi. There are a few ways to do this, I chose to use this Dropbox Uploader script to sync photos to my "~/Pictures" folder.
    • Setup the dropbox_uploader script following the instructions in the link above, then setup a cron job to run every hour to download photos.
      • Edit your cron table by entering crontab -e in terminal.
      • Then at the bottom add 0 * * * * /home/username/Dropbox-Uploader/dropbox_uploader.sh download / /home/username/Pictures
      • Make sure to change the 2 instances of "username" with your Linux username(ex: 'pi').
      • Press 'ctrl+x', press 'y', press 'enter', now it should run every hour!
  • Install "unattended-upgrades" so you dont need to periodically manually update the OS. Just open terminal and run sudo apt install unattended-upgrades.
  • 3D Print a shell for your display. I saved a few here that may work.

Screenshots

Screenshot 1

Screenshot 2

Screenshot 3

Screenshot 4

About

Setup a Raspberry Pi and touch display as a smart slideshow photo frame using MagicMirror.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published