Skip to content

Latest commit

 

History

History
94 lines (77 loc) · 3.18 KB

README.md

File metadata and controls

94 lines (77 loc) · 3.18 KB

MIT prs welcome

How it works

The node.js script uses puppeteer (Headless Chrome Node API), to take a screenshot of the local running MagicMirror site (localhost:808) and saves it.
You can change the size of the screenshot and the MagicMirror port in the config.js file.

Then the script executes a the eInk Python script from the ePaperPython folder and updates the eInk screen.
This is the original Python script from Waveshare.

Requirements

Resources

Install dependencies

  • Update packages and install Git, Chrome Browser
sudo apt-get update && sudo apt-get install -y git chromium-browser
  • Install Node.js and npm
curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -
sudo apt-get install -y nodejs
  • Install PM2 (process manager for Node.js)
sudo npm install -g pm2
// Starting PM2 on Boot
pm2 startup
// pm2 start node serveronly
// pm2 save

Setup

  • Clone/copy the project files to your system.
git clone https://github.com/BenRoe/rpi-magicmirror-eink.git
  • Move to the project folder
cd rpi-magicmirror-eink
  • Install Node.js dependencies (inside the rpi-magicmirror-eink folder)
npm install
  • Copy all files & folder from magicmirror-files/css to your MagicMirror css folder.
cp -a magicmirror-files/css/. ~/MagicMirror/css
  • Copy the prepared MagicMirror config.js to MagicMirror config folder.
cp magicmirror-files/config.js ~/MagicMirror/config/
  • Start the script with PM2 and run it in the background
pm2 start index.js --name "eink-update"
pm2 save

Todo

  • 3d print case
  • support more waveshare epaper display sizes
  • white background/black font mode (invert image with jimp (image.invert();))

Ressources