Using telegram bot to control a relay connect to a Raspberry Pi for opening a door. Implemented with python2 and telebot
pip install -r requirements.txt
cp config.example.py config.py
Edit config.py
and input your telegram bot API Key, administrator telegram ID, and the telegram ID which are allowed to open the door
pm2 start door-bot.py --name=door-bot
The relay is connect to Raspberry Pi 3 GPIO04 (Pin 7), Ground (Pin 6) and DC power 5V (Pin 2)
The two thin white cable is connected to the button of the original controller installed in the apartment. Once the black button is pressed, the front door of the apartment will be unlocked. Which is now triggered by the relay.