/AlarmPi

A Raspberry Pi-based alarm clock with a configuration web interface

Primary LanguagePython

AlarmPi - A Raspberry Pi-based alarm clock with a configuration web interface

Features

  • Settings for each day of the week
  • Sleep cycle alignment system for setting alarms aligned with REM cycles
  • Sound file and Pandora based alarms
  • Configuration web interface with responsive design and automatic configuration saving
  • 3D printed case and button and speaker configuration

How to install

Simply clone the repository and run install.sh, which will install dependencies (in requirements.txt) and configure pianobar, the Pandora streaming system.

To start up the daemon (backend/alarmpi.py) and webserver (backend/server.py) automatically, reply Y to the propmt in install.sh. This will run them as a systemd service using alarmpi.service.

OR, add a command to run the included start script to /etc/rc.local:

python /home/pi/AlarmPi/start.py or bash /home/pi/AlarmPi/start.sh

The service (or scripts) will automatically run the application as the pi user to keep logfiles from being written as root.

To change the password for the web interface, in install.sh input the password when prompted.

You can also manualy set the password without install.sh by editing the file /var/alarmpi.pass and replacing the hash there with one generated from here.

I suggest you launch the web interface to get a better sense of the configuration and features of the project.

Physical setup

The AlarmPi requires several physical add-ons to the Pi:

  • Three buttons ('dismiss,' 'snooze,' and 'sleep now' for using the cycle-aligned alarm)
  • A small speaker and a headphone cable (I got these from a pair of old headphones)
  • A small 3W amplifier to boost the speaker
  • (Optional) A buzzer or LED to give feedback for button presses

I have also created a 3D-printed case (hosted on OnShape) for housing a Raspberry Pi 2 with all these required components.

This is also possible to be used with the Google AIY Voice Kit v1, if you have it. The GPIO pins needed in AlarmInput.py are:

  • 16 for the button
  • 22 for the LED

check this link for reference, so you don't use pins that mess the speaker up.

Unfortunately, I do not have more extensive documentation on the physical assembly, but if you are interested in more help feel free to contact me at mckennacisler@gmail.com.