项目作者: KyleKing

项目描述 :
Python-Raspberry Pi Alarm Clock
高级语言: Python
项目地址: git://github.com/KyleKing/PiAlarm.git
创建时间: 2016-09-19T23:04:22Z
项目社区:https://github.com/KyleKing/PiAlarm

开源协议:MIT License

下载


Archived: started refactoring for better architecture, full test coverage, and improving the mechanical and electrical design. However, I can’t quite make a polished exterior that I am happy with. For now, I’ve decided to archive this project with the hope that I might revisit it in the future


PiAlarm

Raspberry Pi Smart Alarm Clock. RGB light strip, buzzer, character LCD display, and web app

Tech

  • Integrations
    • Plotly/Dash application to handle UI, basic HTML authentication, and managing a TInyDB instance
    • If This Then That (IFTTT)/generic HTML requests to toggle alarm on/off. Allows me to modify the alarm when not home and will automatically disable the alarm if I leave the general vicinity of my home until I return
  • Electronics
    • RGB Light Strip
    • Buzzer
    • 7-Segment Display for time
    • Character LCD - shows weather and other quick information
    • (Used to also have a motorized bed shaker, but that got banned, haha)
  • Box
    • Pretty janky, but easy to open and work on as a prototype. Will probably try to make something that looks nicer down the road

Photos


above view


Initial Prototype


above view


Prototype v2 with Box

Local Development

Commits Since last Release Last Commit Badge

FIXME: Update documentation for quick start. This is probably ~32% right

  1. git clone https://github.com/KyleKing/pialarm.git
  2. cd pialarm
  3. poetry install
  4. poetry shell
  5. python pialarm.py

First, check the pins.ini file in the Python/ directory, then proceed the test of each hardware before booting the web application for the first time.

Initialization

You will need a secret.ini file in the Python/ directory:

  1. [IFTTT]
  2. key = <>
  3. [WU]
  4. info = Weather Underground API
  5. apikey = <>
  6. lat = <>
  7. lon = <>

Python packages and other libraries installed, see the script ./Python/requirements.sh

There are likely other bugs, so open an issue if you run into any trouble. This app really isn’t built for distribution and is only a personal side-project.

Hardware Test: TM1637 7-Digit Display

  1. cd PiAlarm/Python
  2. python .archive-python/modules/TM1637.py
  3. # There should be a few statements printed and you can press enter to confirm each test