Raspberry Pi Spotify Display - Auto Screen Control!

Project continues here: 

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 entirely go to waste. I want something like a 2 minute countdown after music stops playing before it turns off. If nothing else happens it that time, the screen goes off. If it gets a TurnOnScreen in that time, it should cancel the countdown and just stay on. Not sure how or when I'll do this just yet, but nice to have an idea for what to work on next time.

Comments

Popular posts from this blog

Videopaks for the OP-Z

The Nautilus - A Group Project

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