Scrapes data from the HughesNet usage page, displays on a Waveshare 7.5" e-ink display (epd7in5) and opens a web server for display management.
- Raspberry Pi Zero, 3, 4
- Waveshare 7.5" e-ink display (V2)
You can install everything by running:
cd ~
git clone https://github.com/thequib/vista
cd vista
chmod +x install.sh
./install.sh
Alternatively, you can install this manually
sudo apt update
sudo apt install python3 python3-pip python3-numpy libopenjp2-7-dev
pip install -r requirements.txt
# Ensure any existing 'dtparam=spi' line is commented out
sudo sed -i 's/^\(dtparam=spi.*\)$/#\1/' "/boot/config.txt"
# Add 'dtparam=spi=on' to the end of the file
echo "dtparam=spi=on" | sudo tee -a "/boot/config.txt" > /dev/null
- Enter
sudo raspi-config
- Choose option 3, Interface Options
- Choose option I4, SPI
Left-arrow
to Yes, and hit enterRight-arrow
twice to Finish, and hit enter
cd ~
mkdir /opt/vista
sudo cp -r vista/* /opt/vista
# Create service file
cat <<EOF | sudo tee /etc/systemd/system/vistaweb.service > /dev/null
[Unit]
Description=Vista Web Service
After=network.target
[Service]
User=pi
WorkingDirectory=/opt/vista
ExecStart=/usr/bin/python /opt/vista/web.py
Restart=always
[Install]
WantedBy=multi-user.target
EOF
# Enable and start app
sudo systemctl daemon-reload
sudo systemctl enable vistaweb.service
sudo systemctl start vistaweb.service
CRON_JOB="@reboot cd /opt/vista && /usr/bin/python3 boot.py >> ~/vista.log 2>&1\n*/5 * * * * cd /opt/vista && /usr/bin/python main.py >> ~/vista.log 2>&1"
(crontab -l 2>/dev/null | grep -v -F "/opt/vista/main.py"; echo -e "$CRON_JOB") | crontab -
Open the crontab:
crontab -e
# Select your preferred text editor, default is Nano (1)
Enter the following
@reboot cd /opt/vista && /usr/bin/python3 boot.py >> ~/vista.log 2>&1\
*/5 * * * * cd /opt/vista && /usr/bin/python main.py >> ~/vista.log 2>&1"
Save the file
You can uninstall everything automatically by running:
cd /opt/vista
# If you installed manually, you will need to run:
#sudo chmod +x uninstall.sh
./uninstall.sh
This is only required if you installed the web service
sudo systemctl stop vistaweb.service
sudo systemctl disable vistaweb.service
sudo rm /etc/systemd/system/vistaweb.service
sudo systemctl daemon-reload
(crontab -l | grep -v -F "@reboot cd $INSTALL_DIR && /usr/bin/python3 $REBOOT_SCRIPT >> ~/vista.log 2>&1") | crontab -
(crontab -l | grep -v -F "*/5 * * * * cd $INSTALL_DIR && /usr/bin/python3 $REFRESH_SCRIPT >> ~/vista.log 2>&1") | crontab -
Open the crontab:
crontab -e
# Select your preferred text editor, default is Nano (1)
Remove the following
@reboot cd /opt/vista && /usr/bin/python3 boot.py >> ~/vista.log 2>&1\
*/5 * * * * cd /opt/vista && /usr/bin/python main.py >> ~/vista.log 2>&1"
Save the file
sudo rm -rf /opt/vista