nickpourazima / rotary-phone-audio-guestbook

Audio guestbook using an old rotary phone and a raspberry pi zero
MIT License
64 stars 15 forks source link

Added Webserver functionality #52

Closed jmdevita closed 3 months ago

jmdevita commented 3 months ago

Added the ability to grab files from a hosted Webserver (assuming that the raspberry pi is connected to wifi) on port 8000. This also comes with a .service file to have it run in parallel with the audioguestbook service file using minimal resources - tested on rpi zero w.

The web page can be accessed by finding the raspberry pi's ip address, and with port 8000 (example: 192.168.1.100:8000) on any device on the same network. The page will dynamically pull any recording saved in the /recordings folder into a list, and the user will just need to refresh the page. It's a very simple UI, but allows someone to A) Be able to check if the processes are running as expected (as they can test and then see the recordings show up) and B) be able to pull these files without having to take out the SD card.

The webserver is using Flask as a backend framework and Gunicorn as the production server.

Example:

Screenshot 2024-08-20 at 11 49 33 PM

PS. Also changed the .gitignore file to keep the recording folder, but remove any file inside it as well as ignore any env/ virtual environment.

nickpourazima commented 3 months ago

So so awesome, thank you @jmdevita!! We should probably add a new section about this to the README for users awareness, what do you think?

I have to rewire my rotary phone since I took it apart but I'm planning to test this out soon and I'll create a new release (.iso)

jmdevita commented 3 months ago

Good callout @nickpourazima! I can work on that later today and will push it as part of this PR.

Just happy to give back where I can, this project has been a really, really big help with my upcoming wedding.

nickpourazima commented 3 months ago

That's so great to hear @jmdevita, congrats on your upcoming wedding!!

jmdevita commented 3 months ago

Updated Readme file to reflect using the webserver functionality.