
Raspberry PI
Cloud-Base Displays for featured content
CHEMISTRY DEPARTMENT | UIC
Thanks for visiting my site. This website is a constant work in progress, as I update it with new projects and experiences.
Tech stack

Raspberry Pi

Linux framebuffer imageviewer

>_
SSH
The goal
Create a system that allows to update TV content on demand supporting cloud base storage. Also enable remote communication to the RB's to update and fix any errors that could occur.

My approach
Update and restore​
At some point in the past these tv's were using an old version of FEH (another image viewer app) and outdated modified version of raspbian. To give this project a fresh start, I decided to wipe clean and flash the newest version of Raspbian both Raspberry PI's
Set up SSH
SSH or Secure Shell is a communication protocol that will enable the communication from the main computer to each raspberry pi. This will make each computer remotely accesible.
Install RClone and FBI
RClone is a program that will Clone all the content from any cloud storage to a specific folder in the Raspberry PI.
Fbi or Linux framebuffer imageviewer is the software that will create a "slideshow" with the content of a specific folder.
click to show code
#/bin/sh
​
if rclone check CloudPictures: /home/pi/Pictures; then
# If the check succeeds (files match), do nothing
exit 0
else
# If the check fails (files don't match), sync and reboot
rclone sync CloudPictures: /home/pi/Pictures
sleep 5
sudo killall fbi
sleep 15
sudo reboot
​
fi
exit
<Code>​
This script checks if the content of the cloud matches with the local copy. If not, a sync is performed and a reboot takes place.
/ <Code>​
#/bin/sh
​
if rclone check CloudPictures: /home/pi/Pictures; then
# If the check succeeds (files match), do nothing
exit 0
else
# If the check fails (files don't match), sync and reboot
rclone sync CloudPictures: /home/pi/Pictures
sleep 5
sudo killall fbi
sleep 15
sudo reboot
​
fi
exit
<Code>​
This script forces the Raspberry Pi to have always a slideshow running. Checking if the fbi process is running in the background and if not start it.
/ <Code>​
#! /bin/sh
​
sudo killall fbi
<Code>​
During testing I realized that sometimes after a reboot the Raspberry will have a remaining FBI process in the background, disabling "Slideshow Script". This script just makes sure that after reboot no "ghost process" are running.
/ <Code>​
Issues and fixes
The first issue arose from multiple instances of FBI running simultaneously. This occurred because the system failed to recognize certain slideshow instances and subsequently restarted the service (script #1).
​
This problem occurred because Rclone was synchronizing the local folder even when there were no updates necessary. To address this, instead of syncing the content every minute, I adjusted the approach to check for changes every minute and perform the sync only if changes were detected, making the process more efficient.
​
Another issue I encountered was that sometimes after a reboot no slideshow would display. I have observed numerous screens throughout the city displaying either the Windows or Raspberry Pi desktops, rather than the intended content. To prevent this from happening, I implemented solutions in scripts #2 and #3.










