magic-mirror-dashboard
Dashboard for "Magic Mirror" project. Displays weather, transit, news and other info.
Setup
Development Setup
- install node & npm
- install ruby
- sudo npm install -g grunt
- gem install bundler
- npm install
- bundle install
grunt build
node index.js
RPi Deployment Setup
RPi Setup
Install the latest version of Raspbian. Note that this will only work on an RPi >= 2.
Disabling the Screensaver
Comment out @xscreensaver -no-splash
line of /home/pi/.config/lxsession/LXDE-pi/autostart
, and add the following lines.
@xset s off
@xset s noblank
@xset -dpms
Setting up Chrome in Kiosk Mode
Chromium is the only browser that truly works in fullscreen mode without too much hackiness.
Unfortunately it's not in Raspbian's default repos so you'll need to download the .deb
files and install them yourself using sudo dpkg -i <package-name>
.
To start the browser on startup in fullscreen mode, add the following line to /home/pi/.config/lxsession/LXDE-pi/autostart
.
@chromium-browser --noerrdialogs --kiosk --incognito https://google.com
Hiding the Mouse
Install unclutter sudo apt-get install unclutter
and add the following line to /home/pi/.config/lxsession/LXDE-pi/autostart
.
@unclutter -idle 0.1 -root' into /etc/xdg/lxsession/LXDE/autostart
Building Assets & Deploying the NodeJS Server
Realistically you should build your CSS offline and push it along with your NodeJS code to its own deployment repo, but for now I'm just building my assets from the dev repository which means I'll need my frontend dev tools installed (compass, grunt, etc).
- Install the dev version of ruby
sudo apt-get install ruby-dev
- Install a modern version of NodeJS
curl -sL https://deb.nodesource.com/setup_6.x | sudo bash -
sudo apt-get install -y nodejs
- Follow steps outlined in 'Development Setup'
Starting the node app on startup
@node /home/pi/Projects/magic-mirror-dashboard/index.js < /dev/null &