MiczFlor / RPi-Jukebox-RFID

A Raspberry Pi jukebox, playing local music, podcasts, web radio and streams triggered by RFID cards, web app or home automation. All plug and play via USB. GPIO scripts available.
http://phoniebox.de
MIT License
1.33k stars 395 forks source link

🚀 | Alarm clock #1308

Open kreativer-stuhlgang opened 3 years ago

kreativer-stuhlgang commented 3 years ago

I envision an alarm clock feature that is a scheduled trigger for a song/playlist to start.

My scenario would be that the cronjob wakes up my son in the morning with his "morning" playlist, or starts playing a certain live radio news broadcast at lunchtime or starts a calming playlist in the evening.

any thoughts how to easily do this over command line?

Groovylein commented 3 years ago

This is an interesting approach :) Do you want to leave the Phoniebox running the whole night? If that is true then I found a nice little Python script in combination with crontab: https://howchoo.com/pi/how-to-make-a-raspberry-pi-smart-alarm-clock#install-the-alarm-sound

sebrep commented 2 years ago

Well actually that is not the best approach. Since we want to harness the possiblity to use folder and maybe also spotify you can call on the scripts that run the commands for example if you know that you want to wake up with the card ID 86114654176. You can add a crontab line to wake you up with the contents of the card every weekday at 7:00 am with a command like this: 7 0 * * 1-5 /home/pi/RPi-Jukebox-RFID/scripts/rfid_trigger_play.sh -i=86114654176 > /dev/null 2>&1 But it is much more comfortable to do this through a home automation system by the available mqtt service.