Clone of https://en.lovebox.love
Duplicated with Raspberry Pi Zero W and HyperPixel display. Has no lid. Show beating heart when message is received. Uses Github Gist to send messages.
Install Raspbian Buster Lite. Do not install GUI!
Setup headless - SSH & Wireless
Setup to autologin console. sudo raspi-config
The server will need a static IP.
- Pip3: install pip - sudo apt install python3-pip
- Python modules: pip3 install flask flask_apscheduler PyGithub github3.py --user
HyperPixel. Select Weirdly Square - Pi 3B+ or older
sudo apt-get install xserver-xorg-video-all xserver-xorg-input-all xserver-xorg-core xinit x11-xserver-utils
Edit .bash_profile
. Create with touch .bash_profile
if it doesn't exist.
if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
startx
fi
sudo apt-get install chromium-browser
Unclutter removes mouse pointer
sudo apt-get install unclutter
Edit or add .xinitrc
with the following text. Be sure to update your IP.
#!/bin/sh
xset -dpms
xset s off
xset s noblank
unclutter &
chromium-browser http://192.168.1.104:5000 --start-fullscreen --kiosk --no-first-run --fast --noerrdialogs --disable-session-crashed-bubble --disable-infobars --window-size=720,720
Do not skip this step. Rpi Zero W will run super slow without them.
Install optimized version of Chromium
sudo apt install rpi-chromium-mods
Increase swap size
sudo nano /etc/dphys-swapfile
update to CONF_SWAPFILE=256
git clone git@github.com:aguileraGit/secretsquirrel.git
Create service file. sudo touch /etc/systemd/system/flaskServer.service
Add the following text to the file. sudo nano /etc/systemd/system/flaskServer.service
[Unit]
Description=Run Flask Server
After=network.target
[Service]
Type=simple
Restart=always
User=pi
WorkingDirectory=/home/pi/secretsquirrel
ExecStart=/usr/bin/python3 /home/pi/secretsquirrel/app.py
[Install]
WantedBy=multi-user.target
Start the service. sudo systemctl start flaskServer
Enable the service after reboots. sudo systemctl enable flaskServer
xinitrc, app.py, myScript.js, and index.html