I’ve set up the Pirate Radio kit with the VLC and added some online radio’s into it. All works fine and the VLC is on 24/7.
I’ve been trying to figure out, how to create a cron job to send play/pause to VLC. Haven’t found any answer on the internet or my skill is too low to recognize the solution. Is there a simple command or script I could use to automatically play/pause the VLC?
I could probably just kill the VLC and execute a new instance to start it anew. But I want to have also ability to play/pause anytime between.
Automated scenario should be:
weekdays start at 8am and stop at 10am, start at 4pm stop at 10pm
weekends start at 8am and stop at 10pm
have ability to play/pause the radio anytime between
vlc.communicate("voldown") # Turn the volume down one step
vlc.communicate("volup") # Turn the volume up one step
vlc.communicate("next") # Next track
vlc.communicate("prev") # Prev track
vlc.communicate("pause") # Pause/Play
Also be aware, I’ve seen reports that if the pHat Beat is left in pause for a long time, the speakers get hot. Apparently there is a DC current going out to the speakers that causes the coils to heat up? I haven’t noticed / confirmed it myself. May also have been fixed? Not sure? Might want to check it for yourself and then judge accordingly. I turn mine off when not using it. I added my own easy to use mini arcade buttons for all the pHat Beat buttons. I also wired one across the Pi’s RUN terminals. I shut down but don’t unplug the power supply. When I want my tunes I just press the run button and the Pi boots up.
Good stuff, very glad it worked out for you. I would class myself as above average python wise. I’m no expert that’s for sure, not a noob either lol. All self taught, learning as I go.
Also good to hear the speakers didn’t get hot. Thumbs up.