A telegram bot that serves as an alarm clock, runs best on a RaspberryPi
- Python3 (and pip probably)
- python-telegram-bot (7.0.1+)
- pyaudio
- pulseaudio (or anything pyaudio compatible)
- pydub
- python-crontab
- cron-descriptor
- croniter
- emoji
Here is a blog post about this, with even more install and usage instructions.
Install the requirements, in ubuntu:
sudo ./src/install_deps.sh
or:
sudo apt-get install -y python3-pip ffmpeg libavcodec-extra python3-pyaudio pulseaudio sudo pip3 install -r src/requirements.txt
Set copy config.ini.example to config ini and add there your bot's token. You can get a bot token by sending
/newbot
to @BotFatherRun:
src/alarm_bot.py
Message
/start
to your bot to set up alarms.
Run src/add_startup_service.sh
either as the user you want the service to be run as, or src/add_startup_service.sh <user to run script>
alarm.mp3 is by TheZero under CC 1.0
Code contributions are loved!