View project on Hackaday View project on GitHub

Hack Clock

A hackable alarm clock, built for experimentation and learning

Waking up with Google Music

If you use Google Music, you can play the "I'm Feeling Lucky" radio station when you wake up!

To enable the Google Music block within your toolbox, you will need to provide your Google username and password (or application password if you use two-factor authentication) to the Hack Clock configuration file /etc/hack-clock.conf as in:

"google_username": "chuckles_mcharty", "google_password": "yohohothisisntmypassword",

Restart the hack-clock service and then you can use the following code to launch the radio station:

from hackclock.runapp.Libs.GStreamer import Speaker from hackclock.runapp.Libs.GoogleMusic import AudioStream speaker = Speaker() audio_stream = AudioStream() speaker.playList(audio_stream)