You will need:
- Java 8
- npm (which is installed with node.js)
Run the following:
npm install -g bowerbower install./gradlew run
The application should now be on http://localhost:9098
./src/main/deploy gives you a rough idea of where files should go for a deployment to a RaspberryPi:
- Init script must be copied to
/etc/init.d/smart-mirror(and give it the correct permissions -> 0755) - YAML configuration should be copied to
/etc/smart-mirror.yml - Application should be copied to
/opt/smart-mirror/smart-mirror.jar
Now you can execute sudo service smart-mirror start and the app will spin up
sudo update-rc.d smart-mirror defaults
Logs can be found at /var/log/smart-mirror.log and /var/log/smart-mirror.err
Yes...ish
I use SnapCI as my automated build pipeline. It picks up code changed from GitHub, runs the tests and generates build artifact on completion. I've written a small bash script which polls the SnapCI API to update the JAR if there are any changes
- Copy
get_latest.shscript to ``/opt/smart-mirror/get_latesh.sh` - Execute
sudo crontab -e - Add
*/5 * * * * /opt/smart-mirror/get_latest.sh {username} {api_key} >> /var/log/smart-mirror.cron.log 2>&1
You're in luck!
- Copy the
turn_on_screen.shandturn_off_screen.shto/opt/smart-mirror/ - Execute
sudo crontab -e - Add
0 7 * * * /opt/smart-mirror/turn_on_screen.sh >> /var/log/screen.cron.log 2>&1to turn on at 7am - Add
30 8 * * * /opt/smart-mirror/turn_off_screen.sh >> /var/log/screen.cron.log 2>&1to turn off at 8.30am
Source: the-martins.org
Open ~/.config/openbox/lxde-rc.xml and add the following to the <keyboard> section
<keybind key=”A-C-S-1″>
<action name=”Execute>
<command>/opt/smart-mirror/turn_on_screen.sh</command>
</action>
</keybind>
<keybind key=”A-C-S-0″>
<action name=”Execute>
<command>/opt/smart-mirror/turn_off_screen.sh</command>
</action>
</keybind>
Unlike crontab which runs as root, this will run as your user, so you'll need to ensure we can execute a few executables as your user
chmod u+s /opt/vc/bin/tvservice
chmod u+s /bin/chvt
Now You can turn your screen off with Alt-Control-Shift-1 and off with Alt-Control-Shift-0
Source: cagewebdev.com
apt-get install x11-xserver-utils
Edit /etc/xdg/lxsession/LXDE-pi/autostart and add these three lines
@xset s off
@xset -dpms
@xset s noblank
Log out, log in, verify it's working with
xset -q
Source: Stack Exchange
https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=24679
- Start browser fullscreen on boot