- Raspberry Pi
- Pi Camera or Pi NoIR
- PIR Motion Sensor Module HCSR501
sudo apt update
sudo apt upgrade -y
sudo apt install -y ffmpeg
sudo apt install -y python3 python3-pip python3-picamera curl wget git gpac
sudo pip3 install -r requirements.txt
sudo raspi-config nonint do_camera 0
gpu_mem=128
Edit the config.py file, and add your tokens obtained in https://t.me/BotFather and https://t.me/myidbot
TOKEN_ID = 'YOUR_TOKEN_BOT'
CHAT_ID = 'YOUT_TOKEN_CHAT_ID'
[Service]
Type=idle
ExecStart=/usr/bin/python3 /home/pi/git/BotTelegramSecurityPi/app.py
chmod a+x app.py lib/*.py
sudo mv bot.service /lib/systemd/system/
sudo chmod 644 /lib/systemd/system/bot.service
sudo systemctl daemon-reload
sudo systemctl enable bot.service
sudo systemctl start bot.service
sudo systemctl status bot.service
./app.py