Posts

Showing posts with the label Raspberry Pi

Raspberry Pi Spotify Status - The Sequel

Image
Background  Around a year ago, I set up a Raspberry Pi with a screen to show my Spotify status using a project on Github called " Nowify ." While this is an excellent project and worked well for most of my needs, I simply did not know how it was set up, as I was modifying someone else's project rather than just making my own. While possible, it became quite tricky to look through the project and add features according to my needs (automatic screen on/off, fixed scaling at small screen sizes, etc.) because I simply had no idea how the project had been put together. CS50 Over summer break and into the school year, I had been taking Harvard's free CS50 course, learning C, Python, and eventually HTML and CSS. For the final project for the course, I took a crack at recreating my favorite parts of Nowify, but with a few modifications to fit my needs. I was using my new knowledge of web app development, and hosting Python web apps with Flask, and got a rough demo together pr...

Raspberry Pi Spotify Display - Auto Screen Control!

Image
Project continues here:  https://blog.romangarms.com/2023/03/raspberry-pi-spotify-status-sequel.html What's new? A minor update, but now the Nowify Spotify display can turn on and off the Raspberry Pi's screen! The Java webserver ( GitHub link here ) can now get requests directly from my tweaked version of Nowify ( GitHub link here ).  How does it work? The webserver (hosted on the Raspberry Pi itself) looks for pings on either "localhost:9000/TurnOnScreen" or "localhost:9000/TurnOffScreen" to then send a vcgencmd command to turn the display on or off. My version of Nowify sends an HTTP get request to the "TurnOnScreen" URL when music begins playing, and sends a different HTTP request to the "TurnOffScreen" URL when music stops. Very basic, but it works quite nicely. Next Steps I'd like to prevent the TurnOffScreen request from being instant. I still have a "no music is currently playing" page, I don't want it to entirel...

Raspberry Pi Spotify Display - Nowify, Homebridge, and More!

Image
Project continues here: https://blog.romangarms.com/2022/06/raspberry-pi-spotify-display-auto.html Setup A while ago, I set up a Raspberry Pi 3B and cheap touchscreen display to show the song I'm currently listening to on Spotify. I did this by installing Raspbian, and then running Jon Ashcroft's Nowify  on the display, albeit with some slight modifications. I customized a couple of things. One, the "no music is currently playing" screen is now black, and less attention-grabby. Secondly, the font size got bumped up a little (a requirement for this tiny 7" screen, but still not enough!).  I also added one other helpful feature, though this one isn't a part of the Nowify site. I added integration with Apple Homekit through  Homebridge , which allows me to remotely turn on and off the display from my phone. Hitting buttons on my phone sends a signal to my computer hosting the Homebridge server, which sends a command over SSH to the Raspberry Pi to enable or disa...