How to reuse your old Raspberry Pi as a Telegram-controlled Alarm Clock – AlarmPi August 14, 2017

So do you have a RaspberryPi not doing anything at home? Got that 2GB class 4 SD card that you just don’t know what to do with it? Well this guide is for you! It will let you turn your Pi in to an IOT alarm clock, no code, no complicated commands, just flash, edit two text files and you are good to go. The alarm clock is controlled from Telegram, so you can set it and turn it off from your smartphone. I find that usually using my phone wakes me up. So it’s useful for me. You can also edit the alarm and use any mp3 file you want.
The code is all available in github. AlarmBot is the Telegram Bot. An AlarmPi is the distro (built with CustomPiOS yet again).

Open newly flashed image and edit two files, one for the wifi, and one for the bot token:

Put in alarmpi-wpa-supplicant.txt your wifi address (skip if using Ethernet cable). Here is how it should look:

In config.ini, paste the newly created bot token from step 3. This is where the token goes:

optionally, you can change the alarm.mp3 file to the sound of your choice.

Boot your pi and connect it to speakers, wait a bit, because it will reboot internally twice. And send /start to your bot.

You’re done! Let’s see how we can set alarm with telegram!

How to use the telegram bot

Once you got a reply to /start and you know the bot is working you can use “/help” to list all the available commands.

First, set the /timezone to your location, and make sure you can see the correct time with the /time command.

Now let’s set an alarm, type /new and you will get the option to pick an alarm that works daily or weekly (code contributions would be great to add more types of alarms).

Once you have alarms, you can manage them in the /list command.

You can disable, or delete commands using this menu. Selecting the bell will disable it, the X will delete an alarm, pressing on the alarm names would close the table.

To stop an alarm that is going, send /stop to the bot.

You can test the alarm using the /test command.

There is no reason why any Pi on earth should not be doing something

So this AlarmPi distro is usable, it lets you burn and flash a device within minutes and make it useful instead of lying and collecting dust in your house. The reason people are not using Pis is because making them do something requires “a guide”, aka list of instructions you are probably going to get wrong to do something simple. Building something as robust as this would take hours, and would be hell to maintain and receive code contributions. But AlarmPi is easy to read and modify. There is a repo for the bot, and a repo for the distro. If a new rapsberrypi comes out and there is a new Raspbian, all you got to do is rebuild and release. No manual editing. And takes less time to build and supports over 40 devices already which run Armbian.

The code base of AlarmBot lets you control crontabs, it could be used for controlling