Skip to content
/ alarmpi Public

Alarm clock for Raspberry Pi with web front-end throughout local network

License

Notifications You must be signed in to change notification settings

jaxke/alarmpi

Repository files navigation

Alarmpy

Alarm clock written in Python mainly targeted to Raspberry Pi

Requiremens

  • Flask
  • ffmpeg(ffplay)
  • RPi.GPIO [optional]
  • cec-utils [optional]

Components

  • Web frontend written in Javascript using jQuery for AJAX calls and DOM manipulation
  • Bulma CSS
  • Web backend written in Python using Flask
  • Alarm clock written in Python

Frontend

  • 100% AJAX
  • Lists set alarms
    frontend

Backend

  • Return and change alarm info from/to local JSON file that keeps the alarms

Setup:

  • Clone the repo into your Pi and run alarm_clock.py as root(GPIO requires it).
  • Access the web server at http://[IP ADDR OF PI]:5000
    Flask setup:
    export FLASK_APP=server.py
    flask run --host="0.0.0.0"

Alarm clock

  • Terminal frontend
  • Uses ffplay for alarm sound file playback

Pi

In series: GPIO port 2 -> 10k ohm resistor -> button switch -> 3.3 V
Press button for ~1 second and the alarm will dismiss. If TV supports CEC and cec-utils is installed, TV will turn on before the alarm rings and will return to standby after alarm is dismissed(therefore external loudspeakers are not required).

TODO

  • Raspberry Pi GPIO
  • Clean up terminal interface
  • Auto IP address(must be configured in source ATM)
  • LED Ambient light

About

Alarm clock for Raspberry Pi with web front-end throughout local network

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published