This is a project to automate the work of school bells. The main features are the ease of installation of the system and simple configuration through a convenient web interface.
- RPi 3B (Or any another Raspberry PI or it's copies, like Orange Pi)
- 3.5 mm audio system
- Python + Playsound lib
- Flask - REST API
- Sqlite3 - Database
Native stack
- HTML5 + CSS3 + Pure JS(Modern fetch api for ajax api)
Clone this repository to your Raspberry PI
git clone https://github.com/ret7020/SchoolBellProject
Start the installer(WITH ROOT PRIVILAGES)
chmod +x installer.sh
sudo ./installer.sh
Change SECRET_KEY in config.py
to long random string
Run project(only for current ssh session without autostart)
./run.sh
Default password from admin panel: 12345
This is an instruction for systemd systems(systems with systemd as init). In the other cases refer to documentation for your init system.
If you clone repository in local user(named with pi) folder you will not have to change systemd service config.
- Open
./configs/school-bells.service
withvim
,nano
or another text editor.
vim school-bells.service
- Edit line number 7, change
/home/pi/Documents/Progs/SchoolBellProject/
with your absolute path to directory with SchoolBellProject - Edit line number 8, change
/home/pi/Documents/Progs/SchoolBellProject/run.sh
with absolute path torun.sh
file SchoolBellProject dir - Edit line number 9, change
/home/pi/.local/lib/python3.9/site-packages
with absolute path to your python env(with installed libraies fromrequirements.txt
) - Then execute script
setup_autorun.sh
- After it you can check service status (if must be active)
sudo systemctl start school-bells.service
The installer script immediately installs nginx, adds it to autoload and applies a special config that redirects port 8080 from the flask server to 80 nginx port.
- Check web ui on port 80.
- Reboot RPi and check autorun on boot
- Base timetable watcher ✔️
- Bell ring method ✔️
- WebUI to edit timetable ✔️
- WebUI ability to upload melodies ✔️
- Adaptive WebUI for smartphones ✔️
- Bindings to weekdays(DISABLE bell on Saturday and Sunday) ✔️
- Design as a REST API application with mostly AJAX WebUI as client ✔️
- Create Production Setup ✔️
- Create first release (1.0.0) ✔️
- Delete melody from list ✔️
- Modify Lesson start melody and finish melody